Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

changelog-light

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

changelog-light - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

18

bin/cli.js
#!/usr/bin/env node
const { existsSync } = require('fs');
const { join } = require('path');

@@ -20,2 +21,3 @@ const yargs = require('yargs');

'dry-run': isDryRun,
'lock-file': lockFile,
'non-cc': isAllowNonConventionalCommits,

@@ -98,2 +100,9 @@ override: overrideVersion,

})
.option('lock-file', {
default: ['./package-lock.json', './yarn.lock'],
describe:
'Lock file read and relative path lookup. Defaults to looking for git related updates to "package-lock.json" and "yarn.lock" during release. You can pass your own custom "lock" file if needed. To disable, pass a falsely value.',
type: 'array',
coerce: args => args.flat().filter(value => !/null|undefined|false|0/.test(value) && value !== '')
})
.option('package', {

@@ -146,2 +155,11 @@ default: './package.json',

linkUrl,
lockFilePath: function () {
let foundLockFile;
if (Array.isArray(lockFile)) {
foundLockFile = lockFile.map(file => join(this.contextPath, file)).find(filePath => existsSync(filePath));
}
return foundLockFile;
},
overrideVersion,

@@ -148,0 +166,0 @@ packageFile,

3

package.json
{
"name": "changelog-light",
"version": "1.1.1",
"version": "1.1.2",
"description": "Generate a changelog from commits.",

@@ -17,2 +17,3 @@ "author": "cdcabrera",

"changelog",
"cli",
"commit messages",

@@ -19,0 +20,0 @@ "commits",

@@ -45,3 +45,3 @@ # Changelog Light

string. Uses system new Date([your date])
[string] [default: "2024-01-29T07:40:54.615Z"]
[string] [default: "2024-03-21T13:20:45.593Z"]
-n, --non-cc Allow non-conventional commits to apply a semver weight

@@ -69,2 +69,8 @@ and appear in [CHANGELOG.md] under a general type

[string]
--lock-file Lock file read and relative path lookup. Defaults to
looking for git related updates to "package-lock.json"
and "yarn.lock" during release. You can pass your own
custom "lock" file if needed. To disable, pass a
falsely value.
[array] [default: ["./package-lock.json","./yarn.lock"]]
--package package.json read, output and relative path

@@ -71,0 +77,0 @@ [string] [default: "./package.json"]

@@ -40,10 +40,12 @@ const { execSync } = require('child_process');

* @param {string} options.packagePath
* @param {string} options.lockFilePath
* @param {string[]|string} options.releaseTypeScope
* @returns {string}
*/
const commitFiles = (version, { changelogPath, packagePath, releaseTypeScope } = OPTIONS) => {
const commitFiles = (version, { changelogPath, packagePath, lockFilePath, releaseTypeScope } = OPTIONS) => {
const isArray = Array.isArray(releaseTypeScope);
const updatedLockFilePath = (lockFilePath && ` ${lockFilePath}`) || '';
return runCmd(
`git add ${packagePath} ${changelogPath} && git commit ${packagePath} ${changelogPath} -m "${
`git add ${packagePath} ${changelogPath}${updatedLockFilePath} && git commit ${packagePath} ${changelogPath}${updatedLockFilePath} -m "${
(isArray && releaseTypeScope?.[0]) || releaseTypeScope

@@ -50,0 +52,0 @@ }: ${version}"`,

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