From 7d67845524eebfb22b7c6cf80bb97e4cc5d72307 Mon Sep 17 00:00:00 2001 From: Pat O'Callaghan Date: Mon, 14 Feb 2022 23:27:38 +0000 Subject: [PATCH] Fix a bunch of deprecations (#461) --- config/deprecation-workflow.js | 27 ------------------- package.json | 2 +- tests/dummy/app/controllers/search.js | 4 ++- tests/dummy/app/controllers/user.js | 2 ++ .../app/templates/components/single-user.hbs | 2 +- .../app/templates/components/user-search.hbs | 2 +- tests/dummy/config/deprecation-workflow.js | 16 +++++++++++ yarn.lock | 8 +++--- 8 files changed, 28 insertions(+), 35 deletions(-) delete mode 100755 config/deprecation-workflow.js create mode 100755 tests/dummy/config/deprecation-workflow.js diff --git a/config/deprecation-workflow.js b/config/deprecation-workflow.js deleted file mode 100755 index 2c474948..00000000 --- a/config/deprecation-workflow.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; -/* global self */ - -self.deprecationWorkflow = self.deprecationWorkflow || {}; -self.deprecationWorkflow.config = { - workflow: [ - { handler: 'silence', matchId: 'ember-inflector.globals' }, - { handler: 'silence', matchId: 'ember-env.old-extend-prototypes' }, - { handler: 'silence', matchId: 'ember-runtime.deprecate-copy-copyable' }, - { handler: 'silence', matchId: 'array.new-array-wrapper' }, - { handler: 'silence', matchId: 'object.new-constructor' }, - { - handler: 'silence', - matchId: 'deprecated-run-loop-and-computed-dot-access', - }, - { handler: 'silence', matchId: 'ember-source.deprecation-without-for' }, - { handler: 'silence', matchId: 'ember-source.deprecation-without-since' }, - { handler: 'silence', matchId: 'deprecate-fetch-ember-data-support' }, - { handler: 'silence', matchId: 'this-property-fallback' }, - { handler: 'silence', matchId: 'implicit-injections' }, - { - handler: 'silence', - matchId: 'ember.built-in-components.legacy-arguments', - }, - { handler: 'silence', matchId: 'routing.transition-methods' }, - ], -}; diff --git a/package.json b/package.json index 5a9c5b90..fbcd496e 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "ember-source": "~3.28.0", "ember-source-channel-url": "^3.0.0", "ember-template-lint": "^3.6.0", - "ember-test-selectors": "^5.0.0", + "ember-test-selectors": "^6.0.0", "ember-try": "^1.4.0", "eslint": "^7.32.0", "eslint-config-prettier": "^8.3.0", diff --git a/tests/dummy/app/controllers/search.js b/tests/dummy/app/controllers/search.js index 9e3d032b..a4fb0a54 100644 --- a/tests/dummy/app/controllers/search.js +++ b/tests/dummy/app/controllers/search.js @@ -1,9 +1,11 @@ import Controller from '@ember/controller'; +import { inject as service } from '@ember/service'; export default Controller.extend({ + router: service(), actions: { userSearch(name) { - this.transitionToRoute('search.results', name); + this.router.transitionTo('search.results', name); }, }, }); diff --git a/tests/dummy/app/controllers/user.js b/tests/dummy/app/controllers/user.js index d271eee6..fa62a7dc 100644 --- a/tests/dummy/app/controllers/user.js +++ b/tests/dummy/app/controllers/user.js @@ -1,5 +1,7 @@ import Controller from '@ember/controller'; +import { inject as service } from '@ember/service'; export default Controller.extend({ + store: service(), actions: { createProject(user, title) { return this.store diff --git a/tests/dummy/app/templates/components/single-user.hbs b/tests/dummy/app/templates/components/single-user.hbs index 7c4acb1e..317f7627 100644 --- a/tests/dummy/app/templates/components/single-user.hbs +++ b/tests/dummy/app/templates/components/single-user.hbs @@ -10,5 +10,5 @@ Projects: {{/each}} - + diff --git a/tests/dummy/app/templates/components/user-search.hbs b/tests/dummy/app/templates/components/user-search.hbs index a8a1655b..5d05fb1d 100644 --- a/tests/dummy/app/templates/components/user-search.hbs +++ b/tests/dummy/app/templates/components/user-search.hbs @@ -1,3 +1,3 @@
Search For User:
- + diff --git a/tests/dummy/config/deprecation-workflow.js b/tests/dummy/config/deprecation-workflow.js new file mode 100755 index 00000000..0c3b4d2b --- /dev/null +++ b/tests/dummy/config/deprecation-workflow.js @@ -0,0 +1,16 @@ +'use strict'; +/* global self */ + +self.deprecationWorkflow = self.deprecationWorkflow || {}; +self.deprecationWorkflow.config = { + workflow: [ + { handler: 'silence', matchId: 'deprecate-fetch-ember-data-support' }, + { + handler: 'silence', + matchId: 'deprecated-run-loop-and-computed-dot-access', + }, + { handler: 'silence', matchId: 'ember-source.deprecation-without-for' }, + { handler: 'silence', matchId: 'ember-source.deprecation-without-since' }, + { handler: 'silence', matchId: 'this-property-fallback' }, + ], +}; diff --git a/yarn.lock b/yarn.lock index c538714e..c5259cf1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5491,10 +5491,10 @@ ember-template-recast@^5.0.3: tmp "^0.2.1" workerpool "^6.1.4" -ember-test-selectors@^5.0.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/ember-test-selectors/-/ember-test-selectors-5.5.0.tgz#114bd29c4a33eee3a328c9ce32a57a018c27f5f6" - integrity sha512-PiKhbPnidRYQ5ed/CTU3teJV3XmzkjYjsCGx1UTy7qEY/1dEqxezlZu1DtisoLJ9Y+BcjTVlE+596lo9cOXd3w== +ember-test-selectors@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/ember-test-selectors/-/ember-test-selectors-6.0.0.tgz#ba9bb19550d9dec6e4037d86d2b13c2cfd329341" + integrity sha512-PgYcI9PeNvtKaF0QncxfbS68olMYM1idwuI8v/WxsjOGqUx5bmsu6V17vy/d9hX4mwmjgsBhEghrVasGSuaIgw== dependencies: calculate-cache-key-for-tree "^2.0.0" ember-cli-babel "^7.26.4"