standard-changelog
Advanced tools
Comparing version 4.0.0 to 5.0.0
26
index.js
@@ -1,9 +0,6 @@ | ||
'use strict' | ||
const fs = require('fs/promises') | ||
const pc = require('picocolors') | ||
const conventionalChangelogCore = require('conventional-changelog-core') | ||
const angular = require('conventional-changelog-angular') | ||
const fs = require('fs') | ||
const pc = require('picocolors') | ||
const figures = require('figures') | ||
const sprintf = require('sprintf-js').sprintf | ||
const { tick } = require('./figures') | ||
@@ -13,12 +10,13 @@ function conventionalChangelog (options, context, gitRawCommitsOpts, parserOpts, writerOpts) { | ||
options.config = angular | ||
return conventionalChangelogCore(options, context, gitRawCommitsOpts, parserOpts, writerOpts) | ||
} | ||
conventionalChangelog.createIfMissing = function (infile) { | ||
async function createIfMissing (infile) { | ||
try { | ||
fs.accessSync(infile, fs.F_OK) | ||
await fs.access(infile, fs.F_OK) | ||
} catch (err) { | ||
if (err.code === 'ENOENT') { | ||
conventionalChangelog.checkpoint('created %s', [infile]) | ||
fs.writeFileSync(infile, '\n', 'utf-8') | ||
checkpoint('created %s', [infile]) | ||
await fs.writeFile(infile, '\n', 'utf-8') | ||
} | ||
@@ -28,8 +26,8 @@ } | ||
conventionalChangelog.checkpoint = function (msg, args) { | ||
console.info(pc.green(figures.tick) + ' ' + sprintf(msg, args.map(function (arg) { | ||
return pc.bold(arg) | ||
}))) | ||
function checkpoint (msg, args) { | ||
console.info(`${pc.green(tick)} ${msg}`, ...args.map(arg => pc.bold(arg))) | ||
} | ||
module.exports = conventionalChangelog | ||
module.exports.createIfMissing = createIfMissing | ||
module.exports.checkpoint = checkpoint |
{ | ||
"name": "standard-changelog", | ||
"version": "4.0.0", | ||
"version": "5.0.0", | ||
"description": "Generate a changelog from git metadata with Angular commit convention", | ||
@@ -26,15 +26,12 @@ "bugs": { | ||
"index.js", | ||
"figures.js", | ||
"cli.mjs" | ||
], | ||
"dependencies": { | ||
"add-stream": "^1.0.0", | ||
"figures": "^3.2.0", | ||
"meow": "^12.0.1", | ||
"picocolors": "^1.0.0", | ||
"sprintf-js": "^1.1.2", | ||
"tempfile": "^5.0.0", | ||
"conventional-changelog-core": "^6.0.0", | ||
"conventional-changelog-angular": "^7.0.0" | ||
"conventional-changelog-angular": "^7.0.0", | ||
"conventional-changelog-core": "^7.0.0" | ||
}, | ||
"bin": "cli.mjs" | ||
} |
Sorry, the diff of this file is not supported yet
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
9436
4
6
0
186
+ Addedconventional-changelog-core@7.0.0(transitive)
+ Addedgit-semver-tags@7.0.1(transitive)
- Removedadd-stream@^1.0.0
- Removedfigures@^3.2.0
- Removedsprintf-js@^1.1.2
- Removedtempfile@^5.0.0
- Removedconventional-changelog-core@6.0.0(transitive)
- Removedfigures@3.2.0(transitive)
- Removedgit-remote-origin-url@2.0.0(transitive)
- Removedgit-semver-tags@6.0.0(transitive)
- Removedgitconfiglocal@1.0.0(transitive)
- Removedini@1.3.8(transitive)
- Removedpify@2.3.0(transitive)
- Removedsprintf-js@1.1.3(transitive)
- Removedtemp-dir@3.0.0(transitive)
- Removedtempfile@5.0.0(transitive)