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

Function getCurrentVersion

scripts/website.js:289–299  ·  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

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

Callers 1

website.jsFile · 0.85

Calls 3

getLatestVersionFunction · 0.85
stringifySemverNumberFunction · 0.85
parseVersionFunction · 0.85

Tested by

no test coverage detected