Skip to content

Commit

Permalink
Remove TARGET_IE11 flag (#7739)
Browse files Browse the repository at this point in the history
* Remove TARGET_IE11 flag

* SHOULD_TRANSPILE just like emberjs

* just do all browsers in prod env

* update moar targets
  • Loading branch information
snewcomer committed Nov 21, 2021
1 parent 459f68e commit 85269c9
Show file tree
Hide file tree
Showing 18 changed files with 59 additions and 98 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,9 @@ jobs:
strategy:
fail-fast: false
matrix:
launcher: [Chrome, Firefox, IE]
launcher: [Chrome, Firefox]
os: [macos-latest, windows-latest, ubuntu-latest]
exclude:
- os: macos-latest
launcher: IE
- os: ubuntu-latest
launcher: IE
- os: ubuntu-latest
launcher: Firefox
- os: windows-latest
Expand Down Expand Up @@ -253,7 +249,6 @@ jobs:
matrix:
scenario:
[
with-max-transpilation,
with-native-fetch,
with-ember-fetch-no-jquery,
with-ember-fetch-and-jquery,
Expand Down
7 changes: 0 additions & 7 deletions packages/-ember-data/config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ module.exports = function () {
return {
useYarn: true,
scenarios: [
{
name: 'with-max-transpilation',
env: {
TARGET_IE11: true,
},
npm: {},
},
{
name: 'with-ember-fetch-no-jquery',
env: {
Expand Down
3 changes: 1 addition & 2 deletions packages/-ember-data/ember-cli-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ const EmberAddon = require('ember-cli/lib/broccoli/ember-addon');
module.exports = function (defaults) {
const isTest = process.env.EMBER_CLI_TEST_COMMAND;
const isProd = process.env.EMBER_ENV === 'production';
const needsIE11 = !!process.env.TARGET_IE11;
const compatWith = process.env.EMBER_DATA_FULL_COMPAT ? '99.0' : null;

const terserSettings = {
exclude: ['assets/dummy.js', 'assets/tests.js', 'assets/test-support.js', 'dist/docs/*', 'docs/*'],
};

if (isTest && isProd && needsIE11) {
if (isTest && isProd) {
terserSettings.enabled = false;
}

Expand Down
8 changes: 4 additions & 4 deletions packages/-ember-data/tests/dummy/config/targets.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
'use strict';

const browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
const targetIsIE11 = process.env.TESTEM_CI_LAUNCHER === 'IE' || !!process.env.TARGET_IE11;
let browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
const isProd = process.env.EMBER_ENV === 'production';

if (targetIsIE11) {
browsers.push('ie 11');
if (isProd) {
browsers = ['last 2 Chrome versions', 'last 2 Firefox versions', 'Safari 12', 'last 2 Edge versions'];
}

module.exports = {
Expand Down
9 changes: 4 additions & 5 deletions packages/adapter/tests/dummy/config/targets.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
'use strict';

const browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
let browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
const isProd = process.env.EMBER_ENV === 'production';

const needsIE11 = !!process.env.TARGET_IE11;

if (needsIE11) {
browsers.push('ie 11');
if (isProd) {
browsers = ['last 2 Chrome versions', 'last 2 Firefox versions', 'Safari 12', 'last 2 Edge versions'];
}

module.exports = {
Expand Down
9 changes: 4 additions & 5 deletions packages/debug/tests/dummy/config/targets.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
'use strict';

const browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
let browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
const isProd = process.env.EMBER_ENV === 'production';

const needsIE11 = !!process.env.TARGET_IE11;

if (needsIE11) {
browsers.push('ie 11');
if (isProd) {
browsers = ['last 2 Chrome versions', 'last 2 Firefox versions', 'Safari 12', 'last 2 Edge versions'];
}

module.exports = {
Expand Down
9 changes: 4 additions & 5 deletions packages/model/tests/dummy/config/targets.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
'use strict';

const browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
let browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
const isProd = process.env.EMBER_ENV === 'production';

const needsIE11 = !!process.env.TARGET_IE11;

if (needsIE11) {
browsers.push('ie 11');
if (isProd) {
browsers = ['last 2 Chrome versions', 'last 2 Firefox versions', 'Safari 12', 'last 2 Edge versions'];
}

module.exports = {
Expand Down
8 changes: 4 additions & 4 deletions packages/record-data/tests/dummy/config/targets.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
'use strict';

const browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
const targetIsIE11 = process.env.TESTEM_CI_LAUNCHER === 'IE' || !!process.env.TARGET_IE11;
let browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
const isProd = process.env.EMBER_ENV === 'production';

if (targetIsIE11) {
browsers.push('ie 11');
if (isProd) {
browsers = ['last 2 Chrome versions', 'last 2 Firefox versions', 'Safari 12', 'last 2 Edge versions'];
}

module.exports = {
Expand Down
9 changes: 4 additions & 5 deletions packages/serializer/tests/dummy/config/targets.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
'use strict';

const browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
let browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
const isProd = process.env.EMBER_ENV === 'production';

const needsIE11 = !!process.env.TARGET_IE11;

if (needsIE11) {
browsers.push('ie 11');
if (isProd) {
browsers = ['last 2 Chrome versions', 'last 2 Firefox versions', 'Safari 12', 'last 2 Edge versions'];
}

module.exports = {
Expand Down
9 changes: 4 additions & 5 deletions packages/store/tests/dummy/config/targets.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
'use strict';

const browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
let browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
const isProd = process.env.EMBER_ENV === 'production';

const needsIE11 = !!process.env.TARGET_IE11;

if (needsIE11) {
browsers.push('ie 11');
if (isProd) {
browsers = ['last 2 Chrome versions', 'last 2 Firefox versions', 'Safari 12', 'last 2 Edge versions'];
}

module.exports = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
'use strict';

const browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
let browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
const isProd = process.env.EMBER_ENV === 'production';

const isCI = !!process.env.CI;
const isProduction = process.env.EMBER_ENV === 'production';

if (isCI || isProduction) {
browsers.push('ie 11');
if (isProd) {
browsers = ['last 2 Chrome versions', 'last 2 Firefox versions', 'Safari 12', 'last 2 Edge versions'];
}

module.exports = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
'use strict';

const browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
let browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
const isProd = process.env.EMBER_ENV === 'production';

const isCI = !!process.env.CI;
const isProduction = process.env.EMBER_ENV === 'production';

if (isCI || isProduction) {
browsers.push('ie 11');
if (isProd) {
browsers = ['last 2 Chrome versions', 'last 2 Firefox versions', 'Safari 12', 'last 2 Edge versions'];
}

module.exports = {
Expand Down
10 changes: 4 additions & 6 deletions packages/unpublished-fastboot-test-app/config/targets.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
'use strict';

const browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
let browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
const isProd = process.env.EMBER_ENV === 'production';

const isCI = !!process.env.CI;
const isProduction = process.env.EMBER_ENV === 'production';

if (isCI || isProduction) {
browsers.push('ie 11');
if (isProd) {
browsers = ['last 2 Chrome versions', 'last 2 Firefox versions', 'Safari 12', 'last 2 Edge versions'];
}

module.exports = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
'use strict';

const browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
let browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
const isProd = process.env.EMBER_ENV === 'production';

const isCI = !!process.env.CI;
const isProduction = process.env.EMBER_ENV === 'production';

if (isCI || isProduction) {
browsers.push('ie 11');
if (isProd) {
browsers = ['last 2 Chrome versions', 'last 2 Firefox versions', 'Safari 12', 'last 2 Edge versions'];
}

module.exports = {
Expand Down
9 changes: 1 addition & 8 deletions packages/unpublished-model-encapsulation-test-app/testem.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
// eslint-disable-next-line node/no-unpublished-require
const customDotReporter = require('@ember-data/unpublished-test-infra/src/testem/custom-dot-reporter');

const TestIE = process.env.TEST_IE11;

if (TestIE) {
// eslint-disable-next-line no-console
console.log('\n\nLaunching with IE\n\n');
}

module.exports = {
test_page: 'tests/index.html?hidepassed&nocontainer',
disable_watching: true,
reporter: customDotReporter,
launch_in_ci: TestIE ? ['IE'] : ['Chrome'],
launch_in_ci: ['Chrome'],
launch_in_dev: ['Chrome'],
browser_start_timeout: 120,
browser_args: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
'use strict';

const browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
let browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
const isProd = process.env.EMBER_ENV === 'production';

const isCI = !!process.env.CI;
const isProduction = process.env.EMBER_ENV === 'production';

if (isCI || isProduction) {
browsers.push('ie 11');
if (isProd) {
browsers = ['last 2 Chrome versions', 'last 2 Firefox versions', 'Safari 12', 'last 2 Edge versions'];
}

module.exports = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
'use strict';

const browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
let browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
const isProd = process.env.EMBER_ENV === 'production';

const isCI = !!process.env.CI;
const isProduction = process.env.EMBER_ENV === 'production';

if (isCI || isProduction) {
browsers.push('ie 11');
if (isProd) {
browsers = ['last 2 Chrome versions', 'last 2 Firefox versions', 'Safari 12', 'last 2 Edge versions'];
}

module.exports = {
Expand Down
10 changes: 4 additions & 6 deletions packages/unpublished-test-infra/tests/dummy/config/targets.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
'use strict';

const browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
let browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
const isProd = process.env.EMBER_ENV === 'production';

const isCI = !!process.env.CI;
const isProduction = process.env.EMBER_ENV === 'production';

if (isCI || isProduction) {
browsers.push('ie 11');
if (isProd) {
browsers = ['last 2 Chrome versions', 'last 2 Firefox versions', 'Safari 12', 'last 2 Edge versions'];
}

module.exports = {
Expand Down

0 comments on commit 85269c9

Please sign in to comment.