Sha256: 767de46568db4c4c4c91d6cdaca95faa7d92cff2ffa357ec3afb2f075ed95897
Contents?: true
Size: 1.96 KB
Versions: 26
Compression:
Stored size: 1.96 KB
Contents
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getNewestEspreeKind = exports.getEspree = void 0; const require_utils_1 = require("./require-utils"); const semver_1 = require("semver"); let espreeCache = null; function getEspree() { if (!espreeCache) { espreeCache = (0, require_utils_1.loadNewest)([ { getPkg() { return (0, require_utils_1.requireFromCwd)("espree/package.json"); }, get() { return (0, require_utils_1.requireFromCwd)("espree"); }, }, { getPkg() { return (0, require_utils_1.requireFromLinter)("espree/package.json"); }, get() { return (0, require_utils_1.requireFromLinter)("espree"); }, }, { getPkg() { return require("espree/package.json"); }, get() { return require("espree"); }, }, ]); } return espreeCache; } exports.getEspree = getEspree; let kindCache = null; function getNewestEspreeKind() { if (kindCache) { return kindCache; } const cwdPkg = (0, require_utils_1.requireFromCwd)("espree/package.json"); const linterPkg = (0, require_utils_1.requireFromLinter)("espree/package.json"); const self = require("espree/package.json"); let target = { kind: "self", version: self.version, }; if (cwdPkg != null && (0, semver_1.lte)(target.version, cwdPkg.version)) { target = { kind: "cwd", version: cwdPkg.version }; } if (linterPkg != null && (0, semver_1.lte)(target.version, linterPkg.version)) { target = { kind: "linter", version: linterPkg.version }; } return (kindCache = target.kind); } exports.getNewestEspreeKind = getNewestEspreeKind;
Version data entries
26 entries across 26 versions & 1 rubygems