Skip to content

Commit

Permalink
[BUGFIX beta] Comment out IE11 for new apps to avoid deprecation
Browse files Browse the repository at this point in the history
ember-source warns about having IE11 in targets, so we are removing
it from the blueprints for a better out-of-the-box experience. In
order to make it easier to notice for apps running ember-cli-update
a big block of comment was added so it's more likely to be caught.
  • Loading branch information
chancancode committed Jun 11, 2021
1 parent 59420cf commit 4373c5c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
20 changes: 14 additions & 6 deletions blueprints/app/files/config/targets.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,20 @@ const browsers = [
'last 1 Safari versions',
];

const isCI = Boolean(process.env.CI);
const isProduction = process.env.EMBER_ENV === 'production';

if (isCI || isProduction) {
browsers.push('ie 11');
}
// Ember's browser support policy is changing, and IE11 support will end in
// v4.0 onwards.
//
// See https://deprecations.emberjs.com/v3.x#toc_3-0-browser-support-policy
//
// If you need IE11 support on a version of Ember that still offers support
// for it, uncomment the code block below.
//
// const isCI = Boolean(process.env.CI);
// const isProduction = process.env.EMBER_ENV === 'production';
//
// if (isCI || isProduction) {
// browsers.push('ie 11');
// }

module.exports = {
browsers,
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/new-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ describe('Acceptance: ember new', function () {
await ember(['new', 'foo', '--skip-npm', '--skip-bower']);

process.env.CI = true;
const defaultTargets = require('../../lib/utilities/default-targets').browsers;
const defaultTargets = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
const blueprintTargets = require(path.resolve('config/targets.js')).browsers;
expect(blueprintTargets).to.have.same.deep.members(defaultTargets);
});
Expand Down

1 comment on commit 4373c5c

@rwjblue
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Please sign in to comment.