Socket
Socket
Sign inDemoInstall

@immobiliarelabs/standard-version

Package Overview
Dependencies
Maintainers
6
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@immobiliarelabs/standard-version - npm Package Compare versions

Comparing version 10.2.0 to 10.2.1

7

CHANGELOG.md

@@ -0,1 +1,8 @@

## [10.2.1](https://github.com/immobiliare/standard-version/compare/v10.2.0...v10.2.1) (2023-11-08)
### Bug Fixes
* **git-semver-tags:** now return promises ([87b04be](https://github.com/immobiliare/standard-version/commit/87b04be102384d56e54b8d3ee09c99dd981bcb46))
# [10.2.0](https://github.com/immobiliare/standard-version/compare/v10.1.0...v10.2.0) (2023-11-08)

@@ -2,0 +9,0 @@

62

lib/latest-semver-tag.js

@@ -13,3 +13,3 @@ const gitSemverTags = require('git-semver-tags');

function latestSemverTag(n = 1, opts) {
async function latestSemverTag(n = 1, opts) {
if (typeof n === 'object') opts = n;

@@ -25,37 +25,27 @@

);
return new Promise((resolve, reject) => {
gitSemverTags({ tagPrefix }, function (err, tags) {
if (err) {
return reject(err);
} else if (!tags.length) {
tags = tagPrefix ? [tagPrefix + '1.0.0'] : ['1.0.0'];
}
if (typeof n !== 'number' || n <= 0) n = tags.length;
// follow me on this because it ugly
return resolve(
tags
.filter((tag) => {
if (changelogIncludesPrereleases) return true;
// if returns null its not a prerelease
return semver.prerelease(tag) === null;
})
// we need to replace any custom tags prefix
.map((tag) => {
// [original, cleaned for sorting]
return {
raw: tag,
clean: clearTag(tag, tagPrefix),
};
})
// so we can sort them cronologically following semver
.sort((a, b) => semver.rcompare(a.clean, b.clean))
// then re-add prefix so we can use tags for git commands or they 404
.map(({ clean, raw }) => (withPrefix ? raw : clean))
.slice(0, n)
);
});
});
let tags = await gitSemverTags({ tagPrefix });
if (!tags.length) {
tags = tagPrefix ? [tagPrefix + '1.0.0'] : ['1.0.0'];
}
return (
tags
.filter((tag) => {
if (changelogIncludesPrereleases) return true;
// if returns null its not a prerelease
return semver.prerelease(tag) === null;
})
// we need to replace any custom tags prefix
.map((tag) => {
// [original, cleaned for sorting]
return {
raw: tag,
clean: clearTag(tag, tagPrefix),
};
})
// so we can sort them cronologically following semver
.sort((a, b) => semver.rcompare(a.clean, b.clean))
// then re-add prefix so we can use tags for git commands or they 404
.map(({ clean, raw }) => (withPrefix ? raw : clean))
.slice(0, n)
);
}

@@ -62,0 +52,0 @@

{
"name": "@immobiliarelabs/standard-version",
"version": "10.2.0",
"version": "10.2.1",
"description": "replacement for `npm version` with automatic CHANGELOG generation",

@@ -62,3 +62,3 @@ "bin": "bin/cli.js",

"find-up": "^5.0.0",
"git-semver-tags": "^4.0.0",
"git-semver-tags": "^7.0.1",
"semver": "^7.1.1",

@@ -65,0 +65,0 @@ "stringify-package": "^1.0.1",

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