From 9ecae3ccfee1a73a0f8348e121e53b659b2adc00 Mon Sep 17 00:00:00 2001 From: Jonathan Johnson Date: Sun, 10 Sep 2023 05:26:21 -0700 Subject: [PATCH] Ember data compatibility upgrade This feature of Data allows us to strip out code that is required to support deprecated features. With a couple of minor changes we're fully compatible with the latest version and have cleared all deprecations so we can ship some faster code. --- app/components/reports/subject/new/instructor.js | 2 +- app/components/reports/subject/new/mesh-term.js | 2 +- config/deprecation-workflow.js | 8 -------- ember-cli-build.js | 3 +++ 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/app/components/reports/subject/new/instructor.js b/app/components/reports/subject/new/instructor.js index c5d7c901a7..cdaab74c24 100644 --- a/app/components/reports/subject/new/instructor.js +++ b/app/components/reports/subject/new/instructor.js @@ -9,7 +9,7 @@ export default class ReportsSubjectNewInstructorComponent extends Component { @cached get selectedInstructor() { - return new TrackedAsyncData(this.store.find('user', this.args.currentId)); + return new TrackedAsyncData(this.store.findRecord('user', this.args.currentId)); } @action diff --git a/app/components/reports/subject/new/mesh-term.js b/app/components/reports/subject/new/mesh-term.js index c7b495e46d..f2bda7b1c4 100644 --- a/app/components/reports/subject/new/mesh-term.js +++ b/app/components/reports/subject/new/mesh-term.js @@ -9,7 +9,7 @@ export default class ReportsSubjectNewProgramComponent extends Component { @cached get selectedMeshTerm() { - return new TrackedAsyncData(this.store.find('mesh-descriptor', this.args.currentId)); + return new TrackedAsyncData(this.store.findRecord('mesh-descriptor', this.args.currentId)); } @action diff --git a/config/deprecation-workflow.js b/config/deprecation-workflow.js index 92b14dbd65..0cd6403419 100644 --- a/config/deprecation-workflow.js +++ b/config/deprecation-workflow.js @@ -17,14 +17,6 @@ window.deprecationWorkflow.config = { { handler: 'silence', matchId: 'ember-modifier.use-modify' }, { handler: 'silence', matchId: 'ember-modifier.function-based-options' }, { handler: 'silence', matchId: 'ember-polyfills.deprecate-assign' }, - { handler: 'silence', matchId: 'ember-data:model-save-promise' }, //https://github.com/emberjs/data/issues/7997 - { handler: 'silence', matchId: 'ember-data:deprecate-promise-proxies' }, //https://github.com/emberjs/data/issues/7997 - { handler: 'silence', matchId: 'ember-data:deprecate-non-strict-relationships' }, - { handler: 'silence', matchId: 'ember-data:deprecate-early-static' }, - { handler: 'silence', matchId: 'ember-data:deprecate-array-like' }, - { handler: 'silence', matchId: 'ember-data:deprecate-promise-many-array-behaviors' }, - { handler: 'silence', matchId: 'ember-data:no-a-with-array-like' }, - { handler: 'silence', matchId: 'ember-data:deprecate-store-find' }, { handler: 'silence', matchId: 'common.dates-no-dates' }, ], }; diff --git a/ember-cli-build.js b/ember-cli-build.js index c379b17114..f8c61cb843 100644 --- a/ember-cli-build.js +++ b/ember-cli-build.js @@ -19,6 +19,9 @@ module.exports = function (defaults) { sourcemaps: { enabled: true, }, + emberData: { + compatWith: '5.2', + }, hinting: isTestBuild, babel: {