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

Function getCurrentVersion

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

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

Callers 1

website.jsFile · 0.85

Calls 3

getLatestVersionFunction · 0.85
stringifySemverNumberFunction · 0.85
parseVersionFunction · 0.85

Tested by

no test coverage detected