UNPKG

jest-metadata

Version:

🦸‍♂️ Superhero power for your Jest reporters! 🦸‍♀️

14 lines 675 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getVersion = void 0; const tslib_1 = require("tslib"); const node_fs_1 = tslib_1.__importDefault(require("node:fs")); const node_path_1 = tslib_1.__importDefault(require("node:path")); const memoizeLast_1 = require("./memoizeLast"); exports.getVersion = (0, memoizeLast_1.memoizeLast)(() => { const packageJsonPath = node_path_1.default.join(__dirname, '../../package.json'); const packageJsonRaw = node_fs_1.default.readFileSync(packageJsonPath, 'utf8'); const packageJson = JSON.parse(packageJsonRaw); return packageJson.version; }); //# sourceMappingURL=getVersion.js.map