@embroider/shared-internals
Advanced tools
Comparing version 2.2.1-unstable.53de9f9 to 2.2.1-unstable.7bd035f
{ | ||
"name": "@embroider/shared-internals", | ||
"version": "2.2.1-unstable.53de9f9", | ||
"version": "2.2.1-unstable.7bd035f", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "description": "Utilities shared among the other embroider packages", |
@@ -40,2 +40,6 @@ "use strict"; | ||
exports.emberVirtualPackages.add('@ember/owner'); | ||
// these are not public API but they're included in ember-source, so for | ||
// correctness we still want to understand that they come from there. | ||
exports.emberVirtualPackages.add('@glimmer/validator'); | ||
exports.emberVirtualPackages.add('@glimmer/manager'); | ||
// These are the known names that people use to import template precomiplation | ||
@@ -42,0 +46,0 @@ // macros from. |
@@ -11,3 +11,3 @@ "use strict"; | ||
let optsSource = ''; | ||
if (options === null || options === void 0 ? void 0 : options.filename) { | ||
if (options?.filename) { | ||
let filename = options.filename; | ||
@@ -14,0 +14,0 @@ let { compatModuleNaming: renaming } = options; |
@@ -123,3 +123,2 @@ "use strict"; | ||
.map((path) => { | ||
var _a; | ||
// ember-cli gives a warning if the path specifies an invalid, malformed or missing addon. the logic for invalidating an addon is: | ||
@@ -135,3 +134,3 @@ // https://github.com/ember-cli/ember-cli/blob/627934f91b2aa0e19b041fdb1b547873c1855793/lib/models/package-info-cache/index.js#L427 | ||
pkg = this.packageCache.get((0, path_1.join)(this.root, path)); | ||
main = ((_a = pkg.packageJSON['ember-addon']) === null || _a === void 0 ? void 0 : _a.main) || pkg.packageJSON['main']; | ||
main = pkg.packageJSON['ember-addon']?.main || pkg.packageJSON['main']; | ||
} | ||
@@ -138,0 +137,0 @@ catch (err) { |
@@ -18,3 +18,2 @@ "use strict"; | ||
enter(path, state) { | ||
var _a; | ||
state.adder = new babel_import_util_1.ImportUtil(t, path); | ||
@@ -28,3 +27,3 @@ let filename = path.hub.file.opts.filename; | ||
} | ||
let extensions = (_a = state.opts.templateExtensions) !== null && _a !== void 0 ? _a : ['.hbs']; | ||
let extensions = state.opts.templateExtensions ?? ['.hbs']; | ||
for (let ext of extensions) { | ||
@@ -47,3 +46,2 @@ let hbsFilename = filename.replace(/\.\w{1,3}$/, '') + ext; | ||
ExportDefaultDeclaration(path, state) { | ||
var _a; | ||
let template = getTemplate(path, state); | ||
@@ -61,3 +59,3 @@ if (!template) { | ||
template, | ||
t.classExpression(null, declaration.superClass, declaration.body, (_a = declaration.decorators) !== null && _a !== void 0 ? _a : []), | ||
t.classExpression(null, declaration.superClass, declaration.body, declaration.decorators ?? []), | ||
]); | ||
@@ -64,0 +62,0 @@ } |
@@ -10,3 +10,2 @@ "use strict"; | ||
function locateEmbroiderWorkingDir(appRoot) { | ||
var _a; | ||
if (cache.has(appRoot)) { | ||
@@ -27,3 +26,3 @@ return cache.get(appRoot); | ||
let pkg = (0, fs_extra_1.readJSONSync)((0, path_1.resolve)(appRoot, '..', '..', 'package.json')); | ||
if ((_a = pkg.keywords) === null || _a === void 0 ? void 0 : _a.includes('ember-addon')) { | ||
if (pkg.keywords?.includes('ember-addon')) { | ||
let path = (0, path_1.resolve)(appRoot, '..', '..', 'node_modules', '.embroider'); | ||
@@ -30,0 +29,0 @@ cache.set(appRoot, path); |
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
132983