@embroider/shared-internals
Advanced tools
Comparing version 2.6.2-unstable.217e7a8 to 2.6.2-unstable.4d74274
{ | ||
"name": "@embroider/shared-internals", | ||
"version": "2.6.2-unstable.217e7a8", | ||
"version": "2.6.2-unstable.4d74274", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "description": "Utilities shared among the other embroider packages", |
@@ -18,3 +18,3 @@ "use strict"; | ||
if (owner.name === pkg && (semverRange == null || semver_1.default.satisfies(owner.version, semverRange))) { | ||
if (owner.isEmberPackage()) { | ||
if (owner.isEmberAddon()) { | ||
throw new Error(`You can't use skipBabel to disable transpilation of Ember addons, it only works for non-Ember third-party packages`); | ||
@@ -21,0 +21,0 @@ } |
@@ -44,3 +44,3 @@ "use strict"; | ||
let ancestorsDep = ancestor.dependencies.find(d => d.name === dep.name); | ||
if (ancestorsDep !== dep && dep.isEmberPackage()) { | ||
if (ancestorsDep !== dep && dep.isEmberAddon()) { | ||
violations.push({ pkg, dep, ancestors, ancestor, ancestorsDep }); | ||
@@ -47,0 +47,0 @@ } |
@@ -14,3 +14,3 @@ import type { AddonMeta, AppMeta, PackageInfo } from './metadata'; | ||
get meta(): AddonMeta | AppMeta | undefined; | ||
isEmberPackage(): boolean; | ||
isEmberAddon(): boolean; | ||
isEngine(): boolean; | ||
@@ -17,0 +17,0 @@ isLazyEngine(): boolean; |
@@ -56,3 +56,3 @@ "use strict"; | ||
} | ||
isEmberPackage() { | ||
isEmberAddon() { | ||
let keywords = this.packageJSON.keywords; | ||
@@ -73,3 +73,4 @@ return Boolean(keywords && keywords.includes('ember-addon')); | ||
isV2Ember() { | ||
return this.isEmberPackage() && (0, get_1.default)(this.packageJSON, 'ember-addon.version') === 2; | ||
return ((0, get_1.default)(this.packageJSON, 'ember-addon.version') === 2 && | ||
((0, get_1.default)(this.packageJSON, 'ember-addon.type') === 'app' || this.isEmberAddon())); | ||
} | ||
@@ -76,0 +77,0 @@ isV2App() { |
@@ -172,4 +172,4 @@ "use strict"; | ||
} | ||
isEmberPackage() { | ||
return this.plainPkg.isEmberPackage(); | ||
isEmberAddon() { | ||
return this.plainPkg.isEmberAddon(); | ||
} | ||
@@ -176,0 +176,0 @@ isEngine() { |
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
157971
1583