Skip to content

Commit

Permalink
Merge pull request #7767 from emberjs/sn/ie-11-hacks
Browse files Browse the repository at this point in the history
Remove TARGET_IE11 flag
  • Loading branch information
snewcomer authored Nov 21, 2021
2 parents 0fad31d + 8729912 commit aaff64b
Show file tree
Hide file tree
Showing 48 changed files with 162 additions and 249 deletions.
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ module.exports = {
'packages/store/tests/dummy/app/config/environment.d.ts',
'packages/store/tests/dummy/app/app.ts',
'packages/store/addon/index.ts',
'packages/store/addon/-private/utils/symbol.ts',
'packages/store/addon/-private/utils/promise-record.ts',
'packages/store/addon/-private/utils/is-non-empty-string.ts',
'packages/store/addon/-private/utils/construct-resource.ts',
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/alpha-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 14.x
cache: 'yarn'
- name: Install dependencies for master
run: yarn install --frozen-lockfile --non-interactive
- name: Basic Tests
Expand All @@ -37,6 +38,7 @@ jobs:
with:
registry-url: 'https://registry.npmjs.org'
node-version: 14.x
cache: 'yarn'
- name: Install dependencies for master
run: yarn install --frozen-lockfile --non-interactive
- name: Make sure git user is setup
Expand Down
26 changes: 6 additions & 20 deletions .github/workflows/asset-size-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
branches:
- master

concurrency:
group: asset-size-${{ github.head_ref }}
cancel-in-progress: true

jobs:
asset-size-check:
runs-on: ubuntu-latest
Expand All @@ -15,6 +19,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 14.x
cache: 'yarn'
- name: Check SHA
run: |
sha=$(git rev-parse --short=8 HEAD)
Expand All @@ -29,10 +34,6 @@ jobs:
run: git checkout master
- name: Install dependencies for master
run: yarn install
- name: Build Production master (IE11)
run: |
mkdir -p packages/-ember-data/dists
EMBER_DATA_FULL_COMPAT=true TARGET_IE11=true yarn workspace ember-data ember build -e production --output-path dists/control-ie11
- name: Build Production master
run: EMBER_DATA_FULL_COMPAT=true yarn workspace ember-data ember build -e production --output-path dists/control
- name: Build Production master (no rollup)
Expand All @@ -43,31 +44,20 @@ jobs:
git checkout --progress --force $sha
- name: Install dependencies for ${{github.ref}}
run: yarn install
- name: Build Production ${{github.ref}} (IE11)
run: EMBER_DATA_FULL_COMPAT=true TARGET_IE11=true yarn workspace ember-data ember build -e production --output-path dists/experiment-ie11
- name: Build Production ${{github.ref}}
run: EMBER_DATA_FULL_COMPAT=true yarn workspace ember-data ember build -e production --output-path dists/experiment
- name: Build Production ${{github.ref}} (no rollup)
run: EMBER_DATA_FULL_COMPAT=true EMBER_DATA_ROLLUP_PRIVATE=false yarn workspace ember-data ember build -e production --output-path dists/experiment-no-rollup
- name: Analyze Master Assets (IE11)
- name: Analyze Master Assets
run: |
node ./scripts/asset-size-tracking/generate-analysis.js packages/-ember-data/dists/control-ie11 ./control-ie11-data.json
mkdir -p tmp
mkdir -p tmp/asset-sizes
node ./scripts/asset-size-tracking/print-analysis.js ./control-ie11-data.json -show > tmp/asset-sizes/master-analysis-ie11.txt
- name: Analyze Master Assets
run: |
node ./scripts/asset-size-tracking/generate-analysis.js packages/-ember-data/dists/control ./control-data.json
node ./scripts/asset-size-tracking/print-analysis.js ./control-data.json -show > tmp/asset-sizes/master-analysis.txt
- name: Analyze Master Assets (no rollup)
run: |
node ./scripts/asset-size-tracking/generate-analysis.js packages/-ember-data/dists/control-no-rollup ./control-data-no-rollup.json
node ./scripts/asset-size-tracking/print-analysis.js ./control-data-no-rollup.json -show > tmp/asset-sizes/master-analysis-no-rollup.txt
- name: Analyze ${{github.ref}} Assets (IE11)
run: |
node ./scripts/asset-size-tracking/generate-analysis.js packages/-ember-data/dists/experiment-ie11 ./experiment-ie11-data.json
node ./scripts/asset-size-tracking/print-analysis.js ./experiment-ie11-data.json -show > tmp/asset-sizes/experiment-analysis-ie11-full.txt
node ./scripts/asset-size-tracking/print-analysis.js ./experiment-ie11-data.json > tmp/asset-sizes/experiment-analysis-ie11.txt
- name: Analyze ${{github.ref}} Assets
run: |
node ./scripts/asset-size-tracking/generate-analysis.js packages/-ember-data/dists/experiment ./experiment-data.json
Expand All @@ -78,10 +68,6 @@ jobs:
node ./scripts/asset-size-tracking/generate-analysis.js packages/-ember-data/dists/experiment-no-rollup ./experiment-data-no-rollup.json
node ./scripts/asset-size-tracking/print-analysis.js ./experiment-data-no-rollup.json -show > tmp/asset-sizes/experiment-analysis-no-rollup-full.txt
node ./scripts/asset-size-tracking/print-analysis.js ./experiment-data-no-rollup.json > tmp/asset-sizes/experiment-analysis-no-rollup.txt
- name: Test Asset Sizes (IE11)
run: |
set -o pipefail
node ./scripts/asset-size-tracking/generate-diff.js ./control-ie11-data.json ./experiment-ie11-data.json | tee tmp/asset-sizes/diff-ie11.txt
- name: Test Asset Sizes
if: failure() || success()
run: |
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/enforce-pr-labels-beta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
types: [labeled, unlabeled, opened, reopened, edited, synchronize]
branches:
- beta

concurrency:
group: pr-labels-beta-${{ github.head_ref }}
cancel-in-progress: true

jobs:
enforce-changelog-label:
runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/enforce-pr-labels-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
types: [labeled, unlabeled, opened, reopened, edited, synchronize]
branches:
- master

concurrency:
group: pr-labels-canary-${{ github.head_ref }}
cancel-in-progress: true

jobs:
enforce-changelog-label:
runs-on: ubuntu-latest
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/enforce-pr-labels-lts-prev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ on:
pull_request:
types: [labeled, unlabeled, opened, reopened, edited, synchronize]
branches:
- lts-3-20
- lts-3-24

concurrency:
group: pr-labels-lts-prev-${{ github.head_ref }}
cancel-in-progress: true

jobs:
enforce-changelog-label:
runs-on: ubuntu-latest
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/enforce-pr-labels-lts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ on:
pull_request:
types: [labeled, unlabeled, opened, reopened, edited, synchronize]
branches:
- lts-3-24
- lts-3-28

concurrency:
group: pr-labels-lts-${{ github.head_ref }}
cancel-in-progress: true

jobs:
enforce-changelog-label:
runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/enforce-pr-labels-old-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
types: [labeled, unlabeled, opened, reopened, edited, synchronize]
branches:
- release-*

concurrency:
group: pr-labels-old-release-${{ github.head_ref }}
cancel-in-progress: true

jobs:
enforce-changelog-label:
runs-on: ubuntu-latest
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/enforce-pr-labels-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
types: [labeled, unlabeled, opened, reopened, edited, synchronize]
branches:
- release

concurrency:
group: pr-labels-release-${{ github.head_ref }}
cancel-in-progress: true

jobs:
enforce-changelog-label:
runs-on: ubuntu-latest
Expand Down
26 changes: 18 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
tags:
- '*'

concurrency:
group: ci-${{ github.head_ref }}
cancel-in-progress: true

jobs:
lint:
timeout-minutes: 5
Expand All @@ -21,6 +25,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 14.x
cache: 'yarn'
- name: Yarn install
run: yarn --frozen-lockfile
- name: Lint features
Expand All @@ -38,6 +43,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 14.x
cache: 'yarn'
- name: Yarn install
run: yarn --frozen-lockfile
- name: Yarn test infra compatWith 3.0
Expand Down Expand Up @@ -73,6 +79,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 14.x
cache: 'yarn'
- name: Install dependencies
run: yarn install --frozen-lockfile --network-timeout=300000
- name: Launcher Info
Expand Down Expand Up @@ -135,25 +142,22 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 14.x
cache: 'yarn'
- name: Install dependencies
run: yarn install --frozen-lockfile --network-timeout=300000
- name: Fastboot Test ${{ matrix.scenario }}
timeout-minutes: 12
timeout-minutes: 12
run: yarn test:fastboot ${{ matrix.scenario }}

browser-tests:
needs: [lint]
timeout-minutes: 20
timeout-minutes: 20
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 All @@ -169,6 +173,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 14.x
cache: 'yarn'
- name: Install dependencies
run: yarn install --frozen-lockfile --network-timeout=300000
- name: Launcher Info
Expand All @@ -191,6 +196,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 14.x
cache: 'yarn'
- name: Install dependencies w/o lockfile
run: yarn install --no-lockfile --non-interactive
- name: Basic Tests
Expand All @@ -208,6 +214,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 14.x
cache: 'yarn'
- name: Install dependencies
run: yarn install
- name: Basic tests with ${{ matrix.scenario }}
Expand Down Expand Up @@ -238,6 +245,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 14.x
cache: 'yarn'
- name: Install dependencies
run: yarn install
- name: Basic tests with ${{ matrix.release }}
Expand All @@ -253,7 +261,6 @@ jobs:
matrix:
scenario:
[
with-max-transpilation,
with-native-fetch,
with-ember-fetch-no-jquery,
with-ember-fetch-and-jquery,
Expand All @@ -265,6 +272,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 14.x
cache: 'yarn'
- name: Install dependencies
run: yarn install --frozen-lockfile --network-timeout=300000
- name: Basic tests with ${{ matrix.scenario }}
Expand All @@ -285,6 +293,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- name: Install dependencies w/o lockfile
run: yarn install --no-lockfile --non-interactive
- name: Basic Tests
Expand Down Expand Up @@ -330,6 +339,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 14.x
cache: 'yarn'
- name: Install dependencies
run: yarn install
- name: Generate package tarballs
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 14.x
cache: 'yarn'
- name: Install dependencies for master
run: yarn install
- name: Basic Tests
Expand All @@ -36,6 +37,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 14.x
cache: 'yarn'
- name: Install dependencies for ${{ matrix.scenario }}
run: yarn install
- name: Basic Tests
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/perf-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
branches:
- master

concurrency:
group: perf-${{ github.head_ref }}
cancel-in-progress: true

jobs:
performance-checks:
name: 'Performance Checks'
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
7 changes: 5 additions & 2 deletions packages/-ember-data/tests/integration/store-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,11 @@ module('integration/store - destroy', function (hooks) {
// to flush, potentially pushing data into the store
await settled();
assert.ok(true, 'we made it to the end');
await requestPromise;
assert.ok(false, 'we should never make it here');
requestPromise.then(() => {
assert.ok(false, 'we should never make it here');
});

await settled();
});

test('destroying the store correctly cleans everything up', async function (assert) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ module('@ember-data/model klass.modelName', function (hooks) {
startsWith(e.message, `Cannot assign to read only property 'modelName' of `) ||
// Firefox has a different message
startsWith(e.message, `"modelName" is read-only`) ||
// IE11 has a different message
startsWith(e.message, `Assignment to read-only properties is not allowed in strict mode`) ||
// Safari aso has a different message
startsWith(e.message, `Attempted to assign to readonly property`),
`modelName is immutable: ${e.message}`
Expand Down
Loading

0 comments on commit aaff64b

Please sign in to comment.