MCPcopy Create free account
hub / github.com/Automattic/mongoose / getCurrentVersion

Function getCurrentVersion

scripts/website.js:294–304  ·  view source on GitHub ↗

* Try to get the current version on the checked-out branch * @returns {Version}

()

Source from the content-addressed store, hash-verified

292 * @returns {Version}
293 */
294function getCurrentVersion() {
295 let versionToUse = pkg.version;
296
297 // i dont think this will ever happen, but just in case
298 if (!pkg.version) {
299 console.log('no version from package?');
300 versionToUse = getLatestVersion();
301 }
302
303 return { listed: versionToUse, path: stringifySemverNumber(parseVersion(versionToUse), true) };
304}
305
306// execute function to get all tags from git
307getVersions();

Callers 1

website.jsFile · 0.85

Calls 3

getLatestVersionFunction · 0.85
stringifySemverNumberFunction · 0.85
parseVersionFunction · 0.85

Tested by

no test coverage detected