Repository: ember-cli/ember-cli
Pull request #7844 (2018-05-23 22:54:21)

Add @ember/jquery and @ember/optional-features by default.
* Apps get `@ember/jquery` for backwards compatibility
* Addons do not include `@ember/jquery`
* All projects include `@ember/optional-features` and either opt-in or
  out as appropriate.
* Update to ember-try 1.0.0-beta.3
* Make default scenario run without jQuery
* Add `default-with-jquery` ember-try scenario


Patch:
diff --git a/RELEASE.md b/RELEASE.md
index 431fbb20e..3a3fc0598 100644
--- a/RELEASE.md
+++ b/RELEASE.md
@@ -95,6 +95,7 @@ git checkout -B master --track origin/master
 # Merge the new beta release into the "master" branch
 git merge vX.Y.0-beta.1
 
+# Confirm that experiments are turned on before pushing it back to master.
 # Push back upstream.
 git push origin
 ```
@@ -165,6 +166,7 @@ ember serve
 * if releasing using Windows, check that it works on a Linux VM
   * we are checking if any Windows line endings snuck in, because they won't work on Unix
 * if releasing using Unix, you are set, Windows can read your line endings
+* If `release` or `beta` confirm that all experiments are off.
 
 ### Update Artifacts
 
diff --git a/blueprints/addon/files/.travis.yml b/blueprints/addon/files/.travis.yml
index b600ad0c1..d659b1d3f 100644
--- a/blueprints/addon/files/.travis.yml
+++ b/blueprints/addon/files/.travis.yml
@@ -32,6 +32,7 @@ env:
     - EMBER_TRY_SCENARIO=ember-beta
     - EMBER_TRY_SCENARIO=ember-canary
     - EMBER_TRY_SCENARIO=ember-default
+    - EMBER_TRY_SCENARIO=ember-default-with-jquery
 
 matrix:
   fast_finish: true
diff --git a/blueprints/addon/files/addon-config/ember-try.js b/blueprints/addon/files/addon-config/ember-try.js
index 26c3ea95e..961e070b1 100644
--- a/blueprints/addon/files/addon-config/ember-try.js
+++ b/blueprints/addon/files/addon-config/ember-try.js
@@ -64,6 +64,19 @@ module.exports = function() {
           npm: {
             devDependencies: {}
           }
+        },
+        {
+          name: 'ember-default-with-jquery',
+          env: {
+            EMBER_OPTIONAL_FEATURES: JSON.stringify({
+              'jquery-integration': true
+            })
+          },
+          npm: {
+            devDependencies: {
+              '@ember/jquery': '^0.5.1'
+            }
+          }
         }
       ]
     };
diff --git a/blueprints/addon/files/config/optional-features.json b/blueprints/addon/files/config/optional-features.json
new file mode 100644
index 000000000..b1902623a
--- /dev/null
+++ b/blueprints/addon/files/config/optional-features.json
@@ -0,0 +1,3 @@
+{
+  "jquery-integration": false
+}
diff --git a/blueprints/addon/files/ember-cli-build.js b/blueprints/addon/files/ember-cli-build.js
index b4baa1597..dc5a39e1b 100644
--- a/blueprints/addon/files/ember-cli-build.js
+++ b/blueprints/addon/files/ember-cli-build.js
@@ -4,13 +4,6 @@ const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
 
 module.exports = function(defaults) {
   let app = new EmberAddon(defaults, {
-    /* 
-      Leave jQuery out of this addon's own test suite & dummy app by default, 
-      so that the addon can be used in apps without jQuery. If you really need 
-      jQuery, it's safe to remove this line.
-    */
-    vendorFiles: { 'jquery.js': null, 'app-shims.js': null }
-    
     // Add options here
   });
 
diff --git a/blueprints/addon/index.js b/blueprints/addon/index.js
index aeb6d6da0..14290a2fd 100644
--- a/blueprints/addon/index.js
+++ b/blueprints/addon/index.js
@@ -56,6 +56,9 @@ module.exports = {
     // 100% of addons don't need ember-cli-app-version, make it opt-in instead
     delete contents.devDependencies['ember-cli-app-version'];
 
+    // addons should test _without_ jquery by default
+    delete contents.devDependencies['@ember/jquery'];
+
     if (contents.keywords.indexOf('ember-addon') === -1) {
       contents.keywords.push('ember-addon');
     }
@@ -67,7 +70,7 @@ module.exports = {
     contents.devDependencies['eslint-plugin-node'] = '^6.0.1';
 
     // add ember-try
-    contents.devDependencies['ember-try'] = '^0.2.23';
+    contents.devDependencies['ember-try'] = '^1.0.0-beta.3';
 
     // add ember-source-channel-url
     contents.devDependencies['ember-source-channel-url'] = '^1.0.1';
diff --git a/blueprints/app/files/config/optional-features.json b/blueprints/app/files/config/optional-features.json
new file mode 100644
index 000000000..21f1dc719
--- /dev/null
+++ b/blueprints/app/files/config/optional-features.json
@@ -0,0 +1,3 @@
+{
+  "jquery-integration": true
+}
diff --git a/blueprints/app/files/package.json b/blueprints/app/files/package.json
index 067dbd1ec..5c49d9fa4 100644
--- a/blueprints/app/files/package.json
+++ b/blueprints/app/files/package.json
@@ -17,6 +17,8 @@
     "test": "ember test"
   },
   "devDependencies": {
+    "@ember/jquery": "^0.5.1",
+    "@ember/optional-features": "^0.6.1",
     "broccoli-asset-rev": "^2.7.0",
     "ember-ajax": "^3.0.0",
     "ember-cli": "~<%= emberCLIVersion %>",
diff --git a/blueprints/module-unification-app/files/package.json b/blueprints/module-unification-app/files/package.json
index 9c159a30f..1c8ab2e33 100644
--- a/blueprints/module-unification-app/files/package.json
+++ b/blueprints/module-unification-app/files/package.json
@@ -17,6 +17,8 @@
     "test": "ember test"
   },
   "devDependencies": {
+    "@ember/jquery": "^0.5.1",
+    "@ember/optional-features": "^0.6.1",
     "broccoli-asset-rev": "^2.7.0",
     "ember-ajax": "^3.0.0",
     "ember-cli": "github:ember-cli/ember-cli",
diff --git a/lib/broccoli/default-packager.js b/lib/broccoli/default-packager.js
index ffbb6bfb9..4939e0f6b 100644
--- a/lib/broccoli/default-packager.js
+++ b/lib/broccoli/default-packager.js
@@ -567,6 +567,7 @@ module.exports = class DefaultPackager {
   */
   packageStyles(tree) {
     if (this._cachedProcessedStyles === null) {
+      let stylesAndVendor = callAddonsPreprocessTreeHook(this.project, 'css', tree);
       let cssMinificationEnabled = this.minifyCSS.enabled;
       let options = {
         outputPaths: this.distPaths.appCssFile,
@@ -574,29 +575,12 @@ module.exports = class DefaultPackager {
         minifyCSS: this.minifyCSS.options,
       };
 
-      let stylesAndVendor, preprocessedStyles;
-
-      if (this._cachedProcessedSrc !== null && this.isModuleUnificationEnabled === true) {
-        stylesAndVendor = mergeTrees([
-          this._cachedProcessedSrc,
-          tree,
-        ], {
-          annotation: 'Module Unification Styles',
-        });
-        preprocessedStyles = new Funnel(this._cachedProcessedSrc, {
-          srcDir: `${this.name}/assets`,
-          destDir: 'assets',
-        });
-      } else {
-        stylesAndVendor = callAddonsPreprocessTreeHook(this.project, 'css', tree);
-
-        preprocessedStyles = preprocessCss(
-          stylesAndVendor,
-          `/${this.name}/styles`,
-          '/assets',
-          options
-        );
-      }
+      let preprocessedStyles = preprocessCss(
+        stylesAndVendor,
+        `/${this.name}/styles`,
+        '/assets',
+        options
+      );
 
       let vendorStyles = [];
       for (let outputFile in this.styleOutputFiles) {
@@ -619,9 +603,8 @@ module.exports = class DefaultPackager {
       });
 
       if (cssMinificationEnabled === true) {
-        options.minifyCSS.registry = options.registry;
-        preprocessedStyles = preprocessMinifyCss(preprocessedStyles, options.minifyCSS);
-        vendorStyles = preprocessMinifyCss(vendorStyles, options.minifyCSS);
+        preprocessedStyles = preprocessMinifyCss(preprocessedStyles, options);
+        vendorStyles = preprocessMinifyCss(vendorStyles, options);
       }
 
       this._cachedProcessedStyles = callAddonsPostprocessTreeHook(this.project, 'css', mergeTrees([
@@ -696,7 +679,7 @@ module.exports = class DefaultPackager {
         srcAfterTemplatePreprocessing
       );
 
-      this._cachedProcessedSrc = new Funnel(mergeTrees([
+      return new Funnel(mergeTrees([
         srcAfterPostprocessTreeHook,
         srcAfterStylePreprocessing,
       ], { ovewrite: true }), {
diff --git a/lib/broccoli/ember-app.js b/lib/broccoli/ember-app.js
index 0c2092afd..11332546f 100644
--- a/lib/broccoli/ember-app.js
+++ b/lib/broccoli/ember-app.js
@@ -387,13 +387,17 @@ class EmberApp {
     let productionEmber;
     let emberTesting;
     let emberShims = null;
+    let jquery;
 
     if (ember) {
       developmentEmber = ember.paths.debug;
       productionEmber = ember.paths.prod;
       emberTesting = ember.paths.testing;
       emberShims = ember.paths.shims;
+      jquery = ember.paths.jquery;
     } else {
+      jquery = `${this.bowerDirectory}/jquery/dist/jquery.js`;
+
       if (bowerEmberCliShims) {
         emberShims = `${this.bowerDirectory}/ember-cli-shims/app-shims.js`;
       }
@@ -419,6 +423,7 @@ class EmberApp {
     }
 
     this.vendorFiles = omitBy(merge({
+      'jquery.js': jquery,
       'handlebars.js': handlebarsVendorFiles,
       'ember.js': {
         development: developmentEmber,
@@ -438,8 +443,6 @@ class EmberApp {
       ],
     }, this.options.vendorFiles), isNull);
 
-    this._addJqueryInLegacyEmber();
-
     if (this._addonInstalled('ember-resolver') || !bowerDeps['ember-resolver']) {
       // if the project is using `ember-resolver` as an addon
       // remove it from `vendorFiles` (the npm version properly works
@@ -464,25 +467,6 @@ class EmberApp {
     }
   }
 
-  _addJqueryInLegacyEmber() {
-    if (this.project.findAddonByName('@ember/jquery')) {
-      return;
-    }
-    let ember = this.project.findAddonByName('ember-source');
-    let jqueryPath;
-    if (ember) {
-      let optionFeatures = this.project.findAddonByName('@ember/optional-features');
-      if (optionFeatures && !optionFeatures.isFeatureEnabled('jquery-integration')) {
-        return;
-      }
-      this.project.ui.writeDeprecateLine('Ember will stop including jQuery by default in an upcoming version. If you wish keep using jQuery in your application explicitly add `@ember/jquery` to your package.json');
-      jqueryPath = ember.paths.jquery;
-    } else {
-      jqueryPath = `${this.bowerDirectory}/jquery/dist/jquery.js`;
-    }
-    this.vendorFiles = merge({ 'jquery.js': jqueryPath }, this.vendorFiles);
-  }
-
   /**
     Returns the environment name
 


Test patch:
diff --git a/tests/fixtures/addon/npm/.travis.yml b/tests/fixtures/addon/npm/.travis.yml
index c9e48c674..51ccfd8e5 100644
--- a/tests/fixtures/addon/npm/.travis.yml
+++ b/tests/fixtures/addon/npm/.travis.yml
@@ -29,6 +29,7 @@ env:
     - EMBER_TRY_SCENARIO=ember-beta
     - EMBER_TRY_SCENARIO=ember-canary
     - EMBER_TRY_SCENARIO=ember-default
+    - EMBER_TRY_SCENARIO=ember-default-with-jquery
 
 matrix:
   fast_finish: true
diff --git a/tests/fixtures/addon/npm/config/ember-try.js b/tests/fixtures/addon/npm/config/ember-try.js
index 644b02b30..d2620d11b 100644
--- a/tests/fixtures/addon/npm/config/ember-try.js
+++ b/tests/fixtures/addon/npm/config/ember-try.js
@@ -63,6 +63,19 @@ module.exports = function() {
           npm: {
             devDependencies: {}
           }
+        },
+        {
+          name: 'ember-default-with-jquery',
+          env: {
+            EMBER_OPTIONAL_FEATURES: JSON.stringify({
+              'jquery-integration': true
+            })
+          },
+          npm: {
+            devDependencies: {
+              '@ember/jquery': '^0.5.1'
+            }
+          }
         }
       ]
     };
diff --git a/tests/fixtures/addon/npm/package.json b/tests/fixtures/addon/npm/package.json
index 7f8fcb494..c7bc0a9eb 100644
--- a/tests/fixtures/addon/npm/package.json
+++ b/tests/fixtures/addon/npm/package.json
@@ -23,6 +23,7 @@
     "ember-cli-babel": "^6.6.0"
   },
   "devDependencies": {
+    "@ember/optional-features": "^0.6.1",
     "broccoli-asset-rev": "^2.7.0",
     "ember-ajax": "^3.0.0",
     "ember-cli": "~<%= emberCLIVersion %>",
@@ -41,7 +42,7 @@
     "ember-resolver": "^4.0.0",
     "ember-source": "~3.2.0-beta.2",
     "ember-source-channel-url": "^1.0.1",
-    "ember-try": "^0.2.23",
+    "ember-try": "^1.0.0-beta.3",
     "eslint-plugin-ember": "^5.0.0",
     "eslint-plugin-node": "^6.0.1",
     "loader.js": "^4.2.3",
diff --git a/tests/fixtures/addon/yarn/.travis.yml b/tests/fixtures/addon/yarn/.travis.yml
index 0207afa54..391363e28 100644
--- a/tests/fixtures/addon/yarn/.travis.yml
+++ b/tests/fixtures/addon/yarn/.travis.yml
@@ -28,6 +28,7 @@ env:
     - EMBER_TRY_SCENARIO=ember-beta
     - EMBER_TRY_SCENARIO=ember-canary
     - EMBER_TRY_SCENARIO=ember-default
+    - EMBER_TRY_SCENARIO=ember-default-with-jquery
 
 matrix:
   fast_finish: true
diff --git a/tests/fixtures/addon/yarn/config/ember-try.js b/tests/fixtures/addon/yarn/config/ember-try.js
index fb2231112..7e8ab4c4a 100644
--- a/tests/fixtures/addon/yarn/config/ember-try.js
+++ b/tests/fixtures/addon/yarn/config/ember-try.js
@@ -64,6 +64,19 @@ module.exports = function() {
           npm: {
             devDependencies: {}
           }
+        },
+        {
+          name: 'ember-default-with-jquery',
+          env: {
+            EMBER_OPTIONAL_FEATURES: JSON.stringify({
+              'jquery-integration': true
+            })
+          },
+          npm: {
+            devDependencies: {
+              '@ember/jquery': '^0.5.1'
+            }
+          }
         }
       ]
     };
diff --git a/tests/fixtures/addon/yarn/package.json b/tests/fixtures/addon/yarn/package.json
index 65fbe1ad1..59094cfdb 100644
--- a/tests/fixtures/addon/yarn/package.json
+++ b/tests/fixtures/addon/yarn/package.json
@@ -23,6 +23,7 @@
     "ember-cli-babel": "^6.6.0"
   },
   "devDependencies": {
+    "@ember/optional-features": "^0.6.1",
     "broccoli-asset-rev": "^2.7.0",
     "ember-ajax": "^3.0.0",
     "ember-cli": "~<%= emberCLIVersion %>",
@@ -41,7 +42,7 @@
     "ember-resolver": "^4.0.0",
     "ember-source": "~3.2.0-beta.2",
     "ember-source-channel-url": "^1.0.1",
-    "ember-try": "^0.2.23",
+    "ember-try": "^1.0.0-beta.3",
     "ember-welcome-page": "^3.0.0",
     "eslint-plugin-ember": "^5.0.0",
     "eslint-plugin-node": "^6.0.1",
diff --git a/tests/fixtures/app/npm/package.json b/tests/fixtures/app/npm/package.json
index 17daf75bb..061fbcb3a 100644
--- a/tests/fixtures/app/npm/package.json
+++ b/tests/fixtures/app/npm/package.json
@@ -17,6 +17,8 @@
     "test": "ember test"
   },
   "devDependencies": {
+    "@ember/jquery": "^0.5.1",
+    "@ember/optional-features": "^0.6.1",
     "broccoli-asset-rev": "^2.7.0",
     "ember-ajax": "^3.0.0",
     "ember-cli": "~<%= emberCLIVersion %>",
diff --git a/tests/fixtures/app/yarn/package.json b/tests/fixtures/app/yarn/package.json
index 547bb0c90..942ed03b1 100644
--- a/tests/fixtures/app/yarn/package.json
+++ b/tests/fixtures/app/yarn/package.json
@@ -17,6 +17,8 @@
     "test": "ember test"
   },
   "devDependencies": {
+    "@ember/jquery": "^0.5.1",
+    "@ember/optional-features": "^0.6.1",
     "broccoli-asset-rev": "^2.7.0",
     "ember-ajax": "^3.0.0",
     "ember-cli": "~<%= emberCLIVersion %>",
diff --git a/tests/fixtures/module-unification-addon/package.json b/tests/fixtures/module-unification-addon/package.json
index 54c595a76..f8ee27456 100644
--- a/tests/fixtures/module-unification-addon/package.json
+++ b/tests/fixtures/module-unification-addon/package.json
@@ -23,6 +23,7 @@
     "ember-cli-babel": "^6.6.0"
   },
   "devDependencies": {
+    "@ember/optional-features": "^0.6.1",
     "broccoli-asset-rev": "^2.7.0",
     "ember-ajax": "^3.0.0",
     "ember-cli": "github:ember-cli/ember-cli",
diff --git a/tests/fixtures/module-unification-app/npm/package.json b/tests/fixtures/module-unification-app/npm/package.json
index 87775c748..23a2e444a 100644
--- a/tests/fixtures/module-unification-app/npm/package.json
+++ b/tests/fixtures/module-unification-app/npm/package.json
@@ -17,6 +17,8 @@
     "test": "ember test"
   },
   "devDependencies": {
+    "@ember/jquery": "^0.5.1",
+    "@ember/optional-features": "^0.6.1",
     "broccoli-asset-rev": "^2.7.0",
     "ember-ajax": "^3.0.0",
     "ember-cli": "github:ember-cli/ember-cli",
diff --git a/tests/fixtures/module-unification-app/yarn/package.json b/tests/fixtures/module-unification-app/yarn/package.json
index fa4c46644..b7e82c750 100644
--- a/tests/fixtures/module-unification-app/yarn/package.json
+++ b/tests/fixtures/module-unification-app/yarn/package.json
@@ -17,6 +17,8 @@
     "test": "ember test"
   },
   "devDependencies": {
+    "@ember/jquery": "^0.5.1",
+    "@ember/optional-features": "^0.6.1",
     "broccoli-asset-rev": "^2.7.0",
     "ember-ajax": "^3.0.0",
     "ember-cli": "github:ember-cli/ember-cli",
diff --git a/tests/helpers/default-packager.js b/tests/helpers/default-packager.js
index c1d989433..79fcf1368 100644
--- a/tests/helpers/default-packager.js
+++ b/tests/helpers/default-packager.js
@@ -54,7 +54,7 @@ const DEFAULT_NODE_MODULES = {
       `,
     'package.json': JSON.stringify({
       name: 'ember-source',
-      version: '3.0.0-beta.1',
+      version: '~3.0.0-beta.1',
       keywords: ['ember-addon'],
       paths: {
         debug: 'vendor/ember/ember.debug.js',
diff --git a/tests/unit/blueprints/addon-test.js b/tests/unit/blueprints/addon-test.js
index 95775d5f0..905dcaa68 100644
--- a/tests/unit/blueprints/addon-test.js
+++ b/tests/unit/blueprints/addon-test.js
@@ -77,7 +77,7 @@ describe('blueprint - addon', function() {
   "devDependencies": {\n\
     "ember-disable-prototype-extensions": "^1.1.2",\n\
     "ember-source-channel-url": "^1.0.1",\n\
-    "ember-try": "^0.2.23",\n\
+    "ember-try": "^1.0.0-beta.3",\n\
     "eslint-plugin-node": "^6.0.1"\n\
   },\n\
   "ember-addon": {\n\
diff --git a/tests/unit/broccoli/default-packager/javascript-test.js b/tests/unit/broccoli/default-packager/javascript-test.js
index 63760347f..0824c0da2 100644
--- a/tests/unit/broccoli/default-packager/javascript-test.js
+++ b/tests/unit/broccoli/default-packager/javascript-test.js
@@ -297,109 +297,16 @@ describe('Default Packager: Javascript', function() {
     expect(addonPostprocessTreeHookCalled).to.equal(true);
   }));
 
-});
-
-if (experiments.MODULE_UNIFICATION) {
-  // there is a little code duplication here (mainly the ceremony around
-  // setting up the folder structure and disposing of it after the tests are
-  // executed; once we enable MU flag by defaul, we should clean this up a tad
-  describe('with module unification layout', function() {
-    let inputMU, outputMU;
-    let addonPreprocessTreeHookCalled = false;
-    let addonPostprocessTreeHookCalled = false;
-
-    let MU_LAYOUT = {
-      'addon-tree-output': {},
-      public: {},
-      tests: {},
-      vendor: {},
-      src: {
-        'main.js': '',
-        'resolver.js': '',
-        'router.js': '',
-        ui: {
-          components: {
-            'login-form': {
-              'component.js': '',
-              'template.hbs': '',
-            },
-          },
-          'index.html': '',
-          routes: {
-            application: {
-              'template.hbs': '',
-            },
-          },
-          styles: {
-            'app.css': 'html { height: 100%; }',
-          },
-        },
-      },
-    };
-    before(co.wrap(function *() {
-      inputMU = yield createTempDir();
-
-      inputMU.write(MU_LAYOUT);
-    }));
-
-    after(co.wrap(function *() {
-      yield inputMU.dispose();
-    }));
-
-    afterEach(co.wrap(function *() {
-      yield outputMU.dispose();
-    }));
-
-    it('processes javascript according to the registry', co.wrap(function *() {
-      let defaultPackager = new DefaultPackager({
-        name: 'the-best-app-ever',
-
-        distPaths: {
-          appJsFile: '/assets/the-best-app-ever.js',
-          appCssFile: '/assets/the-best-app-ever.css',
-          vendorJsFile: '/assets/vendor.js',
-        },
-
-        registry: setupRegistry({
-          js: tree => tree,
-          template: tree => new Funnel(tree, {
-            getDestinationPath(relativePath) {
-              return relativePath.replace(/hbs$/g, 'js');
-            },
-          }),
-        }),
-
-        isModuleUnificationEnabled: true,
-
-        // avoid using `testdouble.js` here on purpose; it does not have a "proxy"
-        // option, where a function call would be registered and the original
-        // would be returned
-        project: {
-          addons: [{
-            preprocessTree(type, tree) {
-              addonPreprocessTreeHookCalled = true;
-
-              return tree;
-            },
-            postprocessTree(type, tree) {
-              addonPostprocessTreeHookCalled = true;
-
-              return tree;
-            },
-          }],
-        },
-      });
-
-      expect(defaultPackager._cachedProcessedSrc).to.equal(null);
-
-      outputMU = yield buildOutput(defaultPackager.processSrc(inputMU.path()));
-
-      let outputFiles = outputMU.read();
-
-      expect(outputFiles['the-best-app-ever']).to.deep.equal({
-        assets: {
-          'app.css': 'html { height: 100%; }',
-        },
+  if (experiments.MODULE_UNIFICATION) {
+    // there is a little code duplication here (mainly the ceremony around
+    // setting up the folder structure and disposing of it after the tests are
+    // executed; once we enable MU flag by defaul, we should clean this up a tad
+    describe('with module unification layout', function() {
+      let input, output;
+      let addonPreprocessTreeHookCalled = false;
+      let addonPostprocessTreeHookCalled = false;
+
+      let MU_LAYOUT = {
         src: {
           'main.js': '',
           'resolver.js': '',
@@ -408,24 +315,21 @@ if (experiments.MODULE_UNIFICATION) {
             components: {
               'login-form': {
                 'component.js': '',
-                'template.js': '',
+                'template.hbs': '',
               },
             },
             'index.html': '',
             routes: {
               application: {
-                'template.js': '',
+                'template.hbs': '',
               },
             },
             styles: {
-              'app.css': 'html { height: 100%; }',
+              'app.css': '',
             },
           },
         },
-      });
-    }));
-
-    it('runs pre/post-process add-on hooks', co.wrap(function *() {
+      };
       let defaultPackager = new DefaultPackager({
         name: 'the-best-app-ever',
 
@@ -465,10 +369,64 @@ if (experiments.MODULE_UNIFICATION) {
         },
       });
 
-      outputMU = yield buildOutput(defaultPackager.processSrc(inputMU.path()));
+      before(co.wrap(function *() {
+        input = yield createTempDir();
+
+        input.write(MU_LAYOUT);
+      }));
+
+      after(co.wrap(function *() {
+        yield input.dispose();
+      }));
+
+      afterEach(co.wrap(function *() {
+        yield output.dispose();
+      }));
+
+      it('processes javascript according to the registry', co.wrap(function *() {
+        expect(defaultPackager._cachedProcessedSrc).to.equal(null);
 
-      expect(addonPreprocessTreeHookCalled).to.equal(true);
-      expect(addonPostprocessTreeHookCalled).to.equal(true);
-    }));
-  });
-}
+        output = yield buildOutput(defaultPackager.processSrc(input.path()));
+
+        let outputFiles = output.read();
+
+        expect(outputFiles['the-best-app-ever']).to.deep.equal({
+          assets: {
+            'app.css': '',
+          },
+          src: {
+            'main.js': '',
+            'resolver.js': '',
+            'router.js': '',
+            ui: {
+              components: {
+                'login-form': {
+                  'component.js': '',
+                  'template.js': '',
+                },
+              },
+              'index.html': '',
+              routes: {
+                application: {
+                  'template.js': '',
+                },
+              },
+              styles: {
+                'app.css': '',
+              },
+            },
+          },
+        });
+      }));
+
+      it('runs pre/post-process add-on hooks', co.wrap(function *() {
+        expect(defaultPackager._cachedProcessedSrc).to.equal(null);
+
+        output = yield buildOutput(defaultPackager.processSrc(input.path()));
+
+        expect(addonPreprocessTreeHookCalled).to.equal(true);
+        expect(addonPostprocessTreeHookCalled).to.equal(true);
+      }));
+    });
+  }
+});
diff --git a/tests/unit/broccoli/default-packager/styles-test.js b/tests/unit/broccoli/default-packager/styles-test.js
index b7a773e7a..fd2edf53f 100644
--- a/tests/unit/broccoli/default-packager/styles-test.js
+++ b/tests/unit/broccoli/default-packager/styles-test.js
@@ -3,7 +3,6 @@
 const co = require('co');
 const expect = require('chai').expect;
 const Funnel = require('broccoli-funnel');
-const experiments = require('../../../../lib/experiments');
 const DefaultPackager = require('../../../../lib/broccoli/default-packager');
 const broccoliTestHelper = require('broccoli-test-helper');
 const defaultPackagerHelpers = require('../../../helpers/default-packager');
@@ -39,8 +38,7 @@ describe('Default Packager: Styles', function() {
         'environment.js': 'environment.js',
       },
       styles: {
-        'app.css': '@import "extra.css";\nhtml { height: 100%; }',
-        'extra.css': 'body{ position: relative; }',
+        'app.css': 'html { height: 100%; }',
       },
       'templates': {},
     },
@@ -95,7 +93,7 @@ describe('Default Packager: Styles', function() {
 
       minifyCSS: {
         enabled: true,
-        options: { processImport: false },
+        options: {},
       },
 
       styleOutputFiles,
@@ -145,7 +143,6 @@ describe('Default Packager: Styles', function() {
     let outputFiles = output.read();
 
     expect(Object.keys(outputFiles.assets)).to.deep.equal([
-      'extra.css',
       'the-best-app-ever.css',
       'vendor.css',
     ]);
@@ -154,7 +151,7 @@ describe('Default Packager: Styles', function() {
     ).to.equal('body { height: 100%; }');
     expect(
       outputFiles.assets['the-best-app-ever.css'].trim()
-    ).to.equal('@import "extra.css";\nhtml { height: 100%; }');
+    ).to.equal('html { height: 100%; }');
   }));
 
   it('minifies css files when minification is enabled', co.wrap(function *() {
@@ -191,7 +188,6 @@ describe('Default Packager: Styles', function() {
     let outputFiles = output.read();
 
     expect(Object.keys(outputFiles.assets)).to.deep.equal([
-      'extra.css',
       'the-best-app-ever.css',
       'vendor.css',
     ]);
@@ -200,7 +196,7 @@ describe('Default Packager: Styles', function() {
     ).to.match(/^\S+$/, 'css file is minified');
     expect(
       outputFiles.assets['the-best-app-ever.css'].trim()
-    ).to.match(/^@import \S+$/, 'css file is minified');
+    ).to.match(/^\S+$/, 'css file is minified');
   }));
 
   it('processes css according to the registry', co.wrap(function *() {
@@ -250,47 +246,6 @@ describe('Default Packager: Styles', function() {
     ]);
   }));
 
-  it('inlines css imports', co.wrap(function *() {
-    let defaultPackager = new DefaultPackager({
-      name: 'the-best-app-ever',
-      env: 'development',
-
-      distPaths: {
-        appCssFile: { app: '/assets/the-best-app-ever.css' },
-        vendorCssFile: '/assets/vendor.css',
-      },
-
-      registry: {
-        load: () => [],
-      },
-
-      minifyCSS: {
-        enabled: true,
-        options: {
-          processImport: true,
-          relativeTo: 'assets',
-        },
-      },
-
-      styleOutputFiles,
-
-      project: { addons: [] },
-    });
-
-    expect(defaultPackager._cachedProcessedStyles).to.equal(null);
-
-    output = yield buildOutput(defaultPackager.packageStyles(input.path()));
-
-    let outputFiles = output.read();
-
-    expect(outputFiles.assets['the-best-app-ever.css'].trim()).to.not.include(
-      '@import'
-    );
-    expect(outputFiles.assets['the-best-app-ever.css'].trim()).to.equal(
-      'body{position:relative}html{height:100%}'
-    );
-  }));
-
   it('runs pre/post-process add-on hooks', co.wrap(function *() {
     let addonPreprocessTreeHookCalled = false;
     let addonPostprocessTreeHookCalled = false;
@@ -388,114 +343,4 @@ describe('Default Packager: Styles', function() {
 
     expect(outputFiles.assets['vendor.css']).to.equal('first\nsecond\nthird');
   }));
-
-  if (experiments.MODULE_UNIFICATION) {
-    describe('with module unification layout', function() {
-      let importFilesMap = {
-        '/assets/vendor.css': [
-          'vendor/font-awesome/css/font-awesome.css',
-        ],
-      };
-      let input, output, processedSrc;
-
-      let MU_LAYOUT = {
-        'vendor': {
-          'font-awesome': {
-            css: {
-              'font-awesome.css': 'body { height: 100%; }',
-            },
-          },
-        },
-        src: {
-          'main.js': '',
-          'resolver.js': '',
-          'router.js': '',
-          ui: {
-            components: {
-              'login-form': {
-                'component.js': '',
-                'template.hbs': '',
-              },
-            },
-            'index.html': '',
-            routes: {
-              application: {
-                'template.hbs': '',
-              },
-            },
-            styles: {
-              'app.css': 'html { height: 100%; }',
-            },
-          },
-        },
-      };
-      let processedSrcFolder = {
-        'the-best-app-ever': {
-          src: MU_LAYOUT,
-          assets: {
-            'the-best-app-ever.css': 'html { height: 100%; }',
-          },
-        },
-      };
-
-      let defaultPackager = new DefaultPackager({
-        name: 'the-best-app-ever',
-
-        distPaths: {
-          appCssFile: { app: '/assets/the-best-app-ever.css' },
-          vendorCssFile: '/assets/vendor.css',
-        },
-
-        registry: {
-          load: () => [],
-        },
-
-        minifyCSS: {
-          enabled: true,
-          options: {
-            processImport: false,
-            relativeTo: 'assets',
-          },
-        },
-
-        styleOutputFiles: importFilesMap,
-
-        isModuleUnificationEnabled: true,
-
-        project: { addons: [] },
-      });
-
-      before(co.wrap(function *() {
-        input = yield createTempDir();
-        processedSrc = yield createTempDir();
-
-        input.write(MU_LAYOUT);
-        processedSrc.write(processedSrcFolder);
-      }));
-
-      after(co.wrap(function *() {
-        yield input.dispose();
-        yield processedSrc.dispose();
-      }));
-
-      afterEach(co.wrap(function *() {
-        yield output.dispose();
-      }));
-
-      it('processes styles according to the registry', co.wrap(function *() {
-        defaultPackager._cachedProcessedSrc = processedSrc.path();
-
-        output = yield buildOutput(defaultPackager.packageStyles(input.path()));
-
-        let outputFiles = output.read();
-
-        expect(outputFiles).to.deep.equal({
-          assets: {
-            'the-best-app-ever.css': 'html{height:100%}',
-            'vendor.css': 'body{height:100%}',
-          },
-        });
-      }));
-    });
-  }
 });
diff --git a/tests/unit/broccoli/default-packager/tests-test.js b/tests/unit/broccoli/default-packager/tests-test.js
index 4eebec92e..011e9e96d 100644
--- a/tests/unit/broccoli/default-packager/tests-test.js
+++ b/tests/unit/broccoli/default-packager/tests-test.js
@@ -4,7 +4,6 @@ const co = require('co');
 const stew = require('broccoli-stew');
 const Funnel = require('broccoli-funnel');
 const expect = require('chai').expect;
-const experiments = require('../../../../lib/experiments');
 const DefaultPackager = require('../../../../lib/broccoli/default-packager');
 const broccoliTestHelper = require('broccoli-test-helper');
 const defaultPackagerHelpers = require('../../../helpers/default-packager');
@@ -454,148 +453,4 @@ describe('Default Packager: Tests', function() {
     expect(outputFiles.assets['test-support.js']).to.include('a.js\nb.js');
     expect(outputFiles.assets['test-support.css']).to.include('a.css\nb.css');
   }));
-
-  if (experiments.MODULE_UNIFICATION) {
-    describe('with module unification layout', function() {
-      let input, output;
-
-      let MU_LAYOUT = {
-        vendor: {
-          'ember-cli': {
-            'app-boot.js': 'app-boot.js',
-            'app-config.js': 'app-config.js',
-            'app-prefix.js': 'app-prefix.js',
-            'app-suffix.js': 'app-suffix.js',
-            'test-support-prefix.js': 'test-support-prefix.js',
-            'test-support-suffix.js': 'test-support-suffix.js',
-            'tests-prefix.js': 'tests-prefix.js',
-            'tests-suffix.js': 'tests-suffix.js',
-            'vendor-prefix.js': 'vendor-prefix.js',
-            'vendor-suffix.js': 'vendor-suffix.js',
-          },
-        },
-        tests: {
-          'addon-test-support': {},
-          acceptance: {
-            'login-test.js': ' // login-test.js',
-            'logout-test.js': '',
-          },
-          lint: {
-            'login-test.lint.js': ' // login-test.lint.js',
-            'logout-test.lint.js': '',
-          },
-          helpers: {
-            'resolver.js': '',
-            'start-app.js': '',
-          },
-          'index.html': 'index',
-          integration: {
-            components: {
-              'login-form-test.js': '',
-              'user-menu-test.js': '',
-            },
-          },
-          'test-helper.js': '// test-helper.js',
-          unit: {
-            services: {
-              'session-test.js': '',
-            },
-          },
-        },
-        src: {
-          'main.js': '',
-          'resolver.js': '',
-          'router.js': '',
-          ui: {
-            components: {
-              'login-form': {
-                'component.js': '',
-                'template.hbs': '',
-              },
-            },
-            'index.html': '',
-            routes: {
-              application: {
-                'template.hbs': '',
-              },
-            },
-            styles: {
-              'app.css': 'html { height: 100%; }',
-            },
-          },
-        },
-      };
-
-      before(co.wrap(function *() {
-        input = yield createTempDir();
-
-        input.write(MU_LAYOUT);
-      }));
-
-      after(co.wrap(function *() {
-        yield input.dispose();
-      }));
-
-      afterEach(co.wrap(function *() {
-        yield output.dispose();
-      }));
-
-      it('packages test files', co.wrap(function *() {
-        let defaultPackager = new DefaultPackager({
-          project,
-          name,
-          env,
-          areTestsEnabled: true,
-
-          distPaths: {
-            testJsFile: '/assets/tests.js',
-            testSupportJsFile: {
-              testSupport: '/assets/test-support.js',
-              testLoader: '/assets/test-loader.js',
-            },
-            testSupportCssFile: '/assets/test-support.css',
-          },
-
-          isModuleUnification: true,
-
-          vendorTestStaticStyles: [],
-          legacyTestFilesToAppend: [],
-
-          fingerprint: {
-            exclude: [],
-          },
-
-          registry: setupRegistryFor('js', tree => tree),
-        });
-
-        output = yield buildOutput(defaultPackager.packageTests(input.path()));
-
-        let outputFiles = output.read();
-
-        expect(Object.keys(outputFiles.tests)).to.deep.equal([
-          'index.html',
-        ]);
-
-        expect(Object.keys(outputFiles.assets)).to.deep.equal([
-          'test-support.js',
-          'test-support.map',
-          'tests.js',
-          'tests.map',
-        ]);
-
-        expect(Object.keys(outputFiles)).to.deep.equal([
-          'assets',
-          'testem.js',
-          'tests',
-        ]);
-
-        expect(outputFiles.assets['tests.js']).to.include('login-test.js');
-        expect(outputFiles.assets['tests.js']).to.include('login-test.lint.js');
-        expect(outputFiles.assets['tests.js']).to.include('test-helper');
-        expect(outputFiles.assets['tests.js']).to.include(`define('the-best-app-ever/config/environment'`);
-        expect(outputFiles.assets['tests.js']).to.include(`require('the-best-app-ever/tests/test-helper');`);
-        expect(outputFiles.assets['tests.js']).to.include('EmberENV.TESTS_FILE_LOADED = true;');
-      }));
-    });
-  }
 });
diff --git a/tests/unit/broccoli/ember-app-test.js b/tests/unit/broccoli/ember-app-test.js
index 54982b006..d21c7e23f 100644
--- a/tests/unit/broccoli/ember-app-test.js
+++ b/tests/unit/broccoli/ember-app-test.js
@@ -1154,35 +1154,6 @@ describe('EmberApp', function() {
       expect(Object.keys(app.vendorFiles)).to.deep.equal(defaultVendorFiles);
     });
 
-    it('does not include jquery if the app has `@ember/jquery` installed', function() {
-      project.initializeAddons = function() {
-        this.addons = [{ name: '@ember/jquery' }];
-      };
-      app = new EmberApp({ project });
-      let filesWithoutJQuery = defaultVendorFiles.filter(e => e !== 'jquery.js');
-      expect(Object.keys(app.vendorFiles)).to.deep.equal(filesWithoutJQuery);
-    });
-
-    it('does not include jquery if the app has `@ember/optional-features` with the `jquery-integration` FF turned off', function() {
-      project.initializeAddons = function() {
-        this.addons = [
-          {
-            name: 'ember-source',
-            paths: { jquery: 'foo', testing: null },
-          },
-          {
-            name: '@ember/optional-features',
-            isFeatureEnabled() {
-              return false;
-            },
-          },
-        ];
-      };
-      app = new EmberApp({ project, vendorFiles: { 'ember-testing.js': null } });
-      let filesWithoutJQuery = defaultVendorFiles.filter(e => e !== 'jquery.js');
-      expect(Object.keys(app.vendorFiles)).to.deep.equal(filesWithoutJQuery);
-    });
-
     it('removes dependency in vendorFiles', function() {
       app = new EmberApp({
         project,