@embroider/core 0.44.0-alpha.2 → 0.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/package.json +5 -6
  2. package/src/app-differ.js +20 -20
  3. package/src/app-differ.js.map +1 -1
  4. package/src/app-files.js.map +1 -1
  5. package/src/app.js +81 -109
  6. package/src/app.js.map +1 -1
  7. package/src/asset.js.map +1 -1
  8. package/src/babel-import-adder.d.ts +11 -0
  9. package/src/babel-import-adder.js +75 -0
  10. package/src/babel-import-adder.js.map +1 -0
  11. package/src/babel-plugin-adjust-imports.d.ts +5 -6
  12. package/src/babel-plugin-adjust-imports.js +25 -24
  13. package/src/babel-plugin-adjust-imports.js.map +1 -1
  14. package/src/babel-plugin-inline-hbs-node.d.ts +9 -3
  15. package/src/babel-plugin-inline-hbs-node.js +1 -1
  16. package/src/babel-plugin-inline-hbs-node.js.map +1 -1
  17. package/src/babel-plugin-inline-hbs.d.ts +9 -7
  18. package/src/babel-plugin-inline-hbs.js +77 -39
  19. package/src/babel-plugin-inline-hbs.js.map +1 -1
  20. package/src/browser-index.js.map +1 -1
  21. package/src/build-stage.js +2 -2
  22. package/src/build-stage.js.map +1 -1
  23. package/src/describe-exports.js +6 -6
  24. package/src/describe-exports.js.map +1 -1
  25. package/src/ember-html.js +1 -1
  26. package/src/ember-html.js.map +1 -1
  27. package/src/ember-template-compiler-types.js.map +1 -1
  28. package/src/engine-mangler.js.map +1 -1
  29. package/src/html-entrypoint.js +6 -6
  30. package/src/html-entrypoint.js.map +1 -1
  31. package/src/html-placeholder.js.map +1 -1
  32. package/src/index.js.map +1 -1
  33. package/src/js-handlebars.d.ts +2 -2
  34. package/src/js-handlebars.js +5 -5
  35. package/src/js-handlebars.js.map +1 -1
  36. package/src/load-ember-template-compiler.js +6 -6
  37. package/src/load-ember-template-compiler.js.map +1 -1
  38. package/src/measure-concat.js +2 -2
  39. package/src/measure-concat.js.map +1 -1
  40. package/src/messages.js +6 -6
  41. package/src/messages.js.map +1 -1
  42. package/src/mini-modules-polyfill.d.ts +1 -1
  43. package/src/mini-modules-polyfill.js.map +1 -1
  44. package/src/multi-tree-diff.js +1 -1
  45. package/src/multi-tree-diff.js.map +1 -1
  46. package/src/options.js.map +1 -1
  47. package/src/packager.js +2 -2
  48. package/src/packager.js.map +1 -1
  49. package/src/patch-template-compiler.js +6 -5
  50. package/src/patch-template-compiler.js.map +1 -1
  51. package/src/portable-babel-config.js +1 -1
  52. package/src/portable-babel-config.js.map +1 -1
  53. package/src/portable-babel-launcher.js.map +1 -1
  54. package/src/portable.js +4 -4
  55. package/src/portable.js.map +1 -1
  56. package/src/rename-require-plugin.js.map +1 -1
  57. package/src/resolver.js.map +1 -1
  58. package/src/stage.js.map +1 -1
  59. package/src/template-colocation-plugin.d.ts +8 -9
  60. package/src/template-colocation-plugin.js +11 -5
  61. package/src/template-colocation-plugin.js.map +1 -1
  62. package/src/template-compiler-common.d.ts +1 -3
  63. package/src/template-compiler-common.js +16 -12
  64. package/src/template-compiler-common.js.map +1 -1
  65. package/src/template-compiler-node.js +10 -10
  66. package/src/template-compiler-node.js.map +1 -1
  67. package/src/to-broccoli-plugin.js.map +1 -1
  68. package/src/wait-for-trees.js.map +1 -1
  69. package/src/write-template-compiler.js +2 -2
  70. package/src/write-template-compiler.js.map +1 -1
  71. package/src/babel-plugin-inline-hbs-deps-node.d.ts +0 -14
  72. package/src/babel-plugin-inline-hbs-deps-node.js +0 -27
  73. package/src/babel-plugin-inline-hbs-deps-node.js.map +0 -1
  74. package/src/babel-plugin-inline-hbs-deps.d.ts +0 -10
  75. package/src/babel-plugin-inline-hbs-deps.js +0 -118
  76. package/src/babel-plugin-inline-hbs-deps.js.map +0 -1
  77. package/src/babel-plugin-stage1-inline-hbs-node.d.ts +0 -12
  78. package/src/babel-plugin-stage1-inline-hbs-node.js +0 -9
  79. package/src/babel-plugin-stage1-inline-hbs-node.js.map +0 -1
  80. package/src/babel-plugin-stage1-inline-hbs.d.ts +0 -9
  81. package/src/babel-plugin-stage1-inline-hbs.js +0 -96
  82. package/src/babel-plugin-stage1-inline-hbs.js.map +0 -1
