keep-a-changelog
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -10,5 +10,18 @@ <!-- deno-fmt-ignore-file --> | ||
## [2.0.1] - 2022-01-09 | ||
### Fixed | ||
- Updated deps. | ||
- `release` and `latest-release` args [#23]. | ||
## [2.0.0] - 2021-12-08 | ||
New version merging Deno and Node code. There are no changes. | ||
New version merging Deno and Node code using Deno's `dnt` package. | ||
### Changed | ||
- Code converted to TypeScript. | ||
- Added the link of the first version [#21]. | ||
[#21]: https://github.com/oscarotero/keep-a-changelog/issues/21 | ||
[#23]: https://github.com/oscarotero/keep-a-changelog/issues/23 | ||
[2.0.1]: https://github.com/oscarotero/keep-a-changelog/compare/v2.0.0...v2.0.1 | ||
[2.0.0]: https://github.com/oscarotero/keep-a-changelog/releases/tag/v2.0.0 |
#!/usr/bin/env node | ||
import * as denoShim from "deno.ns"; | ||
import { join } from "./deps/deno_land/std_0.113.0/path/mod.js"; | ||
import * as dntShim from "./_dnt.shims.js"; | ||
import { join } from "./deps/deno_land/std_0.120.0/path/mod.js"; | ||
import { Changelog, parser, Release } from "./mod.js"; | ||
import { parse as parseFlag } from "./deps/deno_land/std_0.113.0/flags/mod.js"; | ||
import { parse as parseFlag } from "./deps/deno_land/std_0.120.0/flags/mod.js"; | ||
import { parse as parseIni } from "./deps/deno_land/x/ini_v2.1.0/mod.js"; | ||
const argv = parseFlag(denoShim.Deno.args, { | ||
const argv = parseFlag(dntShim.Deno.args, { | ||
default: { | ||
file: "CHANGELOG.md", | ||
release: null, | ||
url: null, | ||
@@ -16,3 +17,3 @@ https: true, | ||
}); | ||
const file = join(denoShim.Deno.cwd(), argv.file); | ||
const file = join(dntShim.Deno.cwd(), argv.file); | ||
try { | ||
@@ -22,6 +23,6 @@ if (argv.init) { | ||
save(file, changelog, true); | ||
denoShim.Deno.exit(0); | ||
dntShim.Deno.exit(0); | ||
} | ||
const changelog = parser(denoShim.Deno.readTextFileSync(file)); | ||
if (argv.latestRelease) { | ||
const changelog = parser(dntShim.Deno.readTextFileSync(file)); | ||
if (argv['latest-release']) { | ||
const release = changelog.releases.find((release) => release.date && release.version); | ||
@@ -31,3 +32,3 @@ if (release) { | ||
} | ||
denoShim.Deno.exit(0); | ||
dntShim.Deno.exit(0); | ||
} | ||
@@ -52,3 +53,3 @@ if (argv.release) { | ||
console.error("Not found any valid unreleased version"); | ||
denoShim.Deno.exit(1); | ||
dntShim.Deno.exit(1); | ||
} | ||
@@ -67,3 +68,3 @@ } | ||
console.error(red('Please, set the repository url with --url="https://github.com/username/repository"')); | ||
denoShim.Deno.exit(1); | ||
dntShim.Deno.exit(1); | ||
} | ||
@@ -77,3 +78,3 @@ } | ||
if (!argv.quiet) { | ||
denoShim.Deno.exit(1); | ||
dntShim.Deno.exit(1); | ||
} | ||
@@ -86,3 +87,3 @@ } | ||
} | ||
denoShim.Deno.writeTextFileSync(file, changelog.toString()); | ||
dntShim.Deno.writeTextFileSync(file, changelog.toString()); | ||
if (isNew) { | ||
@@ -103,4 +104,4 @@ console.log(green("Generated new file"), file); | ||
try { | ||
const file = join(denoShim.Deno.cwd(), ".git", "config"); | ||
const content = denoShim.Deno.readTextFileSync(file); | ||
const file = join(dntShim.Deno.cwd(), ".git", "config"); | ||
const content = dntShim.Deno.readTextFileSync(file); | ||
const data = parseIni(content); | ||
@@ -107,0 +108,0 @@ const url = data?.['remote "origin"']?.url; |
@@ -1,4 +0,4 @@ | ||
import * as denoShim from "deno.ns"; | ||
import * as dntShim from "../../../../_dnt.shims.js"; | ||
import * as eol from '../../std_0.51.0/fs/eol.js'; | ||
const isWindows = denoShim.Deno.build.os == "windows"; | ||
const isWindows = dntShim.Deno.build.os == "windows"; | ||
const EOL = isWindows ? eol.EOL.CRLF : eol.EOL.LF; | ||
@@ -5,0 +5,0 @@ export const parse = decode; |
@@ -9,3 +9,3 @@ { | ||
"name": "keep-a-changelog", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "Node package to parse and generate changelogs following the [keepachangelog](http://keepachangelog.com/en/1.0.0/) format.", | ||
@@ -38,3 +38,3 @@ "homepage": "https://github.com/oscarotero/keep-a-changelog#readme", | ||
"dependencies": { | ||
"deno.ns": "0.7.3" | ||
"@deno/shim-deno": "~0.1.1" | ||
}, | ||
@@ -41,0 +41,0 @@ "devDependencies": { |
@@ -27,14 +27,16 @@ #!/usr/bin/env node | ||
else if (typeof define === "function" && define.amd) { | ||
define(["require", "exports", "deno.ns", "./deps/deno_land/std_0.113.0/path/mod.js", "./mod.js", "./deps/deno_land/std_0.113.0/flags/mod.js", "./deps/deno_land/x/ini_v2.1.0/mod.js"], factory); | ||
define(["require", "exports", "./_dnt.shims.js", "./deps/deno_land/std_0.120.0/path/mod.js", "./mod.js", "./deps/deno_land/std_0.120.0/flags/mod.js", "./deps/deno_land/x/ini_v2.1.0/mod.js"], factory); | ||
} | ||
})(function (require, exports) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const denoShim = __importStar(require("deno.ns")); | ||
const mod_js_1 = require("./deps/deno_land/std_0.113.0/path/mod.js"); | ||
const dntShim = __importStar(require("./_dnt.shims.js")); | ||
const mod_js_1 = require("./deps/deno_land/std_0.120.0/path/mod.js"); | ||
const mod_js_2 = require("./mod.js"); | ||
const mod_js_3 = require("./deps/deno_land/std_0.113.0/flags/mod.js"); | ||
const mod_js_3 = require("./deps/deno_land/std_0.120.0/flags/mod.js"); | ||
const mod_js_4 = require("./deps/deno_land/x/ini_v2.1.0/mod.js"); | ||
const argv = (0, mod_js_3.parse)(denoShim.Deno.args, { | ||
const argv = (0, mod_js_3.parse)(dntShim.Deno.args, { | ||
default: { | ||
file: "CHANGELOG.md", | ||
release: null, | ||
url: null, | ||
@@ -46,3 +48,3 @@ https: true, | ||
}); | ||
const file = (0, mod_js_1.join)(denoShim.Deno.cwd(), argv.file); | ||
const file = (0, mod_js_1.join)(dntShim.Deno.cwd(), argv.file); | ||
try { | ||
@@ -52,6 +54,6 @@ if (argv.init) { | ||
save(file, changelog, true); | ||
denoShim.Deno.exit(0); | ||
dntShim.Deno.exit(0); | ||
} | ||
const changelog = (0, mod_js_2.parser)(denoShim.Deno.readTextFileSync(file)); | ||
if (argv.latestRelease) { | ||
const changelog = (0, mod_js_2.parser)(dntShim.Deno.readTextFileSync(file)); | ||
if (argv['latest-release']) { | ||
const release = changelog.releases.find((release) => release.date && release.version); | ||
@@ -61,3 +63,3 @@ if (release) { | ||
} | ||
denoShim.Deno.exit(0); | ||
dntShim.Deno.exit(0); | ||
} | ||
@@ -82,3 +84,3 @@ if (argv.release) { | ||
console.error("Not found any valid unreleased version"); | ||
denoShim.Deno.exit(1); | ||
dntShim.Deno.exit(1); | ||
} | ||
@@ -97,3 +99,3 @@ } | ||
console.error(red('Please, set the repository url with --url="https://github.com/username/repository"')); | ||
denoShim.Deno.exit(1); | ||
dntShim.Deno.exit(1); | ||
} | ||
@@ -107,3 +109,3 @@ } | ||
if (!argv.quiet) { | ||
denoShim.Deno.exit(1); | ||
dntShim.Deno.exit(1); | ||
} | ||
@@ -116,3 +118,3 @@ } | ||
} | ||
denoShim.Deno.writeTextFileSync(file, changelog.toString()); | ||
dntShim.Deno.writeTextFileSync(file, changelog.toString()); | ||
if (isNew) { | ||
@@ -133,4 +135,4 @@ console.log(green("Generated new file"), file); | ||
try { | ||
const file = (0, mod_js_1.join)(denoShim.Deno.cwd(), ".git", "config"); | ||
const content = denoShim.Deno.readTextFileSync(file); | ||
const file = (0, mod_js_1.join)(dntShim.Deno.cwd(), ".git", "config"); | ||
const content = dntShim.Deno.readTextFileSync(file); | ||
const data = (0, mod_js_4.parse)(content); | ||
@@ -137,0 +139,0 @@ const url = data?.['remote "origin"']?.url; |
@@ -11,2 +11,3 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. | ||
})(function (require, exports) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -13,0 +14,0 @@ exports.format = exports.detect = exports.EOL = void 0; |
@@ -26,10 +26,11 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
else if (typeof define === "function" && define.amd) { | ||
define(["require", "exports", "deno.ns", "../../std_0.51.0/fs/eol.js"], factory); | ||
define(["require", "exports", "../../../../_dnt.shims.js", "../../std_0.51.0/fs/eol.js"], factory); | ||
} | ||
})(function (require, exports) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.unsafe = exports.safe = exports.decode = exports.encode = exports.stringify = exports.parse = void 0; | ||
const denoShim = __importStar(require("deno.ns")); | ||
const dntShim = __importStar(require("../../../../_dnt.shims.js")); | ||
const eol = __importStar(require("../../std_0.51.0/fs/eol.js")); | ||
const isWindows = denoShim.Deno.build.os == "windows"; | ||
const isWindows = dntShim.Deno.build.os == "windows"; | ||
const EOL = isWindows ? eol.EOL.CRLF : eol.EOL.LF; | ||
@@ -36,0 +37,0 @@ exports.parse = decode; |
@@ -20,4 +20,5 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
})(function (require, exports) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./ini.js"), exports); | ||
}); |
@@ -10,2 +10,3 @@ (function (factory) { | ||
})(function (require, exports) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -12,0 +13,0 @@ exports.coerce = exports.intersects = exports.prerelease = exports.outside = exports.gtr = exports.ltr = exports.validRange = exports.minVersion = exports.minSatisfying = exports.maxSatisfying = exports.satisfies = exports.toComparators = exports.Range = exports.Comparator = exports.cmp = exports.lte = exports.gte = exports.neq = exports.eq = exports.lt = exports.gt = exports.rsort = exports.sort = exports.rcompare = exports.compareBuild = exports.compareLoose = exports.compare = exports.patch = exports.minor = exports.major = exports.rcompareIdentifiers = exports.compareIdentifiers = exports.diff = exports.inc = exports.SemVer = exports.clean = exports.valid = exports.parse = exports.SEMVER_SPEC_VERSION = void 0; |
@@ -13,2 +13,3 @@ var __importDefault = (this && this.__importDefault) || function (mod) { | ||
})(function (require, exports) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -15,0 +16,0 @@ exports.Release = exports.parser = exports.Changelog = exports.Change = void 0; |
@@ -10,2 +10,3 @@ (function (factory) { | ||
})(function (require, exports) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -12,0 +13,0 @@ class Change { |
@@ -10,2 +10,3 @@ (function (factory) { | ||
})(function (require, exports) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -12,0 +13,0 @@ const deps_js_1 = require("./deps.js"); |
@@ -13,2 +13,3 @@ var __importDefault = (this && this.__importDefault) || function (mod) { | ||
})(function (require, exports) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -15,0 +16,0 @@ exports.eq = exports.Semver = void 0; |
@@ -13,2 +13,3 @@ var __importDefault = (this && this.__importDefault) || function (mod) { | ||
})(function (require, exports) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -15,0 +16,0 @@ const Changelog_js_1 = __importDefault(require("./Changelog.js")); |
@@ -13,2 +13,3 @@ var __importDefault = (this && this.__importDefault) || function (mod) { | ||
})(function (require, exports) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -15,0 +16,0 @@ const deps_js_1 = require("./deps.js"); |
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
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
437402
86
10889
1
+ Added@deno/shim-deno@~0.1.1
+ Added@deno/shim-deno@0.1.2(transitive)
- Removeddeno.ns@0.7.3
- Removeddeno.ns@0.7.3(transitive)
- Removedundici@4.16.0(transitive)