@immobiliarelabs/standard-version
Advanced tools
Comparing version 10.2.2 to 10.3.0
@@ -0,1 +1,8 @@ | ||
# [10.3.0](https://github.com/immobiliare/standard-version/compare/v10.2.2...v10.3.0) (2024-03-06) | ||
### Features | ||
* add template updater ([5b8f5b1](https://github.com/immobiliare/standard-version/commit/5b8f5b1b7a50da578e90803bc9814aa983fad622)) | ||
## [10.2.2](https://github.com/immobiliare/standard-version/compare/v10.2.1...v10.2.2) (2023-11-08) | ||
@@ -2,0 +9,0 @@ |
@@ -167,6 +167,16 @@ 'use strict'; | ||
if (dotgit.ignore(configPath)) return; | ||
const stat = fs.lstatSync(configPath); | ||
let contents; | ||
/** | ||
* `data` field is used to pass raw file contents. It's uswfule to pass | ||
* template strings to compile with Handlebars, but it could also be used | ||
* for other use cases. | ||
*/ | ||
if (!updater.data) { | ||
const stat = fs.lstatSync(configPath); | ||
if (!stat.isFile()) return; | ||
const contents = fs.readFileSync(configPath, 'utf8'); | ||
if (!stat.isFile()) return; | ||
contents = fs.readFileSync(configPath, 'utf8'); | ||
} else { | ||
contents = updater.data; | ||
} | ||
checkpoint( | ||
@@ -173,0 +183,0 @@ args, |
@@ -6,2 +6,3 @@ const path = require('path'); | ||
'plain-text': require('./types/plain-text'), | ||
template: require('./types/template'), | ||
}; | ||
@@ -8,0 +9,0 @@ const PLAIN_TEXT_BUMP_FILES = ['VERSION.txt', 'version.txt']; |
{ | ||
"name": "@immobiliarelabs/standard-version", | ||
"version": "10.2.2", | ||
"version": "10.3.0", | ||
"description": "replacement for `npm version` with automatic CHANGELOG generation", | ||
@@ -63,2 +63,3 @@ "bin": "bin/cli.js", | ||
"git-semver-tags": "^7.0.1", | ||
"handlebars": "^4.7.8", | ||
"semver": "^7.1.1", | ||
@@ -65,0 +66,0 @@ "stringify-package": "^1.0.1", |
@@ -74,2 +74,8 @@ /* global describe it beforeEach afterEach */ | ||
mockery.registerMock('git-semver-tags', function (opts, cb) { | ||
if (!cb || typeof opts !== 'function') { | ||
return new Promise((resolve, reject) => { | ||
if (tags instanceof Error) reject(tags); | ||
else resolve(tags || []); | ||
}); | ||
} | ||
if (typeof opts === 'function') cb = opts; | ||
@@ -76,0 +82,0 @@ if (tags instanceof Error) cb(tags); |
Sorry, the diff of this file is not supported yet
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
146793
53
2457
15
+ Addedhandlebars@^4.7.8