Socket
Socket
Sign inDemoInstall

commit-and-tag-version

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

commit-and-tag-version - npm Package Compare versions

Comparing version 11.0.0 to 11.1.0

13

CHANGELOG.md

@@ -5,2 +5,15 @@ # Changelog

## [11.1.0](https://github.com/absolute-version/commit-and-tag-version/compare/v11.0.0...v11.1.0) (2023-02-14)
### Features
* Expose release count option ([40d27f8](https://github.com/absolute-version/commit-and-tag-version/commit/40d27f8782c0621f6ec0ab796b4ae674ec6d43c8))
* replace the changelog if releaseCount = 0 ([d18af90](https://github.com/absolute-version/commit-and-tag-version/commit/d18af9040fdc2a5798681fa747a43a71cb75e47b))
### Bug Fixes
* ensure git signatures are not present ([268800b](https://github.com/absolute-version/commit-and-tag-version/commit/268800b3c5e01993902cb0df0d123ac8b3388359))
## [11.0.0](https://github.com/absolute-version/commit-and-tag-version/compare/v10.1.0...v11.0.0) (2023-01-17)

@@ -7,0 +20,0 @@

@@ -76,2 +76,7 @@ const spec = require('conventional-changelog-config-spec')

})
.option('release-count', {
describe: 'How many releases of changelog you want to generate. It counts from the upcoming release. Useful when you forgot to generate any previous changelog. Set to 0 to regenerate all.',
type: 'number',
default: defaults.releaseCount
})
.option('tag-force', {

@@ -78,0 +83,0 @@ describe: 'Allow tag replacement',

1

defaults.js

@@ -11,2 +11,3 @@ const spec = require('conventional-changelog-config-spec')

tagPrefix: 'v',
releaseCount: 1,
scripts: {},

@@ -13,0 +14,0 @@ skip: {},

7

lib/lifecycles/changelog.js

@@ -26,3 +26,3 @@ const chalk = require('chalk')

let oldContent = args.dryRun ? '' : fs.readFileSync(args.infile, 'utf-8')
let oldContent = args.dryRun || args.releaseCount === 0 ? '' : fs.readFileSync(args.infile, 'utf-8')
const oldContentStart = oldContent.search(START_OF_LAST_RELEASE_PATTERN)

@@ -38,4 +38,5 @@ // find the position of the last release and remove header:

preset: presetLoader(args),
tagPrefix: args.tagPrefix
}, context, { merges: null, path: args.path }, args.parserOpts, args.writerOpts)
tagPrefix: args.tagPrefix,
releaseCount: args.releaseCount
}, context, { merges: null, path: args.path, showSignature: false }, args.parserOpts, args.writerOpts)
.on('error', function (err) {

@@ -42,0 +43,0 @@ return reject(err)

{
"name": "commit-and-tag-version",
"version": "11.0.0",
"version": "11.1.0",
"description": "replacement for `npm version` with automatic CHANGELOG generation",

@@ -5,0 +5,0 @@ "bin": "bin/cli.js",

@@ -346,2 +346,23 @@ # Commit and Tag Version

### Generate changelogs for old releases
Normally only the changelog for the last release will be generated and prepended to the `changelog.md`. If you want to generate changelogs for previous releases you can do so by setting the `releaseCount` option like described [here](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-core#releasecount).
When setting releaseCount=0 the whole changelog gets regenerated and replaced.
You can set the option either in the`.versionrc` file or inside `package.json` like below
```json
//.versionrc
{
"releaseCount": 0
}
//package.json
"commit-and-tag-version": {
"releaseCount": 0
}
```
### CLI Help

@@ -348,0 +369,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