Repository: ember-cli/ember-cli
Pull request #10194 (2023-02-25 18:45:57)

[CLEANUP] Drop support for `ember-cli-shims`
Builds on #10193.


Patch:
diff --git a/lib/broccoli/ember-app.js b/lib/broccoli/ember-app.js
index 0d92d5900..cb990e4e2 100644
--- a/lib/broccoli/ember-app.js
+++ b/lib/broccoli/ember-app.js
@@ -371,23 +371,15 @@ class EmberApp {
   _initVendorFiles() {
     let bowerDeps = this.project._bowerDependencies();
     let ember = this.project.findAddonByName('ember-source');
-    let addonEmberCliShims = this.project.findAddonByName('ember-cli-shims');
-    let bowerEmberCliShims = bowerDeps['ember-cli-shims'];
     let developmentEmber;
     let productionEmber;
     let emberTesting;
-    let emberShims = null;
 
     if (ember) {
       developmentEmber = ember.paths.debug;
       productionEmber = ember.paths.prod;
       emberTesting = ember.paths.testing;
-      emberShims = ember.paths.shims;
     } else {
-      if (bowerEmberCliShims) {
-        emberShims = `${this.bowerDirectory}/ember-cli-shims/app-shims.js`;
-      }
-
       // in Ember 1.10 and higher `ember.js` is deprecated in favor of
       // the more aptly named `ember.debug.js`.
       productionEmber = `${this.bowerDirectory}/ember/ember.prod.js`;
@@ -417,7 +409,6 @@ class EmberApp {
             production: productionEmber,
           },
           'ember-testing.js': [emberTesting, { type: 'test' }],
-          'app-shims.js': emberShims,
           'ember-resolver.js': [
             `${this.bowerDirectory}/ember-resolver/dist/modules/ember-resolver.js`,
             {
@@ -441,16 +432,6 @@ class EmberApp {
       delete this.vendorFiles['ember-resolver.js'];
     }
 
-    // Warn if ember-cli-shims is not included.
-    // certain versions of `ember-source` bundle them by default,
-    // so we must check if that is the load mechanism of ember
-    // before checking `bower`.
-    if (!emberShims && !addonEmberCliShims && !bowerEmberCliShims) {
-      this.project.ui.writeWarnLine(
-        "You have not included `ember-cli-shims` in your project's `bower.json` or `package.json`. This only works if you provide an alternative yourself and unset `app.vendorFiles['app-shims.js']`."
-      );
-    }
-
     // If ember-testing.js is coming from Bower (not ember-source) and it does not
     // exist, then we remove it from vendor files. This is needed to support versions
     // of Ember older than 1.8.0 (when ember-testing.js was incldued in ember.js itself)


Test patch:
diff --git a/tests/unit/broccoli/ember-app-test.js b/tests/unit/broccoli/ember-app-test.js
index f448080b6..096370daa 100644
--- a/tests/unit/broccoli/ember-app-test.js
+++ b/tests/unit/broccoli/ember-app-test.js
@@ -1234,7 +1234,7 @@ describe('EmberApp', function () {
   });
 
   describe('vendorFiles', function () {
-    let defaultVendorFiles = ['jquery.js', 'ember.js', 'app-shims.js'];
+    let defaultVendorFiles = ['jquery.js', 'ember.js'];
 
     describe('handlebars.js', function () {
       it('does not app.import handlebars if not present in bower.json', function () {
@@ -1472,32 +1472,6 @@ describe('EmberApp', function () {
   });
 
   describe('deprecations', function () {
-    it('shows ember-cli-shims deprecation', function () {
-      let root = path.resolve(__dirname, '../../fixtures/app/npm');
-      let project = setupProject(root);
-      project.require = function () {
-        return {
-          version: '5.0.0',
-        };
-      };
-      project.initializeAddons = function () {
-        this.addons = [
-          {
-            name: 'ember-cli-babel',
-            pkg: { version: '5.0.0' },
-          },
-        ];
-      };
-
-      app = new EmberApp({
-        project,
-      });
-
-      expect(project.ui.output).to.contain(
-        "You have not included `ember-cli-shims` in your project's `bower.json` or `package.json`."
-      );
-    });
-
     describe('jQuery integration', function () {
       it('shows deprecation', function () {
         project.initializeAddons = function () {