Skip to content

Commit

Permalink
use browserlist file in test-infra pacakge
Browse files Browse the repository at this point in the history
  • Loading branch information
snewcomer committed Nov 5, 2021
1 parent 4e3c7b7 commit 9e2b604
Show file tree
Hide file tree
Showing 20 changed files with 49 additions and 83 deletions.
8 changes: 3 additions & 5 deletions packages/-ember-data/tests/dummy/config/targets.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
'use strict';

let browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
const isProd = process.env.EMBER_ENV === 'production';
const { allSupportedBrowsers, modernBrowsers } = require('@ember-data/unpublished-test-infra/browserlist');

if (isProd) {
browsers = ['last 2 Chrome versions', 'last 2 Firefox versions', 'Safari 12', 'last 2 Edge versions'];
}
const isProd = process.env.EMBER_ENV === 'production';
let browsers = isProd ? allSupportedBrowsers : modernBrowsers;

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

let browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
const isProd = process.env.EMBER_ENV === 'production';
const { allSupportedBrowsers, modernBrowsers } = require('@ember-data/unpublished-test-infra/browserlist');

if (isProd) {
browsers = ['last 2 Chrome versions', 'last 2 Firefox versions', 'Safari 12', 'last 2 Edge versions'];
}
const isProd = process.env.EMBER_ENV === 'production';
let browsers = isProd ? allSupportedBrowsers : modernBrowsers;

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

let browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
const isProd = process.env.EMBER_ENV === 'production';
const { allSupportedBrowsers, modernBrowsers } = require('@ember-data/unpublished-test-infra/browserlist');

if (isProd) {
browsers = ['last 2 Chrome versions', 'last 2 Firefox versions', 'Safari 12', 'last 2 Edge versions'];
}
const isProd = process.env.EMBER_ENV === 'production';
let browsers = isProd ? allSupportedBrowsers : modernBrowsers;

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

let browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
const isProd = process.env.EMBER_ENV === 'production';
const { allSupportedBrowsers, modernBrowsers } = require('@ember-data/unpublished-test-infra/browserlist');

if (isProd) {
browsers = ['last 2 Chrome versions', 'last 2 Firefox versions', 'Safari 12', 'last 2 Edge versions'];
}
const isProd = process.env.EMBER_ENV === 'production';
let browsers = isProd ? allSupportedBrowsers : modernBrowsers;

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

let browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
const isProd = process.env.EMBER_ENV === 'production';
const { allSupportedBrowsers, modernBrowsers } = require('@ember-data/unpublished-test-infra/browserlist');

if (isProd) {
browsers = ['last 2 Chrome versions', 'last 2 Firefox versions', 'Safari 12', 'last 2 Edge versions'];
}
const isProd = process.env.EMBER_ENV === 'production';
let browsers = isProd ? allSupportedBrowsers : modernBrowsers;

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

let browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
const isProd = process.env.EMBER_ENV === 'production';
const { allSupportedBrowsers, modernBrowsers } = require('@ember-data/unpublished-test-infra/browserlist');

if (isProd) {
browsers = ['last 2 Chrome versions', 'last 2 Firefox versions', 'Safari 12', 'last 2 Edge versions'];
}
const isProd = process.env.EMBER_ENV === 'production';
let browsers = isProd ? allSupportedBrowsers : modernBrowsers;

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

let browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
const isProd = process.env.EMBER_ENV === 'production';
const { allSupportedBrowsers, modernBrowsers } = require('@ember-data/unpublished-test-infra/browserlist');

if (isProd) {
browsers = ['last 2 Chrome versions', 'last 2 Firefox versions', 'Safari 12', 'last 2 Edge versions'];
}
const isProd = process.env.EMBER_ENV === 'production';
let browsers = isProd ? allSupportedBrowsers : modernBrowsers;

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

const browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
const { allSupportedBrowsers, modernBrowsers } = require('@ember-data/unpublished-test-infra/browserlist');

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

if (isCI || isProduction) {
browsers.push('ie 11');
}
const isProd = process.env.EMBER_ENV === 'production';
let browsers = isProd ? allSupportedBrowsers : modernBrowsers;

