diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 993a9245467..1bbbf0bc716 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: working-directory: smoke-tests/scenarios run: | matrix_json=$(pnpm scenario-tester list --require @swc-node/register --files "*-test.ts" --matrix "pnpm run test --filter %s" ) - echo "matrix=$matrix_json" >> $GITHUB_OUTPUT + echo "matrix=$matrix_json" >> $GITHUB_OUTPUT types: name: Type Checking (current version) @@ -105,9 +105,11 @@ jobs: ENABLE_OPTIONAL_FEATURES: "true" - name: "Extend prototypes" EXTEND_PROTOTYPES: "true" + RAISE_ON_DEPRECATION: "false" - name: "Extend prototypes, with optional features" EXTEND_PROTOTYPES: "true" ENABLE_OPTIONAL_FEATURES: "true" + RAISE_ON_DEPRECATION: "false" steps: - uses: actions/checkout@v3 @@ -120,6 +122,7 @@ jobs: OVERRIDE_DEPRECATION_VERSION: ${{ matrix.OVERRIDE_DEPRECATION_VERSION }} EXTEND_PROTOTYPES: ${{ matrix.EXTEND_PROTOTYPES }} ENABLE_OPTIONAL_FEATURES: ${{ matrix.ENABLE_OPTIONAL_FEATURES }} + RAISE_ON_DEPRECATION: ${{ matrix.RAISE_ON_DEPRECATION }} run: pnpm test diff --git a/bin/run-tests.js b/bin/run-tests.js index 2192e1502fc..83087ed9583 100755 --- a/bin/run-tests.js +++ b/bin/run-tests.js @@ -1,11 +1,11 @@ /* eslint-disable no-console */ 'use strict'; -/* +/* Test Variants These are all accepted as environment variables when running `ember test` or - as query params when directly invoking the test suite in the browser. + as query params when directly invoking the test suite in the browser. */ const variants = [ // When true, even deprecations that are not yet at the "enabled" version will @@ -25,6 +25,9 @@ const variants = [ // This enables all canary feature flags for unreleased feature within Ember // itself. 'ENABLE_OPTIONAL_FEATURES', + + // Throw on unexpected deprecations. Defaults to true if not set explicitly. + 'RAISE_ON_DEPRECATION', ]; const chalk = require('chalk'); diff --git a/index.html b/index.html index 373c6d99fbd..c6fad19b48a 100644 --- a/index.html +++ b/index.html @@ -32,15 +32,17 @@ EmberENV.ENABLE_OPTIONAL_FEATURES = true; } - EmberENV['RAISE_ON_DEPRECATION'] = true; + EmberENV['RAISE_ON_DEPRECATION'] = QUnit.urlParams.RAISE_ON_DEPRECATION + ? QUnit.urlParams.RAISE_ON_DEPRECATION === 'true' + : true; if (QUnit.urlParams.ALL_DEPRECATIONS_ENABLED) { - EmberENV['_ALL_DEPRECATIONS_ENABLED'] = true; - } + EmberENV['_ALL_DEPRECATIONS_ENABLED'] = true; + } - if (QUnit.urlParams.OVERRIDE_DEPRECATION_VERSION) { - EmberENV['_OVERRIDE_DEPRECATION_VERSION'] = QUnit.urlParams.OVERRIDE_DEPRECATION_VERSION; - } + if (QUnit.urlParams.OVERRIDE_DEPRECATION_VERSION) { + EmberENV['_OVERRIDE_DEPRECATION_VERSION'] = QUnit.urlParams.OVERRIDE_DEPRECATION_VERSION; + }