From 5ee8511525b58131965f124fa0e175be9875c856 Mon Sep 17 00:00:00 2001 From: Travis Hoover Date: Mon, 22 Mar 2021 12:21:02 -0700 Subject: [PATCH] Add `embroider` test suite --- .github/workflows/ci.yml | 2 ++ config/ember-try.js | 3 +++ ember-cli-build.js | 3 ++- package.json | 1 + pnpm-lock.yaml | 9 +++++++++ 5 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8950d7a2..166c4a10 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -76,6 +76,8 @@ jobs: - ember-release - ember-beta - ember-canary + - embroider-safe + - embroider-optimized steps: - uses: actions/checkout@v2 diff --git a/config/ember-try.js b/config/ember-try.js index 2a13a121..0373e6a3 100644 --- a/config/ember-try.js +++ b/config/ember-try.js @@ -3,6 +3,7 @@ /* eslint-env node */ const getChannelURL = require('ember-source-channel-url'); +const { embroiderSafe, embroiderOptimized } = require('@embroider/test-setup'); module.exports = function () { return Promise.all([ @@ -93,6 +94,8 @@ module.exports = function () { devDependencies: {}, }, }, + embroiderSafe(), + embroiderOptimized(), ], }; }); diff --git a/ember-cli-build.js b/ember-cli-build.js index 2b7592ec..5104d298 100644 --- a/ember-cli-build.js +++ b/ember-cli-build.js @@ -24,5 +24,6 @@ module.exports = function (defaults) { behave. You most likely want to be modifying `./index.js` or app's build file */ - return app.toTree(); + const { maybeEmbroider } = require('@embroider/test-setup'); + return maybeEmbroider(app); }; diff --git a/package.json b/package.json index 6943ac1b..a32ba4a8 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "@babel/core": "7.16.0", "@ember/optional-features": "2.0.0", "@ember/test-helpers": "2.6.0", + "@embroider/test-setup": "^0.37.0", "broccoli-stew": "3.0.0", "ember-auto-import": "2.2.4", "ember-cli": "3.28.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 15236537..457635fe 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,6 +4,7 @@ specifiers: '@babel/core': 7.16.0 '@ember/optional-features': 2.0.0 '@ember/test-helpers': 2.6.0 + '@embroider/test-setup': ^0.37.0 broccoli-stew: 3.0.0 calculate-cache-key-for-tree: ^2.0.0 ember-auto-import: 2.2.4 @@ -46,6 +47,7 @@ devDependencies: '@babel/core': 7.16.0 '@ember/optional-features': 2.0.0 '@ember/test-helpers': 2.6.0_@babel+core@7.16.0 + '@embroider/test-setup': 0.37.0 broccoli-stew: 3.0.0 ember-auto-import: 2.2.4_webpack@5.64.4 ember-cli: 3.28.4 @@ -1306,6 +1308,13 @@ packages: typescript-memoize: 1.1.0 dev: true + /@embroider/test-setup/0.37.0: + resolution: {integrity: sha512-4jme5zEonjGvKeyVRygyXmooMuwmaa3nBiIxwbkRA6KWh0BLyZSqPwlQl93s7IT7S5PO5U9TqNiqI4yp2k5T7Q==} + dependencies: + lodash: 4.17.21 + resolve: 1.20.0 + dev: true + /@eslint/eslintrc/1.0.4: resolution: {integrity: sha512-h8Vx6MdxwWI2WM8/zREHMoqdgLNXEL4QX3MWSVMdyNJGvXVOs+6lp+m2hc3FnuMHDc4poxFNI20vCk0OmI4G0Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}