diff --git a/.pnp.cjs b/.pnp.cjs index 0c738e7..4d78c5b 100755 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -31,7 +31,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@popperjs/core", "npm:2.11.8"],\ ["bootstrap", "virtual:f07b1648c101a0421cada5316861e2a7e02806a676c7a965e963127f1fc146d22af54dbeb4d404f6d1f6045fc69c82318c44e1bb8d5f7f36b54dd4a38d74bcf7#npm:5.3.0"],\ ["clipboardy", "npm:3.0.0"],\ - ["cytoscape", "npm:3.25.0"],\ + ["cytoscape", "npm:3.25.1"],\ ["react", "npm:18.2.0"],\ ["react-bootstrap", "virtual:f07b1648c101a0421cada5316861e2a7e02806a676c7a965e963127f1fc146d22af54dbeb4d404f6d1f6045fc69c82318c44e1bb8d5f7f36b54dd4a38d74bcf7#npm:2.8.0"],\ ["react-cytoscapejs", "virtual:f07b1648c101a0421cada5316861e2a7e02806a676c7a965e963127f1fc146d22af54dbeb4d404f6d1f6045fc69c82318c44e1bb8d5f7f36b54dd4a38d74bcf7#npm:2.0.0"],\ @@ -5985,7 +5985,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["@popperjs/core", "npm:2.11.8"],\ ["bootstrap", "virtual:f07b1648c101a0421cada5316861e2a7e02806a676c7a965e963127f1fc146d22af54dbeb4d404f6d1f6045fc69c82318c44e1bb8d5f7f36b54dd4a38d74bcf7#npm:5.3.0"],\ ["clipboardy", "npm:3.0.0"],\ - ["cytoscape", "npm:3.25.0"],\ + ["cytoscape", "npm:3.25.1"],\ ["react", "npm:18.2.0"],\ ["react-bootstrap", "virtual:f07b1648c101a0421cada5316861e2a7e02806a676c7a965e963127f1fc146d22af54dbeb4d404f6d1f6045fc69c82318c44e1bb8d5f7f36b54dd4a38d74bcf7#npm:2.8.0"],\ ["react-cytoscapejs", "virtual:f07b1648c101a0421cada5316861e2a7e02806a676c7a965e963127f1fc146d22af54dbeb4d404f6d1f6045fc69c82318c44e1bb8d5f7f36b54dd4a38d74bcf7#npm:2.0.0"],\ @@ -7212,10 +7212,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { }]\ ]],\ ["cytoscape", [\ - ["npm:3.25.0", {\ - "packageLocation": "./.yarn/cache/cytoscape-npm-3.25.0-73ca7c61ad-514ea396d9.zip/node_modules/cytoscape/",\ + ["npm:3.25.1", {\ + "packageLocation": "./.yarn/cache/cytoscape-npm-3.25.1-98f0ac18f7-1dd773dbf4.zip/node_modules/cytoscape/",\ "packageDependencies": [\ - ["cytoscape", "npm:3.25.0"],\ + ["cytoscape", "npm:3.25.1"],\ ["heap", "npm:0.2.7"],\ ["lodash", "npm:4.17.21"]\ ],\ @@ -14531,7 +14531,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) { ["react-cytoscapejs", "virtual:f07b1648c101a0421cada5316861e2a7e02806a676c7a965e963127f1fc146d22af54dbeb4d404f6d1f6045fc69c82318c44e1bb8d5f7f36b54dd4a38d74bcf7#npm:2.0.0"],\ ["@types/cytoscape", null],\ ["@types/react", null],\ - ["cytoscape", "npm:3.25.0"],\ + ["cytoscape", "npm:3.25.1"],\ ["prop-types", "npm:15.8.1"],\ ["react", "npm:18.2.0"]\ ],\ @@ -26322,7 +26322,6 @@ function reportRequiredFilesToWatchMode(files) { } function applyPatch(pnpapi, opts) { - const defaultCache = {}; let enableNativeHooks = true; process.versions.pnp = String(pnpapi.VERSIONS.std); const moduleExports = require$$0__default.default; @@ -26342,62 +26341,13 @@ function applyPatch(pnpapi, opts) { } const originalModuleLoad = require$$0.Module._load; require$$0.Module._load = function(request, parent, isMain) { - if (!enableNativeHooks) - return originalModuleLoad.call(require$$0.Module, request, parent, isMain); - if (isBuiltinModule(request)) { - try { - enableNativeHooks = false; - return originalModuleLoad.call(require$$0.Module, request, parent, isMain); - } finally { - enableNativeHooks = true; - } - } - const parentApiPath = opts.manager.getApiPathFromParent(parent); - const parentApi = parentApiPath !== null ? opts.manager.getApiEntry(parentApiPath, true).instance : null; - if (parentApi === null) - return originalModuleLoad(request, parent, isMain); - if (request === `pnpapi`) - return parentApi; - const modulePath = require$$0.Module._resolveFilename(request, parent, isMain); - const isOwnedByRuntime = parentApi !== null ? parentApi.findPackageLocator(modulePath) !== null : false; - const moduleApiPath = isOwnedByRuntime ? parentApiPath : opts.manager.findApiPathFor(npath.dirname(modulePath)); - const entry = moduleApiPath !== null ? opts.manager.getApiEntry(moduleApiPath) : { instance: null, cache: defaultCache }; - const cacheEntry = entry.cache[modulePath]; - if (cacheEntry) { - if (cacheEntry.loaded === false && cacheEntry.isLoading !== true) { - try { - cacheEntry.isLoading = true; - if (isMain) { - process.mainModule = cacheEntry; - cacheEntry.id = `.`; - } - cacheEntry.load(modulePath); - } finally { - cacheEntry.isLoading = false; - } - } - return cacheEntry.exports; - } - const module = new require$$0.Module(modulePath, parent != null ? parent : void 0); - module.pnpApiPath = moduleApiPath; - reportRequiredFilesToWatchMode([modulePath]); - entry.cache[modulePath] = module; - if (isMain) { - process.mainModule = module; - module.id = `.`; - } - let hasThrown = true; - try { - module.isLoading = true; - module.load(modulePath); - hasThrown = false; - } finally { - module.isLoading = false; - if (hasThrown) { - delete require$$0.Module._cache[modulePath]; + if (request === `pnpapi`) { + const parentApiPath = opts.manager.getApiPathFromParent(parent); + if (parentApiPath) { + return opts.manager.getApiEntry(parentApiPath, true).instance; } } - return module.exports; + return originalModuleLoad.call(require$$0.Module, request, parent, isMain); }; function getIssuerSpecsFromPaths(paths) { return paths.map((path) => ({ @@ -26465,7 +26415,7 @@ function applyPatch(pnpapi, opts) { const parentDirectory = (parent == null ? void 0 : parent.filename) != null ? npath.dirname(parent.filename) : null; const absoluteRequest = npath.isAbsolute(request) ? request : parentDirectory !== null ? npath.resolve(parentDirectory, request) : null; if (absoluteRequest !== null) { - const apiPath = parentDirectory === npath.dirname(absoluteRequest) && (parent == null ? void 0 : parent.pnpApiPath) ? parent.pnpApiPath : opts.manager.findApiPathFor(absoluteRequest); + const apiPath = parent && parentDirectory === npath.dirname(absoluteRequest) ? opts.manager.getApiPathFromParent(parent) : opts.manager.findApiPathFor(absoluteRequest); if (apiPath !== null) { issuerSpecs.unshift({ apiPath, @@ -28186,7 +28136,6 @@ function makeManager(pnpapi, opts) { const initialApiStats = opts.fakeFs.statSync(npath.toPortablePath(initialApiPath)); const apiMetadata = /* @__PURE__ */ new Map([ [initialApiPath, { - cache: require$$0.Module._cache, instance: pnpapi, stats: initialApiStats, lastRefreshCheck: Date.now() @@ -28218,7 +28167,6 @@ function makeManager(pnpapi, opts) { } } else { apiMetadata.set(pnpApiPath, apiEntry = { - cache: {}, instance: loadApiInstance(pnpApiPath), stats: opts.fakeFs.statSync(pnpApiPath), lastRefreshCheck: Date.now() @@ -28288,19 +28236,16 @@ ${controlSegment} } while (curr !== PortablePath.root); return addToCacheAndReturn(start, curr, null); } + const moduleToApiPathCache = /* @__PURE__ */ new WeakMap(); function getApiPathFromParent(parent) { if (parent == null) return initialApiPath; - if (typeof parent.pnpApiPath === `undefined`) { - if (parent.filename !== null) { - return parent.pnpApiPath = findApiPathFor(parent.filename); - } else { - return initialApiPath; - } - } - if (parent.pnpApiPath !== null) - return parent.pnpApiPath; - return null; + let apiPath = moduleToApiPathCache.get(parent); + if (typeof apiPath !== `undefined`) + return apiPath; + apiPath = parent.filename ? findApiPathFor(parent.filename) : null; + moduleToApiPathCache.set(parent, apiPath); + return apiPath; } return { getApiPathFromParent, diff --git a/.yarn/cache/cytoscape-npm-3.25.0-73ca7c61ad-514ea396d9.zip b/.yarn/cache/cytoscape-npm-3.25.1-98f0ac18f7-1dd773dbf4.zip similarity index 83% rename from .yarn/cache/cytoscape-npm-3.25.0-73ca7c61ad-514ea396d9.zip rename to .yarn/cache/cytoscape-npm-3.25.1-98f0ac18f7-1dd773dbf4.zip index afddc2e..36251a6 100644 Binary files a/.yarn/cache/cytoscape-npm-3.25.0-73ca7c61ad-514ea396d9.zip and b/.yarn/cache/cytoscape-npm-3.25.1-98f0ac18f7-1dd773dbf4.zip differ diff --git a/yarn.lock b/yarn.lock index 00af018..94ff915 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4842,12 +4842,12 @@ __metadata: linkType: hard "cytoscape@npm:^3.25.0": - version: 3.25.0 - resolution: "cytoscape@npm:3.25.0" + version: 3.25.1 + resolution: "cytoscape@npm:3.25.1" dependencies: heap: ^0.2.6 lodash: ^4.17.21 - checksum: 514ea396d90b16ffb6decff0ef1e790b9c35fbdfe3e842a56705d87e5d0a0ed78c94a5e7b66a93596245473868c46d4396886d940688e73a4d418701ac5caa34 + checksum: 1dd773dbf42813feb22418da95f403064650a3c2c29641a46856251d2ba318688522e491bab59b53529206e62cf1470c1a4744878fa0a7abba2ad6277b41d21d languageName: node linkType: hard