Sha256: e2fb532ac667d1d3ec6506ec095df7e61be129a740092ecaa74cde14d4e0071b
Contents?: true
Size: 1.21 KB
Versions: 4
Compression:
Stored size: 1.21 KB
Contents
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = _default; var _module = require("module"); const path = require("path"); function _default(moduleName, dirname, absoluteRuntime) { if (absoluteRuntime === false) return moduleName; return resolveAbsoluteRuntime(moduleName, path.resolve(dirname, absoluteRuntime === true ? "." : absoluteRuntime)); } function resolveAbsoluteRuntime(moduleName, dirname) { try { return path.dirname((((v, w) => (v = v.split("."), w = w.split("."), +v[0] > +w[0] || v[0] == w[0] && +v[1] >= +w[1]))(process.versions.node, "8.9") ? require.resolve : (r, { paths: [b] }, M = require("module")) => { let f = M._findPath(r, M._nodeModulePaths(b).concat(b)); if (f) return f; f = new Error(`Cannot resolve module '${r}'`); f.code = "MODULE_NOT_FOUND"; throw f; })(`${moduleName}/package.json`, { paths: [dirname] })).replace(/\\/g, "/"); } catch (err) { if (err.code !== "MODULE_NOT_FOUND") throw err; throw Object.assign(new Error(`Failed to resolve "${moduleName}" relative to "${dirname}"`), { code: "BABEL_RUNTIME_NOT_FOUND", runtime: moduleName, dirname }); } }
Version data entries
4 entries across 3 versions & 2 rubygems