module.exports = {
browsers,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
"@ember-data/record-data": "4.1.0-alpha.11",
"@ember-data/serializer": "4.1.0-alpha.11",
"@ember-data/store": "4.1.0-alpha.11",
"@ember-data/unpublished-test-infra": "4.1.0-alpha.11",
"ember-inflector": "^4.0.1"
},
"devDependencies": {
"@ember-data/unpublished-test-infra": "4.1.0-alpha.11",
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "^2.2.5",
"broccoli-asset-rev": "^3.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
'use strict';

const browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
const { allSupportedBrowsers, modernBrowsers } = require('@ember-data/unpublished-test-infra/browserlist');

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

if (isCI || isProduction) {
browsers.push('ie 11');
}
const isProd = process.env.EMBER_ENV === 'production';
let browsers = isProd ? allSupportedBrowsers : modernBrowsers;

module.exports = {
browsers,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
"@ember-data/model": "4.1.0-alpha.11",
"@ember-data/serializer": "4.1.0-alpha.11",
"@ember-data/store": "4.1.0-alpha.11",
"@ember-data/unpublished-test-infra": "4.1.0-alpha.11",
"ember-inflector": "^4.0.1"
},
"devDependencies": {
"@ember-data/unpublished-test-infra": "4.1.0-alpha.11",
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "^2.2.5",
"broccoli-asset-rev": "^3.0.0",
Expand Down
10 changes: 3 additions & 7 deletions packages/unpublished-fastboot-test-app/config/targets.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
'use strict';

const browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
const { allSupportedBrowsers, modernBrowsers } = require('@ember-data/unpublished-test-infra/browserlist');

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

if (isCI || isProduction) {
browsers.push('ie 11');
}
const isProd = process.env.EMBER_ENV === 'production';
let browsers = isProd ? allSupportedBrowsers : modernBrowsers;

module.exports = {
browsers,
Expand Down
2 changes: 1 addition & 1 deletion packages/unpublished-fastboot-test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
"test:scenario": "ember try:one"
},
"dependencies": {
"@ember-data/unpublished-test-infra": "4.1.0-alpha.11",
"ember-data": "4.1.0-alpha.11",
"ember-inflector": "^4.0.1"
},
"devDependencies": {
"@ember-data/unpublished-test-infra": "4.1.0-alpha.11",
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "^2.2.5",
"@types/ember": "^3.16.5",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
'use strict';

const browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
const { allSupportedBrowsers, modernBrowsers } = require('@ember-data/unpublished-test-infra/browserlist');

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

if (isCI || isProduction) {
browsers.push('ie 11');
}
const isProd = process.env.EMBER_ENV === 'production';
let browsers = isProd ? allSupportedBrowsers : modernBrowsers;

module.exports = {
browsers,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
"@ember-data/private-build-infra": "4.1.0-alpha.11",
"@ember-data/serializer": "4.1.0-alpha.11",
"@ember-data/store": "4.1.0-alpha.11",
"@ember-data/unpublished-test-infra": "4.1.0-alpha.11",
"ember-inflector": "^4.0.1"
},
"devDependencies": {
"@ember-data/unpublished-test-infra": "4.1.0-alpha.11",
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "^2.2.5",
"broccoli-asset-rev": "^3.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
'use strict';

const browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
const { allSupportedBrowsers, modernBrowsers } = require('@ember-data/unpublished-test-infra/browserlist');

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

if (isCI || isProduction) {
browsers.push('ie 11');
}
const isProd = process.env.EMBER_ENV === 'production';
let browsers = isProd ? allSupportedBrowsers : modernBrowsers;

module.exports = {
browsers,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
"@ember-data/model": "4.1.0-alpha.11",
"@ember-data/serializer": "4.1.0-alpha.11",
"@ember-data/store": "4.1.0-alpha.11",
"@ember-data/unpublished-test-infra": "4.1.0-alpha.11",
"ember-inflector": "^4.0.1"
},
"devDependencies": {
"@ember-data/unpublished-test-infra": "4.1.0-alpha.11",
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "^2.2.5",
"broccoli-asset-rev": "^3.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
'use strict';

const browsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
const { allSupportedBrowsers, modernBrowsers } = require('@ember-data/unpublished-test-infra/browserlist');

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

if (isCI || isProduction) {
browsers.push('ie 11');
}
const isProd = process.env.EMBER_ENV === 'production';
let browsers = isProd ? allSupportedBrowsers : modernBrowsers;

module.exports = {
browsers,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
"@ember-data/model": "4.1.0-alpha.11",
"@ember-data/record-data": "4.1.0-alpha.11",
"@ember-data/store": "4.1.0-alpha.11",
"@ember-data/unpublished-test-infra": "4.1.0-alpha.11",
"ember-inflector": "^4.0.1"
},
"devDependencies": {
"@ember-data/unpublished-test-infra": "4.1.0-alpha.11",
"@ember/optional-features": "^2.0.0",
"@ember/test-helpers": "^2.2.5",
"broccoli-asset-rev": "^3.0.0",
Expand Down
4 changes: 4 additions & 0 deletions packages/unpublished-test-infra/browserlist.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
const modernBrowsers = ['last 1 Chrome versions', 'last 1 Firefox versions', 'last 1 Safari versions'];
const allSupportedBrowsers = ['last 2 Chrome versions', 'last 2 Firefox versions', 'Safari 12', 'last 2 Edge versions'];

export { modernBrowsers, allSupportedBrowsers };

0 comments on commit 9e2b604

Please sign in to comment.