@embroider/shared-internals
Advanced tools
Comparing version 0.44.1 to 0.44.2
{ | ||
"name": "@embroider/shared-internals", | ||
"version": "0.44.1", | ||
"version": "0.44.2", | ||
"private": false, | ||
@@ -43,3 +43,3 @@ "description": "Utilities shared among the other embroider packages", | ||
"tmp": "^0.1.0", | ||
"typescript": "~4.0.0" | ||
"typescript": "*" | ||
}, | ||
@@ -46,0 +46,0 @@ "engines": { |
@@ -12,3 +12,3 @@ "use strict"; | ||
static shared(identifier) { | ||
return get_or_create_1.getOrCreate(shared, identifier, () => new PackageCache()); | ||
return (0, get_or_create_1.getOrCreate)(shared, identifier, () => new PackageCache()); | ||
} | ||
@@ -15,0 +15,0 @@ } |
@@ -31,3 +31,3 @@ "use strict"; | ||
// breaking the deeper v2 addon. | ||
exports.emberVirtualPeerDeps = new Set(['@glimmer/component']); | ||
exports.emberVirtualPeerDeps = new Set(['@glimmer/component', '@glimmer/tracking']); | ||
// this is a real package, even though it's still listed in rfc176 | ||
@@ -34,0 +34,0 @@ exports.emberVirtualPackages.delete('@ember/string'); |
@@ -17,6 +17,6 @@ "use strict"; | ||
resolve(packageName, fromPackage) { | ||
let cache = get_or_create_1.getOrCreate(this.resolutionCache, fromPackage, () => new Map()); | ||
let result = get_or_create_1.getOrCreate(cache, packageName, () => { | ||
let cache = (0, get_or_create_1.getOrCreate)(this.resolutionCache, fromPackage, () => new Map()); | ||
let result = (0, get_or_create_1.getOrCreate)(cache, packageName, () => { | ||
// the type cast is needed because resolvePackagePath itself is erroneously typed as `any`. | ||
let packagePath = resolve_package_path_1.default(packageName, this.basedir(fromPackage)); | ||
let packagePath = (0, resolve_package_path_1.default)(packageName, this.basedir(fromPackage)); | ||
if (!packagePath) { | ||
@@ -27,3 +27,3 @@ // this gets our null into the cache so we don't keep trying to resolve | ||
} | ||
return this.get(path_1.dirname(packagePath)); | ||
return this.get((0, path_1.dirname)(packagePath)); | ||
}); | ||
@@ -38,4 +38,4 @@ if (!result) { | ||
getApp(packageRoot) { | ||
let root = fs_1.realpathSync(packageRoot); | ||
let p = get_or_create_1.getOrCreate(this.rootCache, root, () => { | ||
let root = (0, fs_1.realpathSync)(packageRoot); | ||
let p = (0, get_or_create_1.getOrCreate)(this.rootCache, root, () => { | ||
return new package_1.default(root, this, true); | ||
@@ -55,4 +55,4 @@ }); | ||
get(packageRoot) { | ||
let root = fs_1.realpathSync(packageRoot); | ||
let p = get_or_create_1.getOrCreate(this.rootCache, root, () => { | ||
let root = (0, fs_1.realpathSync)(packageRoot); | ||
let p = (0, get_or_create_1.getOrCreate)(this.rootCache, root, () => { | ||
return new package_1.default(root, this); | ||
@@ -77,3 +77,3 @@ }); | ||
} | ||
if (fs_1.existsSync([...usedSegments, 'package.json'].join(path_1.sep))) { | ||
if ((0, fs_1.existsSync)([...usedSegments, 'package.json'].join(path_1.sep))) { | ||
return this.get(candidate); | ||
@@ -88,3 +88,3 @@ } | ||
static shared(identifier) { | ||
return get_or_create_1.getOrCreate(shared, identifier, () => new PackageCache()); | ||
return (0, get_or_create_1.getOrCreate)(shared, identifier, () => new PackageCache()); | ||
} | ||
@@ -91,0 +91,0 @@ } |
@@ -5,3 +5,3 @@ "use strict"; | ||
function absolutePackageName(specifier) { | ||
if (specifier[0] === '.' || path_1.isAbsolute(specifier)) { | ||
if (specifier[0] === '.' || (0, path_1.isAbsolute)(specifier)) { | ||
// Not an absolute specifier | ||
@@ -8,0 +8,0 @@ return; |
@@ -37,3 +37,3 @@ "use strict"; | ||
get internalPackageJSON() { | ||
return JSON.parse(fs_extra_1.readFileSync(path_1.join(this.root, 'package.json'), 'utf8')); | ||
return JSON.parse((0, fs_extra_1.readFileSync)((0, path_1.join)(this.root, 'package.json'), 'utf8')); | ||
} | ||
@@ -70,6 +70,6 @@ get packageJSON() { | ||
isLazyEngine() { | ||
return this.isEngine() && get_1.default(this.packageJSON, 'ember-addon.lazy-engine'); | ||
return this.isEngine() && (0, get_1.default)(this.packageJSON, 'ember-addon.lazy-engine'); | ||
} | ||
isV2Ember() { | ||
return this.isEmberPackage() && get_1.default(this.packageJSON, 'ember-addon.version') === 2; | ||
return this.isEmberPackage() && (0, get_1.default)(this.packageJSON, 'ember-addon.version') === 2; | ||
} | ||
@@ -134,3 +134,3 @@ isV2App() { | ||
try { | ||
pkg = this.packageCache.get(path_1.join(this.packageCache.basedir(this), path)); | ||
pkg = this.packageCache.get((0, path_1.join)(this.packageCache.basedir(this), path)); | ||
} | ||
@@ -145,7 +145,7 @@ catch (err) { | ||
} | ||
else if (!path_1.extname(main)) { | ||
else if (!(0, path_1.extname)(main)) { | ||
main = `${main}.js`; | ||
} | ||
let mainPath = path_1.join(this.packageCache.basedir(this), path, main); | ||
if (!fs_extra_1.existsSync(mainPath)) { | ||
let mainPath = (0, path_1.join)(this.packageCache.basedir(this), path, main); | ||
if (!(0, fs_extra_1.existsSync)(mainPath)) { | ||
// package has no valid main | ||
@@ -160,3 +160,3 @@ return false; | ||
get dependencies() { | ||
let names = flatMap_1.default(this.dependencyKeys, key => Object.keys(this.packageJSON[key] || {})); | ||
let names = (0, flatMap_1.default)(this.dependencyKeys, key => Object.keys(this.packageJSON[key] || {})); | ||
return names | ||
@@ -199,14 +199,14 @@ .map(name => { | ||
__decorate([ | ||
typescript_memoize_1.Memoize() | ||
(0, typescript_memoize_1.Memoize)() | ||
], Package.prototype, "internalPackageJSON", null); | ||
__decorate([ | ||
typescript_memoize_1.Memoize() | ||
(0, typescript_memoize_1.Memoize)() | ||
], Package.prototype, "packageJSON", null); | ||
__decorate([ | ||
typescript_memoize_1.Memoize() | ||
(0, typescript_memoize_1.Memoize)() | ||
], Package.prototype, "nonResolvableDeps", null); | ||
__decorate([ | ||
typescript_memoize_1.Memoize() | ||
(0, typescript_memoize_1.Memoize)() | ||
], Package.prototype, "dependencies", null); | ||
exports.default = Package; | ||
//# sourceMappingURL=package.js.map |
@@ -12,7 +12,7 @@ "use strict"; | ||
function explicitRelative(fromDir, toFile) { | ||
let result = path_1.join(path_1.relative(fromDir, path_1.dirname(toFile)), path_1.basename(toFile)); | ||
if (!path_1.isAbsolute(result) && !result.startsWith('.')) { | ||
let result = (0, path_1.join)((0, path_1.relative)(fromDir, (0, path_1.dirname)(toFile)), (0, path_1.basename)(toFile)); | ||
if (!(0, path_1.isAbsolute)(result) && !result.startsWith('.')) { | ||
result = './' + result; | ||
} | ||
if (path_1.isAbsolute(toFile) && result.endsWith(toFile)) { | ||
if ((0, path_1.isAbsolute)(toFile) && result.endsWith(toFile)) { | ||
// this prevents silly "relative" paths like | ||
@@ -19,0 +19,0 @@ // "../../../../../Users/you/projects/your/stuff" when we could have just |
@@ -14,3 +14,3 @@ "use strict"; | ||
// here should be safe. | ||
exports.default = fs_extra_1.realpathSync(os_1.tmpdir()); | ||
exports.default = (0, fs_extra_1.realpathSync)((0, os_1.tmpdir)()); | ||
//# sourceMappingURL=tmpdir.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
73484