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..c62c1868 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.47.2", "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..7c944f59 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.47.2 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.47.2 broccoli-stew: 3.0.0 ember-auto-import: 2.2.4_webpack@5.64.4 ember-cli: 3.28.4 @@ -1306,6 +1308,14 @@ packages: typescript-memoize: 1.1.0 dev: true + /@embroider/test-setup/0.47.2: + resolution: {integrity: sha512-zTiNaicOeBJWQ+uAJOEg4Z4plmvF2Ckze+tMZ0sycp2o09UV72WC8s9L3pssWOGgHMV6Kl+eCfFQelWwUOqz1Q==} + engines: {node: 12.* || 14.* || >= 16} + 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}