Skip to content

Commit 09dc249

Browse files
committed
Set RAISE_ON_DEPRECATION to false when EXTEND_PROTOTYPES is enabled
1 parent 1e686b7 commit 09dc249

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
working-directory: smoke-tests/scenarios
3636
run: |
3737
matrix_json=$(pnpm scenario-tester list --require @swc-node/register --files "*-test.ts" --matrix "pnpm run test --filter %s" )
38-
echo "matrix=$matrix_json" >> $GITHUB_OUTPUT
38+
echo "matrix=$matrix_json" >> $GITHUB_OUTPUT
3939
4040
types:
4141
name: Type Checking (current version)
@@ -105,9 +105,11 @@ jobs:
105105
ENABLE_OPTIONAL_FEATURES: "true"
106106
- name: "Extend prototypes"
107107
EXTEND_PROTOTYPES: "true"
108+
RAISE_ON_DEPRECATION: "false"
108109
- name: "Extend prototypes, with optional features"
109110
EXTEND_PROTOTYPES: "true"
110111
ENABLE_OPTIONAL_FEATURES: "true"
112+
RAISE_ON_DEPRECATION: "false"
111113

112114
steps:
113115
- uses: actions/checkout@v3
@@ -120,6 +122,7 @@ jobs:
120122
OVERRIDE_DEPRECATION_VERSION: ${{ matrix.OVERRIDE_DEPRECATION_VERSION }}
121123
EXTEND_PROTOTYPES: ${{ matrix.EXTEND_PROTOTYPES }}
122124
ENABLE_OPTIONAL_FEATURES: ${{ matrix.ENABLE_OPTIONAL_FEATURES }}
125+
RAISE_ON_DEPRECATION: ${{ matrix.RAISE_ON_DEPRECATION }}
123126

124127
run: pnpm test
125128

bin/run-tests.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
/* eslint-disable no-console */
22
'use strict';
33

4-
/*
4+
/*
55
Test Variants
66
77
These are all accepted as environment variables when running `ember test` or
8-
as query params when directly invoking the test suite in the browser.
8+
as query params when directly invoking the test suite in the browser.
99
*/
1010
const variants = [
1111
// When true, even deprecations that are not yet at the "enabled" version will
@@ -25,6 +25,9 @@ const variants = [
2525
// This enables all canary feature flags for unreleased feature within Ember
2626
// itself.
2727
'ENABLE_OPTIONAL_FEATURES',
28+
29+
// Throw on unexpected deprecations. Defaults to true if not set explicitly.
30+
'RAISE_ON_DEPRECATION',
2831
];
2932

3033
const chalk = require('chalk');

index.html

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,17 @@
3232
EmberENV.ENABLE_OPTIONAL_FEATURES = true;
3333
}
3434

35-
EmberENV['RAISE_ON_DEPRECATION'] = true;
35+
EmberENV['RAISE_ON_DEPRECATION'] = QUnit.urlParams.RAISE_ON_DEPRECATION
36+
? QUnit.urlParams.RAISE_ON_DEPRECATION === 'true'
37+
: true;
3638

3739
if (QUnit.urlParams.ALL_DEPRECATIONS_ENABLED) {
38-
EmberENV['_ALL_DEPRECATIONS_ENABLED'] = true;
39-
}
40+
EmberENV['_ALL_DEPRECATIONS_ENABLED'] = true;
41+
}
4042

41-
if (QUnit.urlParams.OVERRIDE_DEPRECATION_VERSION) {
42-
EmberENV['_OVERRIDE_DEPRECATION_VERSION'] = QUnit.urlParams.OVERRIDE_DEPRECATION_VERSION;
43-
}
43+
if (QUnit.urlParams.OVERRIDE_DEPRECATION_VERSION) {
44+
EmberENV['_OVERRIDE_DEPRECATION_VERSION'] = QUnit.urlParams.OVERRIDE_DEPRECATION_VERSION;
45+
}
4446
</script>
4547

4648
<script type="module">

0 commit comments

Comments
 (0)