package/src/app.js CHANGED
@@ -59,7 +59,7 @@ function excludeDotFiles(files) {
59
59
  exports.excludeDotFiles = excludeDotFiles;
60
60
  exports.CACHE_BUSTING_PLUGIN = {
61
61
  path: require.resolve('@embroider/shared-internals/src/babel-plugin-cache-busting.js'),
62
- version: fs_extra_1.readJSONSync(`${__dirname}/../package.json`).version,
62
+ version: (0, fs_extra_1.readJSONSync)(`${__dirname}/../package.json`).version,
63
63
  };
64
64
  function addCachablePlugin(babelConfig) {
65
65
  if (Array.isArray(babelConfig.plugins) && babelConfig.plugins.length > 0) {
@@ -76,7 +76,7 @@ function addCachablePlugin(babelConfig) {
76
76
  else {
77
77
  throw new Error(`[Embroider] a babel plugin without an absolute path was from: ${plugin}`);
78
78
  }
79
- plugins[absolutePathToPlugin] = portable_1.maybeNodeModuleVersion(absolutePathToPlugin);
79
+ plugins[absolutePathToPlugin] = (0, portable_1.maybeNodeModuleVersion)(absolutePathToPlugin);
80
80
  }
81
81
  babelConfig.plugins.push([
82
82
  exports.CACHE_BUSTING_PLUGIN.path,
@@ -147,14 +147,14 @@ class AppBuilder {
147
147
  }
148
148
  }
149
149
  get resolvableExtensionsPattern() {
150
- return shared_internals_1.extensionsPattern(this.adapter.adjustImportsOptions().resolvableExtensions);
150
+ return (0, shared_internals_1.extensionsPattern)(this.adapter.adjustImportsOptions().resolvableExtensions);
151
151
  }
152
152
  impliedAssets(type, engine, emberENV) {
153
153
  let result = this.impliedAddonAssets(type, engine).map((sourcePath) => {
154
- let stats = fs_extra_1.statSync(sourcePath);
154
+ let stats = (0, fs_extra_1.statSync)(sourcePath);
155
155
  return {
156
156
  kind: 'on-disk',
157
- relativePath: shared_internals_1.explicitRelative(this.root, sourcePath),
157
+ relativePath: (0, shared_internals_1.explicitRelative)(this.root, sourcePath),
158
158
  sourcePath,
159
159
  mtime: stats.mtimeMs,
160
160
  size: stats.size,
@@ -205,7 +205,7 @@ class AppBuilder {
205
205
  }
206
206
  impliedAddonAssets(type, engine) {
207
207
  let result = [];
208
- for (let addon of sortBy_1.default(Array.from(engine.addons), this.scriptPriority.bind(this))) {
208
+ for (let addon of (0, sortBy_1.default)(Array.from(engine.addons), this.scriptPriority.bind(this))) {
209
209
  let implicitScripts = addon.meta[type];
210
210
  if (implicitScripts) {
211
211
  let styles = [];
@@ -231,7 +231,7 @@ class AppBuilder {
231
231
  // unlike our full config, this one just needs to know how to parse all the
232
232
  // syntax our app can contain.
233
233
  babelParserConfig() {
234
- let babel = cloneDeep_1.default(this.adapter.babelConfig());
234
+ let babel = (0, cloneDeep_1.default)(this.adapter.babelConfig());
235
235
  if (!babel.plugins) {
236
236
  babel.plugins = [];
237
237
  }
@@ -241,7 +241,7 @@ class AppBuilder {
241
241
  return babel;
242
242
  }
243
243
  babelConfig(templateCompilerParams, appFiles) {
244
- let babel = cloneDeep_1.default(this.adapter.babelConfig());
244
+ let babel = (0, cloneDeep_1.default)(this.adapter.babelConfig());
245
245
  if (!babel.plugins) {
246
246
  babel.plugins = [];
247
247
  }
@@ -250,33 +250,14 @@ class AppBuilder {
250
250
  babel.plugins.push(require.resolve('@babel/plugin-syntax-dynamic-import'));
251
251
  // https://github.com/webpack/webpack/issues/12154
252
252
  babel.plugins.push(require.resolve('./rename-require-plugin'));
253
- if (this.adapter.adjustImportsOptions().emberNeedsModulesPolyfill) {
254
- // on older ember versions that need the modules-api-polyfill, we use our
255
- // bespoke inline template compiler plugin.
256
- babel.plugins.push([
257
- path_1.join(__dirname, 'babel-plugin-inline-hbs-node.js'),
258
- {
259
- templateCompiler: templateCompilerParams,
260
- stage: 3,
261
- },
262
- ]);
263
- }
264
- else {
265
- // on newer ember versions that don't need the modules-api-polyfill, we
266
- // can compose with the newer babel-plugin-htmlbars-inline-precompile, and
267
- // use a simpler plugin that only needs to handle inserting discovered
268
- // dependencies.
269
- babel.plugins.push([
270
- path_1.join(__dirname, '../src/babel-plugin-inline-hbs-deps-node.js'),
271
- { templateCompiler: templateCompilerParams },
272
- ]);
273
- babel.plugins.push([
274
- require.resolve('@ef4/babel-plugin-htmlbars-inline-precompile'),
275
- {
276
- precompilerPath: path_1.join(__dirname, '../src/babel-plugin-inline-hbs-deps-node.js'),
277
- },
278
- ]);
279
- }
253
+ // this is our built-in support for the inline hbs macro
254
+ babel.plugins.push([
255
+ (0, path_1.join)(__dirname, 'babel-plugin-inline-hbs-node.js'),
256
+ {
257
+ templateCompiler: templateCompilerParams,
258
+ stage: 3,
259
+ },
260
+ ]);
280
261
  // this is @embroider/macros configured for full stage3 resolution
281
262
  babel.plugins.push(...this.macrosConfig.babelPluginConfig());
282
263
  babel.plugins.push([require.resolve('./template-colocation-plugin')]);
@@ -286,7 +267,7 @@ class AppBuilder {
286
267
  require.resolve('@babel/plugin-transform-runtime'),
287
268
  { absoluteRuntime: __dirname, useESModules: true, regenerator: false },
288
269
  ]);
289
- const portable = portable_babel_config_1.makePortable(babel, { basedir: this.root }, this.portableHints);
270
+ const portable = (0, portable_babel_config_1.makePortable)(babel, { basedir: this.root }, this.portableHints);
290
271
  addCachablePlugin(portable.config);
291
272
  return portable;
292
273
  }
@@ -294,11 +275,11 @@ class AppBuilder {
294
275
  let relocatedFiles = {};
295
276
  for (let { destPath, appFiles } of engines) {
296
277
  for (let [relativePath, originalPath] of appFiles.relocatedFiles) {
297
- relocatedFiles[path_1.join(destPath, relativePath).split(path_1.sep).join('/')] = originalPath;
278
+ relocatedFiles[(0, path_1.join)(destPath, relativePath).split(path_1.sep).join('/')] = originalPath;
298
279
  }
299
280
  }
300
- let relocatedFilesPath = path_1.join(this.root, '_relocated_files.json');
301
- fs_extra_1.writeFileSync(relocatedFilesPath, JSON.stringify({ relocatedFiles }));
281
+ let relocatedFilesPath = (0, path_1.join)(this.root, '_relocated_files.json');
282
+ (0, fs_extra_1.writeFileSync)(relocatedFilesPath, JSON.stringify({ relocatedFiles }));
302
283
  return [
303
284
  require.resolve('./babel-plugin-adjust-imports'),
304
285
  {
@@ -447,10 +428,10 @@ class AppBuilder {
447
428
  package: addon,
448
429
  addons: new Set(),
449
430
  parent: current,
450
- sourcePath: engine_mangler_1.mangledEngineRoot(addon),
431
+ sourcePath: (0, engine_mangler_1.mangledEngineRoot)(addon),
451
432
  destPath: addon.root,
452
433
  modulePrefix: addon.name,
453
- appRelativePath: shared_internals_1.explicitRelative(this.root, addon.root),
434
+ appRelativePath: (0, shared_internals_1.explicitRelative)(this.root, addon.root),
454
435
  });
455
436
  }
456
437
  }
@@ -464,7 +445,7 @@ class AppBuilder {
464
445
  get fastbootConfig() {
465
446
  if (this.activeFastboot) {
466
447
  // this is relying on work done in stage1 by @embroider/compat/src/compat-adapters/ember-cli-fastboot.ts
467
- let packageJSON = fs_extra_1.readJSONSync(path_1.join(this.activeFastboot.root, '_fastboot_', 'package.json'));
448
+ let packageJSON = (0, fs_extra_1.readJSONSync)((0, path_1.join)(this.activeFastboot.root, '_fastboot_', 'package.json'));
468
449
  let { extraAppFiles, extraVendorFiles } = packageJSON['embroider-fastboot'];
469
450
  delete packageJSON['embroider-fastboot'];
470
451
  extraVendorFiles.push('assets/embroider_macros_fastboot_init.js');
@@ -549,23 +530,23 @@ class AppBuilder {
549
530
  }
550
531
  }
551
532
  updateOnDiskAsset(asset) {
552
- let destination = path_1.join(this.root, asset.relativePath);
553
- fs_extra_1.ensureDirSync(path_1.dirname(destination));
554
- fs_extra_1.copySync(asset.sourcePath, destination, { dereference: true });
533
+ let destination = (0, path_1.join)(this.root, asset.relativePath);
534
+ (0, fs_extra_1.ensureDirSync)((0, path_1.dirname)(destination));
535
+ (0, fs_extra_1.copySync)(asset.sourcePath, destination, { dereference: true });
555
536
  }
556
537
  updateInMemoryAsset(asset) {
557
- let destination = path_1.join(this.root, asset.relativePath);
558
- fs_extra_1.ensureDirSync(path_1.dirname(destination));
559
- fs_extra_1.writeFileSync(destination, asset.source, 'utf8');
538
+ let destination = (0, path_1.join)(this.root, asset.relativePath);
539
+ (0, fs_extra_1.ensureDirSync)((0, path_1.dirname)(destination));
540
+ (0, fs_extra_1.writeFileSync)(destination, asset.source, 'utf8');
560
541
  }
561
542
  updateBuiltEmberAsset(asset) {
562
- let destination = path_1.join(this.root, asset.relativePath);
563
- fs_extra_1.ensureDirSync(path_1.dirname(destination));
564
- fs_extra_1.writeFileSync(destination, asset.source, 'utf8');
543
+ let destination = (0, path_1.join)(this.root, asset.relativePath);
544
+ (0, fs_extra_1.ensureDirSync)((0, path_1.dirname)(destination));
545
+ (0, fs_extra_1.writeFileSync)(destination, asset.source, 'utf8');
565
546
  }
566
547
  async updateConcatenatedAsset(asset) {
567
548
  let concat = new fast_sourcemap_concat_1.default({
568
- outputFile: path_1.join(this.root, asset.relativePath),
549
+ outputFile: (0, path_1.join)(this.root, asset.relativePath),
569
550
  mapCommentType: asset.relativePath.endsWith('.js') ? 'line' : 'block',
570
551
  baseDir: this.root,
571
552
  });
@@ -576,7 +557,7 @@ class AppBuilder {
576
557
  for (let source of asset.sources) {
577
558
  switch (source.kind) {
578
559
  case 'on-disk':
579
- concat.addFile(shared_internals_1.explicitRelative(this.root, source.sourcePath));
560
+ concat.addFile((0, shared_internals_1.explicitRelative)(this.root, source.sourcePath));
580
561
  break;
581
562
  case 'in-memory':
582
563
  if (typeof source.source !== 'string') {
@@ -585,7 +566,7 @@ class AppBuilder {
585
566
  concat.addSpace(source.source);
586
567
  break;
587
568
  default:
588
- assert_never_1.default(source);
569
+ (0, assert_never_1.default)(source);
589
570
  }
590
571
  }
591
572
  await concat.end();
@@ -596,7 +577,7 @@ class AppBuilder {
596
577
  if (this.assetIsValid(asset, this.assets.get(asset.relativePath))) {
597
578
  continue;
598
579
  }
599
- messages_1.debug('rebuilding %s', asset.relativePath);
580
+ (0, messages_1.debug)('rebuilding %s', asset.relativePath);
600
581
  switch (asset.kind) {
601
582
  case 'on-disk':
602
583
  this.updateOnDiskAsset(asset);
@@ -611,12 +592,12 @@ class AppBuilder {
611
592
  await this.updateConcatenatedAsset(asset);
612
593
  break;
613
594
  default:
614
- assert_never_1.default(asset);
595
+ (0, assert_never_1.default)(asset);
615
596
  }
616
597
  }
617
598
  for (let oldAsset of this.assets.values()) {
618
599
  if (!assets.has(oldAsset.relativePath)) {
619
- fs_extra_1.unlinkSync(path_1.join(this.root, oldAsset.relativePath));
600
+ (0, fs_extra_1.unlinkSync)((0, path_1.join)(this.root, oldAsset.relativePath));
620
601
  }
621
602
  }
622
603
  this.assets = assets;
@@ -628,8 +609,8 @@ class AppBuilder {
628
609
  for (let pkg of this.adapter.allActiveAddons) {
629
610
  if (pkg.meta['public-assets']) {
630
611
  for (let [filename, appRelativeURL] of Object.entries(pkg.meta['public-assets'] || {})) {
631
- let sourcePath = path_1.resolve(pkg.root, filename);
632
- let stats = fs_extra_1.statSync(sourcePath);
612
+ let sourcePath = (0, path_1.resolve)(pkg.root, filename);
613
+ let stats = (0, fs_extra_1.statSync)(sourcePath);
633
614
  assets.push({
634
615
  kind: 'on-disk',
635
616
  sourcePath,
@@ -711,14 +692,17 @@ class AppBuilder {
711
692
  meta['auto-upgraded'] = true;
712
693
  }
713
694
  let pkg = this.combinePackageJSON(meta);
714
- fs_extra_1.writeFileSync(path_1.join(this.root, 'package.json'), JSON.stringify(pkg, null, 2), 'utf8');
695
+ (0, fs_extra_1.writeFileSync)((0, path_1.join)(this.root, 'package.json'), JSON.stringify(pkg, null, 2), 'utf8');
715
696
  }
716
697
  combinePackageJSON(meta) {
717
- let pkgLayers = [this.app.packageJSON, { keywords: ['ember-addon'], 'ember-addon': meta }];
698
+ let pkgLayers = [this.app.packageJSON];
718
699
  let fastbootConfig = this.fastbootConfig;
719
700
  if (fastbootConfig) {
701
+ // fastboot-specific package.json output is allowed to add to our original package.json
720
702
  pkgLayers.push(fastbootConfig.packageJSON);
721
703
  }
704
+ // but our own new v2 app metadata takes precedence over both
705
+ pkgLayers.push({ keywords: ['ember-addon'], 'ember-addon': meta });
722
706
  return combinePackageJSON(...pkgLayers);
723
707
  }
724
708
  templateCompiler(config) {
@@ -732,7 +716,7 @@ class AppBuilder {
732
716
  plugins.ast.push(macroPlugin);
733
717
  }
734
718
  const compilerPath = resolve_1.default.sync(this.adapter.templateCompilerPath(), { basedir: this.root });
735
- const compilerChecksum = load_ember_template_compiler_1.getEmberExports(compilerPath).cacheKey;
719
+ const compilerChecksum = (0, load_ember_template_compiler_1.getEmberExports)(compilerPath).cacheKey;
736
720
  return {
737
721
  plugins,
738
722
  compilerPath,
@@ -743,32 +727,32 @@ class AppBuilder {
743
727
  }
744
728
  get portableHints() {
745
729
  return this.options.pluginHints.map(hint => {
746
- let cursor = path_1.join(this.app.root, 'package.json');
730
+ let cursor = (0, path_1.join)(this.app.root, 'package.json');
747
731
  for (let i = 0; i < hint.resolve.length; i++) {
748
732
  let target = hint.resolve[i];
749
733
  if (i < hint.resolve.length - 1) {
750
- target = path_1.join(target, 'package.json');
734
+ target = (0, path_1.join)(target, 'package.json');
751
735
  }
752
- cursor = resolve_1.default.sync(target, { basedir: path_1.dirname(cursor) });
736
+ cursor = resolve_1.default.sync(target, { basedir: (0, path_1.dirname)(cursor) });
753
737
  }
754
738
  return {
755
739
  requireFile: cursor,
756
740
  useMethod: hint.useMethod,
757
- packageVersion: portable_1.maybeNodeModuleVersion(cursor),
741
+ packageVersion: (0, portable_1.maybeNodeModuleVersion)(cursor),
758
742
  };
759
743
  });
760
744
  }
761
745
  addTemplateCompiler(params) {
762
- let mod = write_template_compiler_1.templateCompilerModule(params, this.portableHints);
763
- fs_extra_1.writeFileSync(path_1.join(this.root, '_template_compiler_.js'), mod.src, 'utf8');
746
+ let mod = (0, write_template_compiler_1.templateCompilerModule)(params, this.portableHints);
747
+ (0, fs_extra_1.writeFileSync)((0, path_1.join)(this.root, '_template_compiler_.js'), mod.src, 'utf8');
764
748
  return mod.isParallelSafe;
765
749
  }
766
750
  addBabelConfig(pconfig) {
767
751
  if (!pconfig.isParallelSafe) {
768
- messages_1.warn('Your build is slower because some babel plugins are non-serializable');
752
+ (0, messages_1.warn)('Your build is slower because some babel plugins are non-serializable');
769
753
  }
770
- fs_extra_1.writeFileSync(path_1.join(this.root, '_babel_config_.js'), `module.exports = ${JSON.stringify(pconfig.config, null, 2)}`, 'utf8');
771
- fs_extra_1.writeFileSync(path_1.join(this.root, '_babel_filter_.js'), babelFilterTemplate({ skipBabel: this.options.skipBabel }), 'utf8');
754
+ (0, fs_extra_1.writeFileSync)((0, path_1.join)(this.root, '_babel_config_.js'), `module.exports = ${JSON.stringify(pconfig.config, null, 2)}`, 'utf8');
755
+ (0, fs_extra_1.writeFileSync)((0, path_1.join)(this.root, '_babel_filter_.js'), babelFilterTemplate({ skipBabel: this.options.skipBabel }), 'utf8');
772
756
  }
773
757
  shouldSplitRoute(routeName) {
774
758
  return (!this.options.splitAtRoutes ||
@@ -836,14 +820,14 @@ class AppBuilder {
836
820
  return this.appJSAsset(relativePath, app, childEngines, prepared, {
837
821
  autoRun: this.adapter.autoRun(),
838
822
  appBoot: !this.adapter.autoRun() ? this.adapter.appBoot() : '',
839
- mainModule: shared_internals_1.explicitRelative(path_1.dirname(relativePath), this.adapter.mainModule()),
823
+ mainModule: (0, shared_internals_1.explicitRelative)((0, path_1.dirname)(relativePath), this.adapter.mainModule()),
840
824
  appConfig: this.adapter.mainModuleConfig(),
841
825
  });
842
826
  }
843
827
  get staticAppPathsPattern() {
844
828
  if (this.options.staticAppPaths.length > 0) {
845
829
  return new RegExp('^(?:' +
846
- this.options.staticAppPaths.map(staticAppPath => escape_string_regexp_1.default(staticAppPath.replace(/\//g, path_1.sep))).join('|') +
830
+ this.options.staticAppPaths.map(staticAppPath => (0, escape_string_regexp_1.default)(staticAppPath.replace(/\//g, path_1.sep))).join('|') +
847
831
  ')(?:$|' +
848
832
  path_1.sep +
849
833
  ')');
@@ -867,12 +851,6 @@ class AppBuilder {
867
851
  return cached;
868
852
  }
869
853
  let eagerModules = [];
870
- if (!this.adapter.adjustImportsOptions().emberNeedsModulesPolyfill) {
871
- // when we're running with fake ember modules, vendor.js takes care of
872
- // this bootstrapping. But when we're running with real ember modules,
873
- // it's up to our entrypoint.
874
- eagerModules.push('@ember/-internals/bootstrap');
875
- }
876
854
  let requiredAppFiles = [this.requiredOtherFiles(appFiles)];
877
855
  if (!this.options.staticComponents) {
878
856
  requiredAppFiles.push(appFiles.components);
@@ -887,14 +865,14 @@ class AppBuilder {
887
865
  let implicitStyles = this.impliedAssets('implicit-styles', engine);
888
866
  for (let style of implicitStyles) {
889
867
  styles.push({
890
- path: shared_internals_1.explicitRelative('assets/_engine_', style.relativePath),
868
+ path: (0, shared_internals_1.explicitRelative)('assets/_engine_', style.relativePath),
891
869
  });
892
870
  }
893
871
  let engineMeta = engine.package.meta;
894
872
  if (engineMeta && engineMeta['implicit-styles']) {
895
873
  for (let style of engineMeta['implicit-styles']) {
896
874
  styles.push({
897
- path: shared_internals_1.explicitRelative(path_1.dirname(relativePath), path_1.join(engine.appRelativePath, style)),
875
+ path: (0, shared_internals_1.explicitRelative)((0, path_1.dirname)(relativePath), (0, path_1.join)(engine.appRelativePath, style)),
898
876
  });
899
877
  }
900
878
  }
@@ -905,11 +883,11 @@ class AppBuilder {
905
883
  if (childEngine.package.isLazyEngine()) {
906
884
  lazyEngines.push({
907
885
  names: [childEngine.package.name],
908
- path: shared_internals_1.explicitRelative(path_1.dirname(relativePath), asset.relativePath),
886
+ path: (0, shared_internals_1.explicitRelative)((0, path_1.dirname)(relativePath), asset.relativePath),
909
887
  });
910
888
  }
911
889
  else {
912
- eagerModules.push(shared_internals_1.explicitRelative(path_1.dirname(relativePath), asset.relativePath));
890
+ eagerModules.push((0, shared_internals_1.explicitRelative)((0, path_1.dirname)(relativePath), asset.relativePath));
913
891
  }
914
892
  }
915
893
  let lazyRoutes = [];
@@ -927,7 +905,7 @@ class AppBuilder {
927
905
  });
928
906
  });
929
907
  }
930
- let [fastboot, nonFastboot] = partition_1.default(excludeDotFiles(flatten_1.default(requiredAppFiles)), file => appFiles.isFastbootOnly.get(file));
908
+ let [fastboot, nonFastboot] = (0, partition_1.default)(excludeDotFiles((0, flatten_1.default)(requiredAppFiles)), file => appFiles.isFastbootOnly.get(file));
931
909
  let amdModules = nonFastboot.map(file => this.importPaths(engine, file, relativePath));
932
910
  let fastbootOnlyAmdModules = fastboot.map(file => this.importPaths(engine, file, relativePath));
933
911
  // this is a backward-compatibility feature: addons can force inclusion of
@@ -950,15 +928,15 @@ class AppBuilder {
950
928
  return this.adapter.modulePrefix();
951
929
  }
952
930
  importPaths(engine, engineRelativePath, fromFile) {
953
- let appRelativePath = path_1.join(engine.appRelativePath, engineRelativePath);
931
+ let appRelativePath = (0, path_1.join)(engine.appRelativePath, engineRelativePath);
954
932
  let noHBS = engineRelativePath.replace(this.resolvableExtensionsPattern, '').replace(/\.hbs$/, '');
955
933
  return {
956
934
  runtime: `${engine.modulePrefix}/${noHBS}`,
957
- buildtime: shared_internals_1.explicitRelative(path_1.dirname(fromFile), appRelativePath),
935
+ buildtime: (0, shared_internals_1.explicitRelative)((0, path_1.dirname)(fromFile), appRelativePath),
958
936
  };
959
937
  }
960
938
  routeEntrypoint(engine, relativePath, files) {
961
- let [fastboot, nonFastboot] = partition_1.default(files, file => engine.appFiles.isFastbootOnly.get(file));
939
+ let [fastboot, nonFastboot] = (0, partition_1.default)(files, file => engine.appFiles.isFastbootOnly.get(file));
962
940
  let asset = {
963
941
  kind: 'in-memory',
964
942
  source: routeEntryTemplate({
@@ -985,14 +963,8 @@ class AppBuilder {
985
963
  // packagers to understand. It's better to express it here as a direct
986
964
  // module dependency.
987
965
  let eagerModules = [
988
- shared_internals_1.explicitRelative(path_1.dirname(myName), this.topAppJSAsset(engines, prepared).relativePath),
966
+ (0, shared_internals_1.explicitRelative)((0, path_1.dirname)(myName), this.topAppJSAsset(engines, prepared).relativePath),
989
967
  ];
990
- if (!this.adapter.adjustImportsOptions().emberNeedsModulesPolyfill) {
991
- // when we're running with fake ember modules, the prebuilt test-support
992
- // script takes care of this bootstrapping. But when we're running with
993
- // real ember modules, it's up to our entrypoint.
994
- eagerModules.push('ember-testing');
995
- }
996
968
  let amdModules = [];
997
969
  // this is a backward-compatibility feature: addons can force inclusion of
998
970
  // test support modules.
@@ -1031,7 +1003,7 @@ class AppBuilder {
1031
1003
  });
1032
1004
  }
1033
1005
  }
1034
- let runtime = path_1.join(packageName, name).replace(this.resolvableExtensionsPattern, '');
1006
+ let runtime = (0, path_1.join)(packageName, name).replace(this.resolvableExtensionsPattern, '');
1035
1007
  let runtimeRenameLookup = runtime.split('\\').join('/');
1036
1008
  if (renamedModules && renamedModules[runtimeRenameLookup]) {
1037
1009
  runtime = renamedModules[runtimeRenameLookup];
@@ -1040,8 +1012,8 @@ class AppBuilder {
1040
1012
  lazyModules.push({
1041
1013
  runtime,
1042
1014
  buildtime: this.options.implicitModulesStrategy === 'packageNames'
1043
- ? path_1.join(packageName, name)
1044
- : shared_internals_1.explicitRelative(path_1.dirname(path_1.join(this.root, relativeTo)), path_1.join(addon.root, name)),
1015
+ ? (0, path_1.join)(packageName, name)
1016
+ : (0, shared_internals_1.explicitRelative)((0, path_1.dirname)((0, path_1.join)(this.root, relativeTo)), (0, path_1.join)(addon.root, name)),
1045
1017
  });
1046
1018
  }
1047
1019
  }
@@ -1049,31 +1021,31 @@ class AppBuilder {
1049
1021
  }
1050
1022
  }
1051
1023
  __decorate([
1052
- typescript_memoize_1.Memoize()
1024
+ (0, typescript_memoize_1.Memoize)()
1053
1025
  ], AppBuilder.prototype, "resolvableExtensionsPattern", null);
1054
1026
  __decorate([
1055
- typescript_memoize_1.Memoize()
1027
+ (0, typescript_memoize_1.Memoize)()
1056
1028
  ], AppBuilder.prototype, "babelParserConfig", null);
1057
1029
  __decorate([
1058
- typescript_memoize_1.Memoize()
1030
+ (0, typescript_memoize_1.Memoize)()
1059
1031
  ], AppBuilder.prototype, "babelConfig", null);
1060
1032
  __decorate([
1061
- typescript_memoize_1.Memoize()
1033
+ (0, typescript_memoize_1.Memoize)()
1062
1034
  ], AppBuilder.prototype, "activeFastboot", null);
1063
1035
  __decorate([
1064
- typescript_memoize_1.Memoize()
1036
+ (0, typescript_memoize_1.Memoize)()
1065
1037
  ], AppBuilder.prototype, "fastbootConfig", null);
1066
1038
  __decorate([
1067
- typescript_memoize_1.Memoize()
1039
+ (0, typescript_memoize_1.Memoize)()
1068
1040
  ], AppBuilder.prototype, "portableHints", null);
1069
1041
  __decorate([
1070
- typescript_memoize_1.Memoize()
1042
+ (0, typescript_memoize_1.Memoize)()
1071
1043
  ], AppBuilder.prototype, "staticAppPathsPattern", null);
1072
1044
  __decorate([
1073
- typescript_memoize_1.Memoize()
1045
+ (0, typescript_memoize_1.Memoize)()
1074
1046
  ], AppBuilder.prototype, "modulePrefix", null);
1075
1047
  exports.AppBuilder = AppBuilder;
1076
- const entryTemplate = js_handlebars_1.compile(`
1048
+ const entryTemplate = (0, js_handlebars_1.compile)(`
1077
1049
  import { importSync as i, macroCondition, getGlobalConfig } from '@embroider/macros';
1078
1050
  let w = window;
1079
1051
  let d = w.define;
@@ -1146,7 +1118,7 @@ if (!runningTests) {
1146
1118
  EmberENV.TESTS_FILE_LOADED = true;
1147
1119
  {{/if}}
1148
1120
  `);
1149
- const routeEntryTemplate = js_handlebars_1.compile(`
1121
+ const routeEntryTemplate = (0, js_handlebars_1.compile)(`
1150
1122
  import { importSync as i } from '@embroider/macros';
1151
1123
  let d = window.define;
1152
1124
  {{#each files as |amdModule| ~}}
@@ -1170,7 +1142,7 @@ function stringOrBufferEqual(a, b) {
1170
1142
  }
1171
1143
  return false;
1172
1144
  }
1173
- const babelFilterTemplate = js_handlebars_1.compile(`
1145
+ const babelFilterTemplate = (0, js_handlebars_1.compile)(`
1174
1146
  const { babelFilter } = require('@embroider/core');
1175
1147
  module.exports = babelFilter({{{json-stringify skipBabel}}});
1176
1148
  `);
@@ -1195,6 +1167,6 @@ function combinePackageJSON(...layers) {
1195
1167
  }
1196
1168
  }
1197
1169
  }
1198
- return mergeWith_1.default({}, ...layers, custom);
1170
+ return (0, mergeWith_1.default)({}, ...layers, custom);
1199
1171
  }
1200
1172
  //# sourceMappingURL=app.js.map