@embroider/shared-internals
Advanced tools
Comparing version 0.42.3 to 0.43.0
{ | ||
"name": "@embroider/shared-internals", | ||
"version": "0.42.3", | ||
"version": "0.43.0", | ||
"private": false, | ||
@@ -32,3 +32,2 @@ "description": "Utilities shared among the other embroider packages", | ||
"resolve-package-path": "^4.0.1", | ||
"pkg-up": "^3.1.0", | ||
"typescript-memoize": "^1.0.1", | ||
@@ -35,0 +34,0 @@ "fs-extra": "^9.1.0", |
@@ -10,3 +10,3 @@ declare type Filename = string; | ||
isParallelSafe: boolean; | ||
majorVersion: 6 | 7; | ||
majorVersion: 7; | ||
fileFilter: string; | ||
@@ -13,0 +13,0 @@ }; |
@@ -11,3 +11,2 @@ "use strict"; | ||
const path_1 = require("path"); | ||
const pkg_up_1 = require("pkg-up"); | ||
class PackageCache { | ||
@@ -64,3 +63,3 @@ constructor() { | ||
// at or above the file. | ||
for (let length = segments.length - 1; length >= 0; length--) { | ||
for (let length = segments.length; length >= 0; length--) { | ||
if (segments[length - 1] === 'node_modules') { | ||
@@ -71,11 +70,11 @@ // once we hit a node_modules, we're leaving the package we were in, so | ||
} | ||
let candidate = segments.slice(0, length).join(path_1.sep); | ||
let usedSegments = segments.slice(0, length); | ||
let candidate = usedSegments.join(path_1.sep); | ||
if (this.rootCache.has(candidate)) { | ||
return this.rootCache.get(candidate); | ||
} | ||
if (fs_1.existsSync([...usedSegments, 'package.json'].join(path_1.sep))) { | ||
return this.get(candidate); | ||
} | ||
} | ||
let packageJSONPath = pkg_up_1.sync({ cwd: filename }); | ||
if (packageJSONPath) { | ||
return this.get(path_1.dirname(packageJSONPath)); | ||
} | ||
} | ||
@@ -82,0 +81,0 @@ // register to be shared as the per-process package cache with the given name |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6
44848
712
- Removedpkg-up@^3.1.0
- Removedfind-up@3.0.0(transitive)
- Removedlocate-path@3.0.0(transitive)
- Removedp-limit@2.3.0(transitive)
- Removedp-locate@3.0.0(transitive)
- Removedp-try@2.2.0(transitive)
- Removedpath-exists@3.0.0(transitive)
- Removedpkg-up@3.1.0(transitive)