From 7d0ff75545c63a8b7b7b6dbca8a680859033601d Mon Sep 17 00:00:00 2001 From: Matthew Hartstonge Date: Wed, 30 Oct 2024 11:14:08 +1300 Subject: [PATCH 1/4] ci: adds no deprecations workflow to ember-try. --- config/ember-try.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/ember-try.js b/config/ember-try.js index b7b3aa900..acb8035ce 100644 --- a/config/ember-try.js +++ b/config/ember-try.js @@ -80,6 +80,14 @@ module.exports = async function () { }, embroiderSafe(), embroiderOptimized(), + { + name: 'no-deprecations', + npm: { + devDependencies: { + 'ember-deprecation-error': '*', + }, + }, + }, ], }; }; From 0882cc1e60c320f8d82b2cbf3ad8ad3c205a887d Mon Sep 17 00:00:00 2001 From: Matthew Hartstonge Date: Wed, 30 Oct 2024 11:14:38 +1300 Subject: [PATCH 2/4] fix(tests/dummy/app): removes `application-controller.router-properties` deprecations. --- tests/dummy/app/controllers/application.js | 13 +++-- tests/dummy/app/templates/application.hbs | 68 +++++++++++----------- tests/dummy/app/templates/demo/tabs.hbs | 2 +- 3 files changed, 43 insertions(+), 40 deletions(-) diff --git a/tests/dummy/app/controllers/application.js b/tests/dummy/app/controllers/application.js index fe45e3686..7c7c608c1 100644 --- a/tests/dummy/app/controllers/application.js +++ b/tests/dummy/app/controllers/application.js @@ -1,9 +1,12 @@ -/* eslint-disable ember/no-actions-hash, prettier/prettier */ +/* eslint-disable ember/no-actions-hash */ import { equal } from '@ember/object/computed'; import Controller from '@ember/controller'; import { computed } from '@ember/object'; +import { inject as service } from '@ember/service'; export default Controller.extend({ + router: service(), + actions: { toggleExpandedItem(value, ev) { if (this.expandedItem === value) { @@ -11,11 +14,11 @@ export default Controller.extend({ } this.set('expandedItem', value); ev.stopPropagation(); - } + }, }, - expandedItem: computed('currentRouteName', function() { - if (this.currentRouteName.substr(0, 6) === 'layout') { + expandedItem: computed('router.currentRouteName', function () { + if (this.router.currentRouteName.substr(0, 6) === 'layout') { return 'layout'; } else { return 'demos'; @@ -23,5 +26,5 @@ export default Controller.extend({ }), demosExpanded: equal('expandedItem', 'demos'), - layoutExpanded: equal('expandedItem', 'layout') + layoutExpanded: equal('expandedItem', 'layout'), }); diff --git a/tests/dummy/app/templates/application.hbs b/tests/dummy/app/templates/application.hbs index ee405d002..983f5ddb6 100644 --- a/tests/dummy/app/templates/application.hbs +++ b/tests/dummy/app/templates/application.hbs @@ -11,54 +11,54 @@ - Introduction + Introduction Components - Forms - Typography - Color & Theme + Forms + Typography + Color & Theme Layout - Cookbook - Addons + Cookbook + Addons diff --git a/tests/dummy/app/templates/demo/tabs.hbs b/tests/dummy/app/templates/demo/tabs.hbs index 551c49f1e..db9107a5d 100644 --- a/tests/dummy/app/templates/demo/tabs.hbs +++ b/tests/dummy/app/templates/demo/tabs.hbs @@ -186,7 +186,7 @@
{{! BEGIN-SNIPPET routable-usage}} - + Index From c50084374096c7a52017fd4063ea661fede05702 Mon Sep 17 00:00:00 2001 From: Matthew Hartstonge Date: Thu, 7 Nov 2024 12:28:50 +1300 Subject: [PATCH 3/4] ci(config/ember-try): adds ember-release-no-deprecations. --- config/ember-try.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/config/ember-try.js b/config/ember-try.js index acb8035ce..525054c2a 100644 --- a/config/ember-try.js +++ b/config/ember-try.js @@ -88,6 +88,15 @@ module.exports = async function () { }, }, }, + { + name: 'ember-release-no-deprecations', + npm: { + devDependencies: { + 'ember-source': await getChannelURL('release'), + 'ember-deprecation-error': '*', + }, + }, + }, ], }; }; From cb6f62e2af87222e509a3b802d560fba820a2479 Mon Sep 17 00:00:00 2001 From: Matthew Hartstonge Date: Thu, 7 Nov 2024 12:30:24 +1300 Subject: [PATCH 4/4] ci(.github/workflows): allows `no-deprecations` and `ember-release-no-deprecations` to fail. --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f4184f7e9..b9b2ccdf7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,6 +90,8 @@ jobs: - ember-canary - embroider-safe - embroider-optimized + - no-deprecations + - ember-release-no-deprecations steps: - uses: actions/checkout@v4