Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
tagged-versions
Advanced tools
Get tagged semver-compatible project versions [{ version, tag, hash, date }]
npm install tagged-versions --save
Supported Node versions: 5+
Return all the tagged project versions:
const taggedVersions = require('tagged-versions');
return taggedVersions.getList()
.then(versions => console.log(versions));
// [
// { version: '1.2.0', tag: 'v1.2.0', hash: 'f6bf448b02c489c8676f2eeaaac72ef93980baf2', date: <Date> },
// { version: '1.1.1', tag: 'v1.1.1', hash: 'b656238b0fc2502b19bd0e803eb87447840dc52a', date: <Date> },
// { version: '1.1.0', tag: 'v1.1.0', hash: '1d56b88b0fc2585ffaf43e416b87440667c3c53f', date: <Date> },
// { version: '1.0.0', tag: 'v1.0.0', hash: '06743d3f902b19bd0e802e40462d87ba2b05740d', date: <Date> },
// ]
You can optionally filter versions with a semver range:
const taggedVersions = require('tagged-versions');
return taggedVersions.getList('^1.1.0')
.then(versions => console.log(versions));
// [
// { version: '1.2.0', tag: 'v1.2.0', hash: 'f6bf448b02c489c8676f2eeaaac72ef93980baf2', date: <Date> },
// { version: '1.1.1', tag: 'v1.1.1', hash: 'b656238b0fc2502b19bd0e803eb87447840dc52a', date: <Date> },
// { version: '1.1.0', tag: 'v1.1.0', hash: '1d56b88b0fc2585ffaf43e416b87440667c3c53f', date: <Date> },
// ]
Or with a revision range:
const taggedVersions = require('tagged-versions');
return taggedVersions.getList({rev: 'v1.1.0..v1.2.0'})
.then(versions => console.log(versions));
// [
// { version: '1.2.0', tag: 'v1.2.0', hash: 'f6bf448b02c489c8676f2eeaaac72ef93980baf2', date: <Date> },
// { version: '1.1.1', tag: 'v1.1.1', hash: 'b656238b0fc2502b19bd0e803eb87447840dc52a', date: <Date> }
// ]
Return the last tagged project version:
const taggedVersions = require('tagged-versions');
return taggedVersions.getLastVersion()
.then(versions => console.log(version));
// {
// version: '1.2.0',
// tag: 'v1.2.0',
// hash: 'f6bf448b02c489c8676f2eeaaac72ef93980baf2',
// date: new Date('2016-10-08T10:47:01.000Z')
// }
Like with getList
, you can also filter with a semver range:
const taggedVersions = require('tagged-versions');
return taggedVersions.getLastVersion('~1.1')
.then(versions => console.log(version));
// {
// version: '1.1.1',
// tag: 'v1.1.1',
// hash: 'b656238b0fc2502b19bd0e803eb87447840dc52a',
// date: new Date('2016-10-01T16:34:24.000Z')
// }
Please follow the Airbnb guidelines and commit your changes with commitzen using git cz
.
FAQs
Get tagged semver-compatible project versions
We found that tagged-versions demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.