From a03ec7eba244a5c41f4337f3b0ede0b3824e5a42 Mon Sep 17 00:00:00 2001 From: Julien Palmas Date: Mon, 17 Apr 2023 11:16:28 +0200 Subject: [PATCH 01/26] =?UTF-8?q?=F0=9F=93=9D=20Add=20all=204.x=20ember-da?= =?UTF-8?q?ta=20deprecation=20pages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These pages are empty for the time being --- app/templates/index.hbs | 5 ++++- content/ember-data/v4/deprecate-array-like.md | 10 ++++++++++ content/ember-data/v4/deprecate-early-static.md | 13 +++++++++++++ .../v4/deprecate-errors-array-to-hash-helper.md | 12 ++++++++++++ .../v4/deprecate-errors-hash-to-array-helper.md | 12 ++++++++++++ .../ember-data/v4/deprecate-has-record-for-id.md | 12 ++++++++++++ .../v4/deprecate-instantiate-record-args.md | 12 ++++++++++++ content/ember-data/v4/deprecate-model-reopen.md | 12 ++++++++++++ .../ember-data/v4/deprecate-model-reopenclass.md | 12 ++++++++++++ .../v4/deprecate-non-strict-relationships.md | 12 ++++++++++++ .../v4/deprecate-normalize-modelname-helper.md | 12 ++++++++++++ .../v4/deprecate-promise-many-array-behaviors.md | 12 ++++++++++++ content/ember-data/v4/deprecate-promise-proxies.md | 12 ++++++++++++ content/ember-data/v4/deprecate-record-data-for.md | 12 ++++++++++++ .../v4/deprecate-secret-adapter-fallback.md | 12 ++++++++++++ content/ember-data/v4/deprecate-store-find.md | 12 ++++++++++++ .../ember-data/v4/deprecate-string-arg-schemas.md | 12 ++++++++++++ content/ember-data/v4/deprecate-v1-cache.md | 12 ++++++++++++ .../ember-data/v4/deprecate-v1cache-store-apis.md | 12 ++++++++++++ content/ember-data/v4/model-save-promise.md | 13 +++++++++++++ content/ember-data/v4/no-a-with-array-like.md | 12 ++++++++++++ content/ember-data/v4/non-explicit-relationships.md | 12 ++++++++++++ content/ember-data/v4/rsvp-unresolved-async.md | 12 ++++++++++++ lib/content-docs-generator/index.js | 1 + 24 files changed, 269 insertions(+), 1 deletion(-) create mode 100644 content/ember-data/v4/deprecate-array-like.md create mode 100644 content/ember-data/v4/deprecate-early-static.md create mode 100644 content/ember-data/v4/deprecate-errors-array-to-hash-helper.md create mode 100644 content/ember-data/v4/deprecate-errors-hash-to-array-helper.md create mode 100644 content/ember-data/v4/deprecate-has-record-for-id.md create mode 100644 content/ember-data/v4/deprecate-instantiate-record-args.md create mode 100644 content/ember-data/v4/deprecate-model-reopen.md create mode 100644 content/ember-data/v4/deprecate-model-reopenclass.md create mode 100644 content/ember-data/v4/deprecate-non-strict-relationships.md create mode 100644 content/ember-data/v4/deprecate-normalize-modelname-helper.md create mode 100644 content/ember-data/v4/deprecate-promise-many-array-behaviors.md create mode 100644 content/ember-data/v4/deprecate-promise-proxies.md create mode 100644 content/ember-data/v4/deprecate-record-data-for.md create mode 100644 content/ember-data/v4/deprecate-secret-adapter-fallback.md create mode 100644 content/ember-data/v4/deprecate-store-find.md create mode 100644 content/ember-data/v4/deprecate-string-arg-schemas.md create mode 100644 content/ember-data/v4/deprecate-v1-cache.md create mode 100644 content/ember-data/v4/deprecate-v1cache-store-apis.md create mode 100644 content/ember-data/v4/model-save-promise.md create mode 100644 content/ember-data/v4/no-a-with-array-like.md create mode 100644 content/ember-data/v4/non-explicit-relationships.md create mode 100644 content/ember-data/v4/rsvp-unresolved-async.md diff --git a/app/templates/index.hbs b/app/templates/index.hbs index fc665f7f..618e4dd7 100644 --- a/app/templates/index.hbs +++ b/app/templates/index.hbs @@ -70,7 +70,10 @@
  • v3.x
  • +
  • + v4.x +
  • - \ No newline at end of file + diff --git a/content/ember-data/v4/deprecate-array-like.md b/content/ember-data/v4/deprecate-array-like.md new file mode 100644 index 00000000..51d4497d --- /dev/null +++ b/content/ember-data/v4/deprecate-array-like.md @@ -0,0 +1,10 @@ +--- +id: ember-data:deprecate-array-like +title: Deprecate Array Like +until: '5.0' +since: '4.7' +--- + +#### TODO + +[RFC 848](https://rfcs.emberjs.com/id/0848-deprecate-array-prototype-extensions) diff --git a/content/ember-data/v4/deprecate-early-static.md b/content/ember-data/v4/deprecate-early-static.md new file mode 100644 index 00000000..6d12f6e7 --- /dev/null +++ b/content/ember-data/v4/deprecate-early-static.md @@ -0,0 +1,13 @@ +--- +id: ember-data:deprecate-early-static +title: Deprecate Early Static +until: '5.0' +since: '4.7' +--- + +#### TODO + +Accessing schema information on Models without looking up the model via the store is deprecated. +Use store.modelFor (or better Snapshots or the store.getSchemaDefinitionService() apis) instead. + +[RFC 741](https://rfcs.emberjs.com/id/0741-ember-data-deprecate-model-static-field-access-without-lookup) diff --git a/content/ember-data/v4/deprecate-errors-array-to-hash-helper.md b/content/ember-data/v4/deprecate-errors-array-to-hash-helper.md new file mode 100644 index 00000000..b860c2f2 --- /dev/null +++ b/content/ember-data/v4/deprecate-errors-array-to-hash-helper.md @@ -0,0 +1,12 @@ +--- +id: ember-data:deprecate-errors-hash-to-array-helper +title: Deprecate Errors Hash To Array Helper +until: '5.0' +since: '4.7' +--- + +#### TODO + +errorsArrayToHash helper has been deprecated + +[RFC TODO](TODO) diff --git a/content/ember-data/v4/deprecate-errors-hash-to-array-helper.md b/content/ember-data/v4/deprecate-errors-hash-to-array-helper.md new file mode 100644 index 00000000..6f3b4f15 --- /dev/null +++ b/content/ember-data/v4/deprecate-errors-hash-to-array-helper.md @@ -0,0 +1,12 @@ +--- +id: ember-data:deprecate-errors-hash-to-array-helper +title: Deprecate Errors Hash To Array Helper +until: '5.0' +since: '4.7' +--- + +#### TODO + +errorsHashToArray helper has been deprecated + +[RFC TODO](TODO) diff --git a/content/ember-data/v4/deprecate-has-record-for-id.md b/content/ember-data/v4/deprecate-has-record-for-id.md new file mode 100644 index 00000000..59bc6de2 --- /dev/null +++ b/content/ember-data/v4/deprecate-has-record-for-id.md @@ -0,0 +1,12 @@ +--- +id: ember-data:deprecate-has-record-for-id +title: Deprecate Has Record For Id +until: '5.0' +since: '4.5' +--- + +#### TODO + +store.hasRecordForId has been deprecated in favor of store.peekRecord + +[RFC TODO](TODO) diff --git a/content/ember-data/v4/deprecate-instantiate-record-args.md b/content/ember-data/v4/deprecate-instantiate-record-args.md new file mode 100644 index 00000000..2b133e2d --- /dev/null +++ b/content/ember-data/v4/deprecate-instantiate-record-args.md @@ -0,0 +1,12 @@ +--- +id: ember-data:deprecate-instantiate-record-args +title: Deprecate Instantiate Record Args +until: '5.0' +since: '4.12' +--- + +#### TODO + +Expected store.instantiateRecord to have an arity of 2. recordDataFor and notificationManager args have been deprecated. + +[RFC TODO](TODO) diff --git a/content/ember-data/v4/deprecate-model-reopen.md b/content/ember-data/v4/deprecate-model-reopen.md new file mode 100644 index 00000000..b769e70c --- /dev/null +++ b/content/ember-data/v4/deprecate-model-reopen.md @@ -0,0 +1,12 @@ +--- +id: ember-data:deprecate-model-reopen +title: Deprecate Model Reopen +until: '5.0' +since: '4.7' +--- + +#### TODO + +Model.reopen is deprecated. Use <> extends Model to extend your class instead. + +[RFC 738](https://rfcs.emberjs.com/id/0738-ember-data-deprecate-model-reopen) diff --git a/content/ember-data/v4/deprecate-model-reopenclass.md b/content/ember-data/v4/deprecate-model-reopenclass.md new file mode 100644 index 00000000..db4e410b --- /dev/null +++ b/content/ember-data/v4/deprecate-model-reopenclass.md @@ -0,0 +1,12 @@ +--- +id: ember-data:deprecate-model-reopenclass +title: Deprecate Model Reopenclass +until: '5.0' +since: '4.7' +--- + +#### TODO + +Model.reopenClass is deprecated. Use Foo extends Model to add static methods and properties to your class instead. + +[RFC TODO](TODO) diff --git a/content/ember-data/v4/deprecate-non-strict-relationships.md b/content/ember-data/v4/deprecate-non-strict-relationships.md new file mode 100644 index 00000000..a47713af --- /dev/null +++ b/content/ember-data/v4/deprecate-non-strict-relationships.md @@ -0,0 +1,12 @@ +--- +id: ember-data:deprecate-non-strict-relationships +title: Deprecate Non Strict Relationships +until: '5.0' +since: '4.7' +--- + +#### TODO + +hasMany(, ) must specify options.inverse as either `null` or string type of the related resource. + +[RFC 739](https://rfcs.emberjs.com/id/0739-ember-data-deprecate-non-strict-relationships) diff --git a/content/ember-data/v4/deprecate-normalize-modelname-helper.md b/content/ember-data/v4/deprecate-normalize-modelname-helper.md new file mode 100644 index 00000000..2ba55048 --- /dev/null +++ b/content/ember-data/v4/deprecate-normalize-modelname-helper.md @@ -0,0 +1,12 @@ +--- +id: ember-data:deprecate-promise-many-array-behaviors +title: Deprecate Promise Many Array Behaviors +until: '5.0' +since: '4.7' +--- + +#### TODO + +the helper function normalizeModelName is deprecated. You should use model names that are already normalized, or use string helpers of your own. This function is primarily an alias for dasherize from @ember/string. + +[RFC TODO](TODO) diff --git a/content/ember-data/v4/deprecate-promise-many-array-behaviors.md b/content/ember-data/v4/deprecate-promise-many-array-behaviors.md new file mode 100644 index 00000000..9fdd738b --- /dev/null +++ b/content/ember-data/v4/deprecate-promise-many-array-behaviors.md @@ -0,0 +1,12 @@ +--- +id: ember-data:deprecate-promise-many-array-behaviors +title: Deprecate Promise Many Array Behaviors +until: '5.0' +since: '4.7' +--- + +#### TODO + +The createRecord method on ember-data's PromiseManyArray is deprecated. await the promise and work with the ManyArray directly. + +[RFC TODO](TODO) diff --git a/content/ember-data/v4/deprecate-promise-proxies.md b/content/ember-data/v4/deprecate-promise-proxies.md new file mode 100644 index 00000000..2b022573 --- /dev/null +++ b/content/ember-data/v4/deprecate-promise-proxies.md @@ -0,0 +1,12 @@ +--- +id: ember-data:deprecate-promise-proxies +title: Deprecate Promise Proxies +until: '5.0' +since: '4.7' +--- + +#### TODO + +You passed in a PromiseProxy to a Relationship API that now expects a resolved value. await the value before setting it. + +[RFC 846](https://rfcs.emberjs.com/id/0846-ember-data-deprecate-proxies) diff --git a/content/ember-data/v4/deprecate-record-data-for.md b/content/ember-data/v4/deprecate-record-data-for.md new file mode 100644 index 00000000..2f1ffade --- /dev/null +++ b/content/ember-data/v4/deprecate-record-data-for.md @@ -0,0 +1,12 @@ +--- +id: ember-data:deprecate-record-data-for +title: Deprecate Record Data For +until: '5.0' +since: '4.10' +--- + +#### TODO + +StoreWrapper.recordDataFor is deprecated. With Singleton Cache, this method is no longer needed as the caller is its own cache reference. + +[RFC TODO](TODO) diff --git a/content/ember-data/v4/deprecate-secret-adapter-fallback.md b/content/ember-data/v4/deprecate-secret-adapter-fallback.md new file mode 100644 index 00000000..2c7a01d6 --- /dev/null +++ b/content/ember-data/v4/deprecate-secret-adapter-fallback.md @@ -0,0 +1,12 @@ +--- +id: ember-data:deprecate-secret-adapter-fallback +title: Deprecate Secret Adapter Fallback +until: '5.0' +since: '4.5' +--- + +#### TODO + +Your application is utilizing a deprecated hidden fallback adapter (-json-api). Please implement an application adapter to function as your fallback. + +[RFC TODO](TODO) diff --git a/content/ember-data/v4/deprecate-store-find.md b/content/ember-data/v4/deprecate-store-find.md new file mode 100644 index 00000000..0a8c104d --- /dev/null +++ b/content/ember-data/v4/deprecate-store-find.md @@ -0,0 +1,12 @@ +--- +id: ember-data:deprecate-promise-many-array-behaviors +title: Deprecate Promise Many Array Behaviors +until: '5.0' +since: '4.5' +--- + +#### TODO + +Using store.find is deprecated, use store.findRecord instead. Likely this means you are relying on the implicit store fetching behavior of routes unknowingly. + +[RFC TODO](TODO) diff --git a/content/ember-data/v4/deprecate-string-arg-schemas.md b/content/ember-data/v4/deprecate-string-arg-schemas.md new file mode 100644 index 00000000..89ac4844 --- /dev/null +++ b/content/ember-data/v4/deprecate-string-arg-schemas.md @@ -0,0 +1,12 @@ +--- +id: ember-data:deprecate-string-arg-schemas +title: Deprecate String Arg Schemas +until: '5.0' +since: '4.5' +--- + +#### TODO + +attributesDefinitionFor expects either a record identifier or an argument of shape { type: string }, received a string. + +[RFC TODO](TODO) diff --git a/content/ember-data/v4/deprecate-v1-cache.md b/content/ember-data/v4/deprecate-v1-cache.md new file mode 100644 index 00000000..c4f0f9f2 --- /dev/null +++ b/content/ember-data/v4/deprecate-v1-cache.md @@ -0,0 +1,12 @@ +--- +id: ember-data:deprecate-v1-cache +title: Deprecate V1 Cache +until: '5.0' +since: '4.7' +--- + +#### TODO + +This RecordData uses the deprecated V1 RecordData Spec. Upgrade to V2 to maintain compatibility. + +[RFC TODO](TODO) diff --git a/content/ember-data/v4/deprecate-v1cache-store-apis.md b/content/ember-data/v4/deprecate-v1cache-store-apis.md new file mode 100644 index 00000000..5c3850bd --- /dev/null +++ b/content/ember-data/v4/deprecate-v1cache-store-apis.md @@ -0,0 +1,12 @@ +--- +id: ember-data:deprecate-v1cache-store-apis +title: Deprecate V1 cache Store Apis +until: '5.0' +since: '4.7' +--- + +#### TODO + +store.hasRecordForId has been deprecated in favor of store.peekRecord + +[RFC TODO](TODO) diff --git a/content/ember-data/v4/model-save-promise.md b/content/ember-data/v4/model-save-promise.md new file mode 100644 index 00000000..84f8aa00 --- /dev/null +++ b/content/ember-data/v4/model-save-promise.md @@ -0,0 +1,13 @@ +--- +id: ember-data:model-save-promise +title: Model Save Promise +until: '5.0' +since: '4.4' +--- + +#### TODO + +Accessing ${prop} is deprecated. The return type is being changed from PromiseObjectProxy to a Promise. +The only available methods to access on this promise are .then, .catch and .finally`. + +[RFC 795](https://rfcs.emberjs.com/id/0795-ember-data-return-promise-save) diff --git a/content/ember-data/v4/no-a-with-array-like.md b/content/ember-data/v4/no-a-with-array-like.md new file mode 100644 index 00000000..4c7dd08d --- /dev/null +++ b/content/ember-data/v4/no-a-with-array-like.md @@ -0,0 +1,12 @@ +--- +id: ember-data:no-a-with-array-like +title: No A With Array Like +until: '5.0' +since: '4.7' +--- + +#### TODO + +Do not use A() on an EmberData PromiseManyArray + +[RFC TODO](TODO) diff --git a/content/ember-data/v4/non-explicit-relationships.md b/content/ember-data/v4/non-explicit-relationships.md new file mode 100644 index 00000000..cfdaec9c --- /dev/null +++ b/content/ember-data/v4/non-explicit-relationships.md @@ -0,0 +1,12 @@ +--- +id: ember-data:non-explicit-relationships +title: Non Explicit Relationships +until: '5.0' +since: '4.7' +--- + +#### TODO + +Relationships that satisfy polymorphic relationships MUST define which abstract-type they are satisfying using 'as'. The field '${fieldOnInverse}' on type '${inverseSchema.modelName}' is misconfigured. + +[RFC TODO](TODO) diff --git a/content/ember-data/v4/rsvp-unresolved-async.md b/content/ember-data/v4/rsvp-unresolved-async.md new file mode 100644 index 00000000..f2ab4ce2 --- /dev/null +++ b/content/ember-data/v4/rsvp-unresolved-async.md @@ -0,0 +1,12 @@ +--- +id: ember-data:rsvp-unresolved-async +title: Rsvp Unresolved Async +until: '5.0' +since: '4.5' +--- + +#### TODO + +A Promise for fetching ${relationship.type} did not resolve by the time your model was destroyed. This will error in a future release. + +[RFC 846](https://rfcs.emberjs.com/id/0846-ember-data-deprecate-proxies) diff --git a/lib/content-docs-generator/index.js b/lib/content-docs-generator/index.js index 9a93033f..05c26fbc 100644 --- a/lib/content-docs-generator/index.js +++ b/lib/content-docs-generator/index.js @@ -12,6 +12,7 @@ const contentFolders = [ 'ember/v4', 'ember-data/v2', 'ember-data/v3', + 'ember-data/v4', 'ember-cli/v2', 'ember-cli/v4', ]; From 5c5631012f2b8eb142a7be5773e75be8018cafac Mon Sep 17 00:00:00 2001 From: Jared Galanis Date: Fri, 16 Jun 2023 19:04:30 -0400 Subject: [PATCH 02/26] Fill in deprecate-array-like --- content/ember-data/v4/deprecate-array-like.md | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/content/ember-data/v4/deprecate-array-like.md b/content/ember-data/v4/deprecate-array-like.md index 51d4497d..0ada3565 100644 --- a/content/ember-data/v4/deprecate-array-like.md +++ b/content/ember-data/v4/deprecate-array-like.md @@ -5,6 +5,22 @@ until: '5.0' since: '4.7' --- -#### TODO +Deprecates Ember "Array-like" methods on RecordArray and ManyArray. -[RFC 848](https://rfcs.emberjs.com/id/0848-deprecate-array-prototype-extensions) +These are the arrays returned respectively by store.peekAll(), store.findAll()and hasMany relationships on instance of Model or record.hasMany('relationshipName').value(). + +The appropriate refactor is to treat these arrays as native arrays and to use native array methods. + +For instance, instead of: + +```js +users.firstObject; +``` + +Use: + +```js +users[0]; +// or +users.at(0); +``` From dfb9f378cecb5ccdcdec408a5882a12735a6e0e7 Mon Sep 17 00:00:00 2001 From: Jared Galanis Date: Fri, 16 Jun 2023 19:50:24 -0400 Subject: [PATCH 03/26] add no-a-with-array-like --- content/ember-data/v4/deprecate-array-like.md | 4 ++-- content/ember-data/v4/no-a-with-array-like.md | 18 +++++++++++++++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/content/ember-data/v4/deprecate-array-like.md b/content/ember-data/v4/deprecate-array-like.md index 0ada3565..234af35e 100644 --- a/content/ember-data/v4/deprecate-array-like.md +++ b/content/ember-data/v4/deprecate-array-like.md @@ -5,9 +5,9 @@ until: '5.0' since: '4.7' --- -Deprecates Ember "Array-like" methods on RecordArray and ManyArray. +Deprecates Ember "Array-like" methods on `RecordArray` and `ManyArray`. -These are the arrays returned respectively by store.peekAll(), store.findAll()and hasMany relationships on instance of Model or record.hasMany('relationshipName').value(). +These are the arrays returned respectively by `store.peekAll()`, `store.findAll()` and hasMany relationships on instance of Model or `record.hasMany('relationshipName').value()`. The appropriate refactor is to treat these arrays as native arrays and to use native array methods. diff --git a/content/ember-data/v4/no-a-with-array-like.md b/content/ember-data/v4/no-a-with-array-like.md index 4c7dd08d..f73ed288 100644 --- a/content/ember-data/v4/no-a-with-array-like.md +++ b/content/ember-data/v4/no-a-with-array-like.md @@ -5,8 +5,20 @@ until: '5.0' since: '4.7' --- -#### TODO +Deprecates calling `A()` when an EmberData ArrayLike class is detected. This deprecation may not always trigger due to complexities in ember-source versions and the use (or disabling) of prototype extensions. -Do not use A() on an EmberData PromiseManyArray +To fix, use the native JavaScript array methods instead of the `EmberArray` methods and refrain from wrapping the array in `A()`. -[RFC TODO](TODO) +Note that some computed property macros may themselves utilize `A()`, in which scenario the computed properties need to be upgraded to Ember Octane syntax. + +For instance, instead of: + +```js +A([]); +``` + +Use: + +```js +[]; +``` From fd7c47dbfaa8491a2bfb6bd8cb0d3b9b12657e96 Mon Sep 17 00:00:00 2001 From: Jared Galanis Date: Fri, 16 Jun 2023 20:05:41 -0400 Subject: [PATCH 04/26] add deprecate-early-static --- .../ember-data/v4/deprecate-early-static.md | 33 ++++++++++++++++--- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/content/ember-data/v4/deprecate-early-static.md b/content/ember-data/v4/deprecate-early-static.md index 6d12f6e7..d0e16250 100644 --- a/content/ember-data/v4/deprecate-early-static.md +++ b/content/ember-data/v4/deprecate-early-static.md @@ -5,9 +5,34 @@ until: '5.0' since: '4.7' --- -#### TODO +This deprecation triggers if static computed properties +or methods are triggered without looking up the record +via the store service's `modelFor` hook. Accessing this +static information without looking up the model via the +store most commonly occurs when -Accessing schema information on Models without looking up the model via the store is deprecated. -Use store.modelFor (or better Snapshots or the store.getSchemaDefinitionService() apis) instead. +- using ember-cli-mirage (to fix, refactor to not use its auto-discovery of ember-data models) +- importing a model class and accessing its static information via the import -[RFC 741](https://rfcs.emberjs.com/id/0741-ember-data-deprecate-model-static-field-access-without-lookup) +Instead of + +```js +import User from 'my-app/models/user'; + +const relationships = User.relationshipsByName; +``` + +Do _at least_ this + +```js +const relationships = store.modelFor('user').relationshipsByName; +``` + +However, the much more future proof refactor is to not use `modelFor` at all but instead +to utilize the schema service for this static information. + +```js +const relationships = store + .getSchemaDefinitionService() + .relationshipsDefinitionFor({ type: 'user' }); +``` From 6e7879fdb049331cbba1dce637543d6adf5ebb74 Mon Sep 17 00:00:00 2001 From: Jared Galanis Date: Fri, 16 Jun 2023 20:09:39 -0400 Subject: [PATCH 05/26] deprecate-has-record-for-id --- content/ember-data/v4/deprecate-early-static.md | 9 ++------- content/ember-data/v4/deprecate-has-record-for-id.md | 6 ++---- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/content/ember-data/v4/deprecate-early-static.md b/content/ember-data/v4/deprecate-early-static.md index d0e16250..ecceb6c9 100644 --- a/content/ember-data/v4/deprecate-early-static.md +++ b/content/ember-data/v4/deprecate-early-static.md @@ -5,11 +5,7 @@ until: '5.0' since: '4.7' --- -This deprecation triggers if static computed properties -or methods are triggered without looking up the record -via the store service's `modelFor` hook. Accessing this -static information without looking up the model via the -store most commonly occurs when +This deprecation triggers if static computed properties or methods are triggered without looking up the record via the store service's `modelFor` hook. Accessing this static information without looking up the model via the store most commonly occurs when: - using ember-cli-mirage (to fix, refactor to not use its auto-discovery of ember-data models) - importing a model class and accessing its static information via the import @@ -28,8 +24,7 @@ Do _at least_ this const relationships = store.modelFor('user').relationshipsByName; ``` -However, the much more future proof refactor is to not use `modelFor` at all but instead -to utilize the schema service for this static information. +However, the much more future proof refactor is to not use `modelFor` at all but instead to utilize the schema service for this static information. ```js const relationships = store diff --git a/content/ember-data/v4/deprecate-has-record-for-id.md b/content/ember-data/v4/deprecate-has-record-for-id.md index 59bc6de2..ff9bd6da 100644 --- a/content/ember-data/v4/deprecate-has-record-for-id.md +++ b/content/ember-data/v4/deprecate-has-record-for-id.md @@ -5,8 +5,6 @@ until: '5.0' since: '4.5' --- -#### TODO +Deprecates `store.hasRecordForId(type, id)` in favor of `store.peekRecord({ type, id }) !== null`. -store.hasRecordForId has been deprecated in favor of store.peekRecord - -[RFC TODO](TODO) +Broadly speaking, while the ability to query for presence is important, a key distinction exists between these methods that make relying on `hasRecordForId` unsafe, as it may report `true` for a record which is not-yet loaded and un-peekable. `peekRecord` offers a safe mechanism by which to check for whether a record is present in a usable manner. From ca7b5e6c4783e4556ac2c30c1f5156d2f19be8d5 Mon Sep 17 00:00:00 2001 From: Jared Galanis Date: Fri, 16 Jun 2023 20:19:24 -0400 Subject: [PATCH 06/26] add `errorsHashToArray` `errorsArrayToHash` and `normalizeModelName` --- .../ember-data/v4/deprecate-errors-array-to-hash-helper.md | 6 +++--- .../ember-data/v4/deprecate-errors-hash-to-array-helper.md | 6 +++--- .../ember-data/v4/deprecate-normalize-modelname-helper.md | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/content/ember-data/v4/deprecate-errors-array-to-hash-helper.md b/content/ember-data/v4/deprecate-errors-array-to-hash-helper.md index b860c2f2..b70349a1 100644 --- a/content/ember-data/v4/deprecate-errors-array-to-hash-helper.md +++ b/content/ember-data/v4/deprecate-errors-array-to-hash-helper.md @@ -5,8 +5,8 @@ until: '5.0' since: '4.7' --- -#### TODO +Deprecates `errorsHashToArray` `errorsArrayToHash` and `normalizeModelName`. -errorsArrayToHash helper has been deprecated +Users making use of these (already private) utilities can trivially copy them into their own codebase to continue using them, though we recommend refactoring to a more direct conversion into the expected errors format for the errors helpers. -[RFC TODO](TODO) +For refactoring normalizeModelName we also recommend following the guidance in [RFC#740 Deprecate Non-Strict Types](https://github.com/emberjs/rfcs/pull/740). diff --git a/content/ember-data/v4/deprecate-errors-hash-to-array-helper.md b/content/ember-data/v4/deprecate-errors-hash-to-array-helper.md index 6f3b4f15..b70349a1 100644 --- a/content/ember-data/v4/deprecate-errors-hash-to-array-helper.md +++ b/content/ember-data/v4/deprecate-errors-hash-to-array-helper.md @@ -5,8 +5,8 @@ until: '5.0' since: '4.7' --- -#### TODO +Deprecates `errorsHashToArray` `errorsArrayToHash` and `normalizeModelName`. -errorsHashToArray helper has been deprecated +Users making use of these (already private) utilities can trivially copy them into their own codebase to continue using them, though we recommend refactoring to a more direct conversion into the expected errors format for the errors helpers. -[RFC TODO](TODO) +For refactoring normalizeModelName we also recommend following the guidance in [RFC#740 Deprecate Non-Strict Types](https://github.com/emberjs/rfcs/pull/740). diff --git a/content/ember-data/v4/deprecate-normalize-modelname-helper.md b/content/ember-data/v4/deprecate-normalize-modelname-helper.md index 2ba55048..8d866519 100644 --- a/content/ember-data/v4/deprecate-normalize-modelname-helper.md +++ b/content/ember-data/v4/deprecate-normalize-modelname-helper.md @@ -5,8 +5,8 @@ until: '5.0' since: '4.7' --- -#### TODO +Deprecates `errorsHashToArray` `errorsArrayToHash` and `normalizeModelName`. -the helper function normalizeModelName is deprecated. You should use model names that are already normalized, or use string helpers of your own. This function is primarily an alias for dasherize from @ember/string. +Users making use of these (already private) utilities can trivially copy them into their own codebase to continue using them, though we recommend refactoring to a more direct conversion into the expected errors format for the errors helpers. -[RFC TODO](TODO) +For refactoring normalizeModelName we also recommend following the guidance in [RFC#740 Deprecate Non-Strict Types](https://github.com/emberjs/rfcs/pull/740). From 5498ab23a82f0614f8a8d3d401cab0a8da326483 Mon Sep 17 00:00:00 2001 From: Jared Galanis Date: Fri, 16 Jun 2023 20:21:50 -0400 Subject: [PATCH 07/26] add deprecate-instantiate-record-args --- .../ember-data/v4/deprecate-early-static.md | 6 ++--- .../v4/deprecate-instantiate-record-args.md | 22 ++++++++++++++++--- 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/content/ember-data/v4/deprecate-early-static.md b/content/ember-data/v4/deprecate-early-static.md index ecceb6c9..4f144606 100644 --- a/content/ember-data/v4/deprecate-early-static.md +++ b/content/ember-data/v4/deprecate-early-static.md @@ -10,7 +10,7 @@ This deprecation triggers if static computed properties or methods are triggered - using ember-cli-mirage (to fix, refactor to not use its auto-discovery of ember-data models) - importing a model class and accessing its static information via the import -Instead of +Instead of: ```js import User from 'my-app/models/user'; @@ -18,13 +18,13 @@ import User from 'my-app/models/user'; const relationships = User.relationshipsByName; ``` -Do _at least_ this +Do _at least_ this: ```js const relationships = store.modelFor('user').relationshipsByName; ``` -However, the much more future proof refactor is to not use `modelFor` at all but instead to utilize the schema service for this static information. +However, the much more future proof refactor is to not use `modelFor` at all, but instead to utilize the schema service for this static information: ```js const relationships = store diff --git a/content/ember-data/v4/deprecate-instantiate-record-args.md b/content/ember-data/v4/deprecate-instantiate-record-args.md index 2b133e2d..6adf6ac9 100644 --- a/content/ember-data/v4/deprecate-instantiate-record-args.md +++ b/content/ember-data/v4/deprecate-instantiate-record-args.md @@ -5,8 +5,24 @@ until: '5.0' since: '4.12' --- -#### TODO +Deprecates using the former 3rd and 4th arguments to `Store.instantiateRecord` which are now available as properties on the store. -Expected store.instantiateRecord to have an arity of 2. recordDataFor and notificationManager args have been deprecated. +Before: -[RFC TODO](TODO) +```ts +{ + instantiateRecord(identifier, createArgs, recordDataFor, notifications) { + const cache = recordDataFor(identifier); + } +} +``` + +After: + +```ts +{ + instantiateRecord(identifier, createArgs) { + const { cache, notifications } = this; + } +} +``` From 134671e9260ed8467fda3593ab5fd5ce4dff4606 Mon Sep 17 00:00:00 2001 From: Jared Galanis Date: Fri, 16 Jun 2023 20:24:52 -0400 Subject: [PATCH 08/26] deprecate-secret-adapter-fallback --- .../ember-data/v4/deprecate-secret-adapter-fallback.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/content/ember-data/v4/deprecate-secret-adapter-fallback.md b/content/ember-data/v4/deprecate-secret-adapter-fallback.md index 2c7a01d6..d1b4c818 100644 --- a/content/ember-data/v4/deprecate-secret-adapter-fallback.md +++ b/content/ember-data/v4/deprecate-secret-adapter-fallback.md @@ -5,8 +5,10 @@ until: '5.0' since: '4.5' --- -#### TODO +Deprecates the secret `-json-api` fallback adapter in favor or an explicit "catch all" application adapter. In addition to this deprecation ensuring the user has explicitly chosen an adapter, this ensures that the user may choose to use no adapter at all. -Your application is utilizing a deprecated hidden fallback adapter (-json-api). Please implement an application adapter to function as your fallback. +Simplest fix: -[RFC TODO](TODO) +```js {data-filename=/app/adapters/application.js} +export { default } from '@ember-data/adapter/json-api'; +``` From e41321c8ef6fba71bd3afac906716e6688db1707 Mon Sep 17 00:00:00 2001 From: Jared Galanis Date: Fri, 16 Jun 2023 20:29:53 -0400 Subject: [PATCH 09/26] add deprecate-model-reopen --- .../ember-data/v4/deprecate-model-reopen.md | 21 +++++++++++++++--- .../v4/deprecate-model-reopenclass.md | 22 ++++++++++++++++--- 2 files changed, 37 insertions(+), 6 deletions(-) diff --git a/content/ember-data/v4/deprecate-model-reopen.md b/content/ember-data/v4/deprecate-model-reopen.md index b769e70c..33feaeea 100644 --- a/content/ember-data/v4/deprecate-model-reopen.md +++ b/content/ember-data/v4/deprecate-model-reopen.md @@ -5,8 +5,23 @@ until: '5.0' since: '4.7' --- -#### TODO +For properties known ahead of time, instead of: -Model.reopen is deprecated. Use <> extends Model to extend your class instead. +```ts +class User extends Model { + @attr firstName; +} -[RFC 738](https://rfcs.emberjs.com/id/0738-ember-data-deprecate-model-reopen) +User.reopen({ lastName: attr() }); +``` + +Extend `User` again or include it in the initial definition: + +```ts +class User extends Model { + @attr firstName; + @attr lastName; +} +``` + +For properties generated dynamically, consider registering a `SchemaDefinitionService` with the store, as such services are capable of dynamically adjusting their schemas, and utilize the `instantiateRecord` hook to create a Proxy based class that can react to the changes in the schema. Use `Foo extends Model` to extend your class instead. diff --git a/content/ember-data/v4/deprecate-model-reopenclass.md b/content/ember-data/v4/deprecate-model-reopenclass.md index db4e410b..26229bb2 100644 --- a/content/ember-data/v4/deprecate-model-reopenclass.md +++ b/content/ember-data/v4/deprecate-model-reopenclass.md @@ -5,8 +5,24 @@ until: '5.0' since: '4.7' --- -#### TODO +Instead of reopenClass, define `static` properties with native class syntax or add them to the final object. -Model.reopenClass is deprecated. Use Foo extends Model to add static methods and properties to your class instead. +Instead of: -[RFC TODO](TODO) +```js +User.reopenClass({ aStaticMethod() {} }); +``` + +Do this: + +```js +class User { + static aStaticMethod() {} +} +``` + +Or, do this: + +```js +User.aStaticMethod = function () {}; +``` From 15b74a619a5b64ff68d895946c8ba142d60420d0 Mon Sep 17 00:00:00 2001 From: Jared Galanis Date: Fri, 16 Jun 2023 20:32:52 -0400 Subject: [PATCH 10/26] Update non-explicit-relationships.md --- .../v4/non-explicit-relationships.md | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/content/ember-data/v4/non-explicit-relationships.md b/content/ember-data/v4/non-explicit-relationships.md index cfdaec9c..fca98807 100644 --- a/content/ember-data/v4/non-explicit-relationships.md +++ b/content/ember-data/v4/non-explicit-relationships.md @@ -5,8 +5,25 @@ until: '5.0' since: '4.7' --- -#### TODO +Deprecates when polymorphic relationships are detected via inheritance or mixins and no polymorphic relationship configuration has been setup. -Relationships that satisfy polymorphic relationships MUST define which abstract-type they are satisfying using 'as'. The field '${fieldOnInverse}' on type '${inverseSchema.modelName}' is misconfigured. +For further reading please review [RFC#793](https://rfcs.emberjs.com/id/0793-polymporphic-relations-without-inheritance) which introduced support for explicit relationship polymorphism without mixins or inheritance. -[RFC TODO](TODO) +You may still use mixins and inheritance to setup your polymorphism; however, the class structure is no longer what drives the design. Instead polymorphism is "traits" based or "structural": so long as each model which can satisfy the polymorphic relationship defines the inverse in the same way they work. + +Notably: `inverse: null` relationships can receive any type as a record with no additional configuration at all. + +Example Polymorphic Relationship Configuration: + +```js +// polymorphic relationship +class Tag extends Model { + @hasMany('taggable', { async: false, polymorphic: true, inverse: 'tags' }) + tagged; +} + +// an inverse concrete relationship (e.g. satisfies "taggable") +class Post extends Model { + @hasMany('tag', { async: false, inverse: 'tagged', as: 'taggable' }) tags; +} +``` From 02970dfe2970466355f6d8a70c0b57ec13d91655 Mon Sep 17 00:00:00 2001 From: Jared Galanis Date: Fri, 16 Jun 2023 20:35:27 -0400 Subject: [PATCH 11/26] Update deprecate-promise-many-array-behaviors.md --- .../deprecate-promise-many-array-behaviors.md | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/content/ember-data/v4/deprecate-promise-many-array-behaviors.md b/content/ember-data/v4/deprecate-promise-many-array-behaviors.md index 9fdd738b..73ad4e3e 100644 --- a/content/ember-data/v4/deprecate-promise-many-array-behaviors.md +++ b/content/ember-data/v4/deprecate-promise-many-array-behaviors.md @@ -5,8 +5,23 @@ until: '5.0' since: '4.7' --- -#### TODO +[RFC Documentation](https://rfcs.emberjs.com/id/0745-ember-data-deprecate-methods-on-promise-many-array) -The createRecord method on ember-data's PromiseManyArray is deprecated. await the promise and work with the ManyArray directly. +This deprecation deprecates accessing values on the asynchronous proxy in favor of first "resolving" or "awaiting" the promise to retrieve a synchronous value. -[RFC TODO](TODO) +Template iteration of the asynchronous value will still work and not trigger the deprecation, but all JS access should be avoided and HBS access for anything but `{{#each}}` should also be refactored. + +Recommended approaches include using the addon `ember-promise-helpers`, using Ember's `resource` pattern (including potentially the addon `ember-data-resources`), resolving the value in routes/provider components, or using the references API. + +An example of using the [hasMany](https://api.emberjs.com/ember-data/4.11/classes/Model/methods/hasMany?anchor=hasMany) [reference API](https://api.emberjs.com/ember-data/release/classes/HasManyReference): + +```js +// get the synchronous "ManyArray" value for the asynchronous "friends" relationship. +// note, this will return `null` if the relationship has not been loaded yet +const value = person.hasMany('friends').value(); + +// to get just the list of related IDs +const ids = person.hasMany('friends').ids(); +``` + +References participate in autotracking and getters/cached getters etc. which consume them will recompute if the value changes. From 2c47be8554cd0c597d4b406138938b2af69f6caa Mon Sep 17 00:00:00 2001 From: Jared Galanis Date: Fri, 16 Jun 2023 20:36:44 -0400 Subject: [PATCH 12/26] Update deprecate-promise-proxies.md --- .../ember-data/v4/deprecate-promise-proxies.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/content/ember-data/v4/deprecate-promise-proxies.md b/content/ember-data/v4/deprecate-promise-proxies.md index 2b022573..ada6f32a 100644 --- a/content/ember-data/v4/deprecate-promise-proxies.md +++ b/content/ember-data/v4/deprecate-promise-proxies.md @@ -5,8 +5,18 @@ until: '5.0' since: '4.7' --- -#### TODO +Additional Reading: [RFC#846 Deprecate Proxies](https://rfcs.emberjs.com/id/0846-ember-data-deprecate-proxies) -You passed in a PromiseProxy to a Relationship API that now expects a resolved value. await the value before setting it. +Deprecates using the proxy object/proxy array capabilities of values returned from: -[RFC 846](https://rfcs.emberjs.com/id/0846-ember-data-deprecate-proxies) +- `store.findRecord` +- `store.findAll` +- `store.query` +- `store.queryRecord` +- `record.save` +- `recordArray.save` +- `recordArray.update` + +These methods will now return a native Promise that resolves with the value. + +Note that this does not deprecate the proxy behaviors of `PromiseBelongsTo`. See RFC for reasoning. The opportunity should still be taken if available to stop using these proxy behaviors; however, this class will remain until `import Model from '@ember-data/model';` is deprecated more broadly. From d0a99ce77ce47e0be3a286a0209bed43540f96dd Mon Sep 17 00:00:00 2001 From: Jared Galanis Date: Fri, 16 Jun 2023 20:38:36 -0400 Subject: [PATCH 13/26] Update deprecate-non-strict-relationships.md --- .../v4/deprecate-non-strict-relationships.md | 28 +++++++++++++++++-- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/content/ember-data/v4/deprecate-non-strict-relationships.md b/content/ember-data/v4/deprecate-non-strict-relationships.md index a47713af..5842b3f4 100644 --- a/content/ember-data/v4/deprecate-non-strict-relationships.md +++ b/content/ember-data/v4/deprecate-non-strict-relationships.md @@ -5,8 +5,30 @@ until: '5.0' since: '4.7' --- -#### TODO +Deprecates when belongsTo and hasMany relationships are defined without specifying whether the relationship is asynchronous. -hasMany(, ) must specify options.inverse as either `null` or string type of the related resource. +The current behavior is that relationships which do not define this setting are aschronous (`{ async: true }`). -[RFC 739](https://rfcs.emberjs.com/id/0739-ember-data-deprecate-non-strict-relationships) +Instead of: + +```js +class Company extends Model { + @hasMany('employee') employees; +} + +class Employee extends Model { + @belongsTo('company') company; +} +``` + +Use: + +```js +class Company extends Model { + @hasMany('employee', { async: true, inverse: 'company' }) employees; +} + +class Employee extends Model { + @belongsTo('company', { async: true, inverse: 'employees' }) company; +} +``` From b993cb289f328cf59bb4f3b930728d447a49a063 Mon Sep 17 00:00:00 2001 From: Jared Galanis Date: Fri, 16 Jun 2023 20:49:36 -0400 Subject: [PATCH 14/26] Update deprecate-non-strict-relationships.md --- .../v4/deprecate-non-strict-relationships.md | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/content/ember-data/v4/deprecate-non-strict-relationships.md b/content/ember-data/v4/deprecate-non-strict-relationships.md index 5842b3f4..80220291 100644 --- a/content/ember-data/v4/deprecate-non-strict-relationships.md +++ b/content/ember-data/v4/deprecate-non-strict-relationships.md @@ -32,3 +32,81 @@ class Employee extends Model { @belongsTo('company', { async: true, inverse: 'employees' }) company; } ``` + +Also deprecates when belongsTo and hasMany relationships are defined without specifying the inverse field on the related type. + +The current behavior is that relationships which do not define this setting have their inverse determined at runtime, which is potentially non-deterministic when mixins and polymorphism are involved. + +If an inverse relationship exists and you wish changes on one side to reflect onto the other side, use the inverse key. If you wish to not have changes reflected or no inverse relationship exists, specify `inverse: null`. + +Instead of: + +```js +class Company extends Model { + @hasMany('employee') employees; +} +class Employee extends Model { + @belongsTo('company') company; +} +``` + +Use: + +```js +class Company extends Model { + @hasMany('employee', { async: true, inverse: 'company' }) employees; +} + +class Employee extends Model { + @belongsTo('company', { async: true, inverse: 'employees' }) company; +} +``` + +Instead of: + +```js +class Company extends Model { + @hasMany('employee') employees; +} +class Employee extends Model { + @attr name; +} +``` + +Use: + +```js +class Company extends Model { + @hasMany('employee', { async: true, inverse: null }) employees; +} + +class Employee extends Model { + @attr name; +} +``` + +And also deprecates when belongsTo and hasMany relationships are defined without specifying the inverse record's type. + +Instead of + +```js +class Company extends Model { + @hasMany() employees; +} + +class Employee extends Model { + @belongsTo() company; +} +``` + +Use + +```js +class Company extends Model { + @hasMany('employee', { async: true, inverse: 'company' }) employees; +} + +class Employee extends Model { + @belongsTo('company', { async: true, inverse: 'employees' }) company; +} +``` From 0c2ef8dcc010d532cd75fd1d08bb76b2300d5561 Mon Sep 17 00:00:00 2001 From: Jared Galanis Date: Fri, 16 Jun 2023 20:50:41 -0400 Subject: [PATCH 15/26] Update rsvp-unresolved-async.md --- content/ember-data/v4/rsvp-unresolved-async.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/ember-data/v4/rsvp-unresolved-async.md b/content/ember-data/v4/rsvp-unresolved-async.md index f2ab4ce2..cdc2b2f3 100644 --- a/content/ember-data/v4/rsvp-unresolved-async.md +++ b/content/ember-data/v4/rsvp-unresolved-async.md @@ -5,8 +5,8 @@ until: '5.0' since: '4.5' --- -#### TODO +Deprecates when a request promise did not resolve prior to the store tearing down. -A Promise for fetching ${relationship.type} did not resolve by the time your model was destroyed. This will error in a future release. +Note: in most cases even with the promise guard that is now being deprecated a test crash would still be encountered. -[RFC 846](https://rfcs.emberjs.com/id/0846-ember-data-deprecate-proxies) +To resolve: Tests or Fastboot instances which crash need to find triggers requests and properly await them before tearing down. From 359658db443f3c60f4a7367858e4b1c39b630f36 Mon Sep 17 00:00:00 2001 From: Jared Galanis Date: Fri, 16 Jun 2023 20:52:08 -0400 Subject: [PATCH 16/26] Update model-save-promise.md --- content/ember-data/v4/model-save-promise.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/content/ember-data/v4/model-save-promise.md b/content/ember-data/v4/model-save-promise.md index 84f8aa00..09566666 100644 --- a/content/ember-data/v4/model-save-promise.md +++ b/content/ember-data/v4/model-save-promise.md @@ -5,9 +5,13 @@ until: '5.0' since: '4.4' --- -#### TODO +Affects: -Accessing ${prop} is deprecated. The return type is being changed from PromiseObjectProxy to a Promise. -The only available methods to access on this promise are .then, .catch and .finally`. +- `model.save` / `store.saveRecord` +- `model.reload` -[RFC 795](https://rfcs.emberjs.com/id/0795-ember-data-return-promise-save) +Deprecates the promise-proxy returned by these methods in favor of a Promise return value. + +To resolve this deprecation, `await` or `.then` the return value before doing work with the result instead of accessing values via the proxy. + +To continue utilizing flags such as `isPending` in your templates consider using [ember-promise-helpers](https://github.com/fivetanley/ember-promise-helpers) From 2f20b739a9baf120817b87dea57f155ae1b27ea6 Mon Sep 17 00:00:00 2001 From: Jared Galanis Date: Fri, 16 Jun 2023 20:55:18 -0400 Subject: [PATCH 17/26] Create deprecate-snapshot-model-class-access.md --- .../v4/deprecate-snapshot-model-class-access.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 content/ember-data/v4/deprecate-snapshot-model-class-access.md diff --git a/content/ember-data/v4/deprecate-snapshot-model-class-access.md b/content/ember-data/v4/deprecate-snapshot-model-class-access.md new file mode 100644 index 00000000..4d7b7b1b --- /dev/null +++ b/content/ember-data/v4/deprecate-snapshot-model-class-access.md @@ -0,0 +1,16 @@ +--- +id: ember-data:deprecate-snapshot-model-class-access +title: Deprecate Snapshot Model Class Access +until: '5.0' +since: '4.5' +--- + +Deprecates accessing the factory class for a given resource type via properties on various classes. + +Guards: + +- SnapshotRecordArray.type +- Snapshot.type +- RecordArray.type + +Use `store.modelFor()` instead. From dbe8450820677b8c4971e2fe38f9e3aa43a6d56b Mon Sep 17 00:00:00 2001 From: Jared Galanis Date: Fri, 16 Jun 2023 20:56:29 -0400 Subject: [PATCH 18/26] Update deprecate-store-find.md --- content/ember-data/v4/deprecate-store-find.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/content/ember-data/v4/deprecate-store-find.md b/content/ember-data/v4/deprecate-store-find.md index 0a8c104d..1114c814 100644 --- a/content/ember-data/v4/deprecate-store-find.md +++ b/content/ember-data/v4/deprecate-store-find.md @@ -5,8 +5,6 @@ until: '5.0' since: '4.5' --- -#### TODO +Deprecates `store.hasRecordForId(type, id)` in favor of `store.peekRecord({ type, id }) !== null`. -Using store.find is deprecated, use store.findRecord instead. Likely this means you are relying on the implicit store fetching behavior of routes unknowingly. - -[RFC TODO](TODO) +Broadly speaking, while the ability to query for presence is important, a key distinction exists between these methods that make relying on `hasRecordForId` unsafe, as it may report `true` for a record which is not-yet loaded and un-peekable. `peekRecord` offers a safe mechanism by which to check for whether a record is present in a usable manner. From b74e1f9161a830396c6208a66de03d13bc9e49e1 Mon Sep 17 00:00:00 2001 From: Jared Galanis Date: Fri, 16 Jun 2023 20:57:47 -0400 Subject: [PATCH 19/26] Update deprecate-string-arg-schemas.md --- content/ember-data/v4/deprecate-string-arg-schemas.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/content/ember-data/v4/deprecate-string-arg-schemas.md b/content/ember-data/v4/deprecate-string-arg-schemas.md index 89ac4844..4f0b527c 100644 --- a/content/ember-data/v4/deprecate-string-arg-schemas.md +++ b/content/ember-data/v4/deprecate-string-arg-schemas.md @@ -5,8 +5,11 @@ until: '5.0' since: '4.5' --- -#### TODO +Deprecates `schema.attributesDefinitionFor(type)` and `schema.relationshipsDefinitionFor(type)` in favor of a consistent object signature (`identifier | { type }`). -attributesDefinitionFor expects either a record identifier or an argument of shape { type: string }, received a string. +To resolve change: -[RFC TODO](TODO) +```diff +- store.getSchemaDefinitionService().attributesDefinitionFor('user') ++ store.getSchemaDefinitionService().attributesDefinitionFor({ type: 'user' }) +``` From ed55e180ad011bbcab27be5b95b38b8f39c49328 Mon Sep 17 00:00:00 2001 From: Jared Galanis Date: Fri, 16 Jun 2023 20:58:49 -0400 Subject: [PATCH 20/26] Update deprecate-v1cache-store-apis.md --- content/ember-data/v4/deprecate-v1cache-store-apis.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/ember-data/v4/deprecate-v1cache-store-apis.md b/content/ember-data/v4/deprecate-v1cache-store-apis.md index 5c3850bd..b0679d85 100644 --- a/content/ember-data/v4/deprecate-v1cache-store-apis.md +++ b/content/ember-data/v4/deprecate-v1cache-store-apis.md @@ -5,8 +5,8 @@ until: '5.0' since: '4.7' --- -#### TODO +Deprecates various methods on the store and store-cache-wrapper that were specific to the v1 cache. -store.hasRecordForId has been deprecated in favor of store.peekRecord +Most applications should not encounter this deprecation, but if you do it means that an addon you are using is likely using these methods as part of having implemented its own cache. -[RFC TODO](TODO) +The implementation will need to update to the V2 Cache API equivalent method as detailed in the deprecation method. Generally this means the implementation needs to be more broadly reworked to use the newer V2.1 Cache API. From 41311876b8dd12c7982463c5d51eee601b2707b0 Mon Sep 17 00:00:00 2001 From: Jared Galanis Date: Fri, 16 Jun 2023 21:02:31 -0400 Subject: [PATCH 21/26] Update deprecate-v1-cache.md --- content/ember-data/v4/deprecate-v1-cache.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/ember-data/v4/deprecate-v1-cache.md b/content/ember-data/v4/deprecate-v1-cache.md index c4f0f9f2..5377eaab 100644 --- a/content/ember-data/v4/deprecate-v1-cache.md +++ b/content/ember-data/v4/deprecate-v1-cache.md @@ -5,8 +5,8 @@ until: '5.0' since: '4.7' --- -#### TODO +Deprecates instantiating a non-singleton cache via `store.createRecordDataFor` in favor of a singleton-cache via `store.createCache`. -This RecordData uses the deprecated V1 RecordData Spec. Upgrade to V2 to maintain compatibility. +Most applications should not encounter this deprecation, but if you do it means that an addon you are using is likely using an unsupported cache implementation. -[RFC TODO](TODO) +The implementation will need to update to the V2 Cache API and be integrated via the `createCache` hook. From b5a7cb6c02674e75d42ed84da5c1ee423d5eae2e Mon Sep 17 00:00:00 2001 From: Jared Galanis Date: Fri, 16 Jun 2023 21:03:43 -0400 Subject: [PATCH 22/26] Delete deprecate-record-data-for.md --- content/ember-data/v4/deprecate-record-data-for.md | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 content/ember-data/v4/deprecate-record-data-for.md diff --git a/content/ember-data/v4/deprecate-record-data-for.md b/content/ember-data/v4/deprecate-record-data-for.md deleted file mode 100644 index 2f1ffade..00000000 --- a/content/ember-data/v4/deprecate-record-data-for.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -id: ember-data:deprecate-record-data-for -title: Deprecate Record Data For -until: '5.0' -since: '4.10' ---- - -#### TODO - -StoreWrapper.recordDataFor is deprecated. With Singleton Cache, this method is no longer needed as the caller is its own cache reference. - -[RFC TODO](TODO) From acb1d2eb088ef126bb8b8c3056c660a509c0490b Mon Sep 17 00:00:00 2001 From: Jared Galanis Date: Sat, 17 Jun 2023 08:12:06 -0400 Subject: [PATCH 23/26] use displayId instead of id --- content/ember-data/v4/deprecate-array-like.md | 2 +- content/ember-data/v4/deprecate-early-static.md | 2 +- content/ember-data/v4/deprecate-errors-array-to-hash-helper.md | 2 +- content/ember-data/v4/deprecate-errors-hash-to-array-helper.md | 2 +- content/ember-data/v4/deprecate-has-record-for-id.md | 2 +- content/ember-data/v4/deprecate-instantiate-record-args.md | 2 +- content/ember-data/v4/deprecate-model-reopen.md | 2 +- content/ember-data/v4/deprecate-model-reopenclass.md | 2 +- content/ember-data/v4/deprecate-non-strict-relationships.md | 2 +- content/ember-data/v4/deprecate-normalize-modelname-helper.md | 2 +- content/ember-data/v4/deprecate-promise-many-array-behaviors.md | 2 +- content/ember-data/v4/deprecate-promise-proxies.md | 2 +- content/ember-data/v4/deprecate-secret-adapter-fallback.md | 2 +- content/ember-data/v4/deprecate-snapshot-model-class-access.md | 2 +- content/ember-data/v4/deprecate-store-find.md | 2 +- content/ember-data/v4/deprecate-string-arg-schemas.md | 2 +- content/ember-data/v4/deprecate-v1-cache.md | 2 +- content/ember-data/v4/deprecate-v1cache-store-apis.md | 2 +- content/ember-data/v4/model-save-promise.md | 2 +- content/ember-data/v4/no-a-with-array-like.md | 2 +- content/ember-data/v4/non-explicit-relationships.md | 2 +- content/ember-data/v4/rsvp-unresolved-async.md | 2 +- 22 files changed, 22 insertions(+), 22 deletions(-) diff --git a/content/ember-data/v4/deprecate-array-like.md b/content/ember-data/v4/deprecate-array-like.md index 234af35e..2a2f5e2c 100644 --- a/content/ember-data/v4/deprecate-array-like.md +++ b/content/ember-data/v4/deprecate-array-like.md @@ -1,5 +1,5 @@ --- -id: ember-data:deprecate-array-like +displayId: ember-data:deprecate-array-like title: Deprecate Array Like until: '5.0' since: '4.7' diff --git a/content/ember-data/v4/deprecate-early-static.md b/content/ember-data/v4/deprecate-early-static.md index 4f144606..e74743fe 100644 --- a/content/ember-data/v4/deprecate-early-static.md +++ b/content/ember-data/v4/deprecate-early-static.md @@ -1,5 +1,5 @@ --- -id: ember-data:deprecate-early-static +displayId: ember-data:deprecate-early-static title: Deprecate Early Static until: '5.0' since: '4.7' diff --git a/content/ember-data/v4/deprecate-errors-array-to-hash-helper.md b/content/ember-data/v4/deprecate-errors-array-to-hash-helper.md index b70349a1..8349ba51 100644 --- a/content/ember-data/v4/deprecate-errors-array-to-hash-helper.md +++ b/content/ember-data/v4/deprecate-errors-array-to-hash-helper.md @@ -1,5 +1,5 @@ --- -id: ember-data:deprecate-errors-hash-to-array-helper +displayId: ember-data:deprecate-errors-hash-to-array-helper title: Deprecate Errors Hash To Array Helper until: '5.0' since: '4.7' diff --git a/content/ember-data/v4/deprecate-errors-hash-to-array-helper.md b/content/ember-data/v4/deprecate-errors-hash-to-array-helper.md index b70349a1..8349ba51 100644 --- a/content/ember-data/v4/deprecate-errors-hash-to-array-helper.md +++ b/content/ember-data/v4/deprecate-errors-hash-to-array-helper.md @@ -1,5 +1,5 @@ --- -id: ember-data:deprecate-errors-hash-to-array-helper +displayId: ember-data:deprecate-errors-hash-to-array-helper title: Deprecate Errors Hash To Array Helper until: '5.0' since: '4.7' diff --git a/content/ember-data/v4/deprecate-has-record-for-id.md b/content/ember-data/v4/deprecate-has-record-for-id.md index ff9bd6da..b83547b4 100644 --- a/content/ember-data/v4/deprecate-has-record-for-id.md +++ b/content/ember-data/v4/deprecate-has-record-for-id.md @@ -1,5 +1,5 @@ --- -id: ember-data:deprecate-has-record-for-id +displayId: ember-data:deprecate-has-record-for-id title: Deprecate Has Record For Id until: '5.0' since: '4.5' diff --git a/content/ember-data/v4/deprecate-instantiate-record-args.md b/content/ember-data/v4/deprecate-instantiate-record-args.md index 6adf6ac9..b122f4b8 100644 --- a/content/ember-data/v4/deprecate-instantiate-record-args.md +++ b/content/ember-data/v4/deprecate-instantiate-record-args.md @@ -1,5 +1,5 @@ --- -id: ember-data:deprecate-instantiate-record-args +displayId: ember-data:deprecate-instantiate-record-args title: Deprecate Instantiate Record Args until: '5.0' since: '4.12' diff --git a/content/ember-data/v4/deprecate-model-reopen.md b/content/ember-data/v4/deprecate-model-reopen.md index 33feaeea..17c8df79 100644 --- a/content/ember-data/v4/deprecate-model-reopen.md +++ b/content/ember-data/v4/deprecate-model-reopen.md @@ -1,5 +1,5 @@ --- -id: ember-data:deprecate-model-reopen +displayId: ember-data:deprecate-model-reopen title: Deprecate Model Reopen until: '5.0' since: '4.7' diff --git a/content/ember-data/v4/deprecate-model-reopenclass.md b/content/ember-data/v4/deprecate-model-reopenclass.md index 26229bb2..408bf35a 100644 --- a/content/ember-data/v4/deprecate-model-reopenclass.md +++ b/content/ember-data/v4/deprecate-model-reopenclass.md @@ -1,5 +1,5 @@ --- -id: ember-data:deprecate-model-reopenclass +displayId: ember-data:deprecate-model-reopenclass title: Deprecate Model Reopenclass until: '5.0' since: '4.7' diff --git a/content/ember-data/v4/deprecate-non-strict-relationships.md b/content/ember-data/v4/deprecate-non-strict-relationships.md index 80220291..ac9ce4c4 100644 --- a/content/ember-data/v4/deprecate-non-strict-relationships.md +++ b/content/ember-data/v4/deprecate-non-strict-relationships.md @@ -1,5 +1,5 @@ --- -id: ember-data:deprecate-non-strict-relationships +displayId: ember-data:deprecate-non-strict-relationships title: Deprecate Non Strict Relationships until: '5.0' since: '4.7' diff --git a/content/ember-data/v4/deprecate-normalize-modelname-helper.md b/content/ember-data/v4/deprecate-normalize-modelname-helper.md index 8d866519..ebb39451 100644 --- a/content/ember-data/v4/deprecate-normalize-modelname-helper.md +++ b/content/ember-data/v4/deprecate-normalize-modelname-helper.md @@ -1,5 +1,5 @@ --- -id: ember-data:deprecate-promise-many-array-behaviors +displayId: ember-data:deprecate-promise-many-array-behaviors title: Deprecate Promise Many Array Behaviors until: '5.0' since: '4.7' diff --git a/content/ember-data/v4/deprecate-promise-many-array-behaviors.md b/content/ember-data/v4/deprecate-promise-many-array-behaviors.md index 73ad4e3e..9cfcfb52 100644 --- a/content/ember-data/v4/deprecate-promise-many-array-behaviors.md +++ b/content/ember-data/v4/deprecate-promise-many-array-behaviors.md @@ -1,5 +1,5 @@ --- -id: ember-data:deprecate-promise-many-array-behaviors +displayId: ember-data:deprecate-promise-many-array-behaviors title: Deprecate Promise Many Array Behaviors until: '5.0' since: '4.7' diff --git a/content/ember-data/v4/deprecate-promise-proxies.md b/content/ember-data/v4/deprecate-promise-proxies.md index ada6f32a..a225c47d 100644 --- a/content/ember-data/v4/deprecate-promise-proxies.md +++ b/content/ember-data/v4/deprecate-promise-proxies.md @@ -1,5 +1,5 @@ --- -id: ember-data:deprecate-promise-proxies +displayId: ember-data:deprecate-promise-proxies title: Deprecate Promise Proxies until: '5.0' since: '4.7' diff --git a/content/ember-data/v4/deprecate-secret-adapter-fallback.md b/content/ember-data/v4/deprecate-secret-adapter-fallback.md index d1b4c818..b898425b 100644 --- a/content/ember-data/v4/deprecate-secret-adapter-fallback.md +++ b/content/ember-data/v4/deprecate-secret-adapter-fallback.md @@ -1,5 +1,5 @@ --- -id: ember-data:deprecate-secret-adapter-fallback +displayId: ember-data:deprecate-secret-adapter-fallback title: Deprecate Secret Adapter Fallback until: '5.0' since: '4.5' diff --git a/content/ember-data/v4/deprecate-snapshot-model-class-access.md b/content/ember-data/v4/deprecate-snapshot-model-class-access.md index 4d7b7b1b..28ae6707 100644 --- a/content/ember-data/v4/deprecate-snapshot-model-class-access.md +++ b/content/ember-data/v4/deprecate-snapshot-model-class-access.md @@ -1,5 +1,5 @@ --- -id: ember-data:deprecate-snapshot-model-class-access +displayId: ember-data:deprecate-snapshot-model-class-access title: Deprecate Snapshot Model Class Access until: '5.0' since: '4.5' diff --git a/content/ember-data/v4/deprecate-store-find.md b/content/ember-data/v4/deprecate-store-find.md index 1114c814..a08a753d 100644 --- a/content/ember-data/v4/deprecate-store-find.md +++ b/content/ember-data/v4/deprecate-store-find.md @@ -1,5 +1,5 @@ --- -id: ember-data:deprecate-promise-many-array-behaviors +displayId: ember-data:deprecate-promise-many-array-behaviors title: Deprecate Promise Many Array Behaviors until: '5.0' since: '4.5' diff --git a/content/ember-data/v4/deprecate-string-arg-schemas.md b/content/ember-data/v4/deprecate-string-arg-schemas.md index 4f0b527c..12d2fa6d 100644 --- a/content/ember-data/v4/deprecate-string-arg-schemas.md +++ b/content/ember-data/v4/deprecate-string-arg-schemas.md @@ -1,5 +1,5 @@ --- -id: ember-data:deprecate-string-arg-schemas +displayId: ember-data:deprecate-string-arg-schemas title: Deprecate String Arg Schemas until: '5.0' since: '4.5' diff --git a/content/ember-data/v4/deprecate-v1-cache.md b/content/ember-data/v4/deprecate-v1-cache.md index 5377eaab..0847d62e 100644 --- a/content/ember-data/v4/deprecate-v1-cache.md +++ b/content/ember-data/v4/deprecate-v1-cache.md @@ -1,5 +1,5 @@ --- -id: ember-data:deprecate-v1-cache +displayId: ember-data:deprecate-v1-cache title: Deprecate V1 Cache until: '5.0' since: '4.7' diff --git a/content/ember-data/v4/deprecate-v1cache-store-apis.md b/content/ember-data/v4/deprecate-v1cache-store-apis.md index b0679d85..0fe420bb 100644 --- a/content/ember-data/v4/deprecate-v1cache-store-apis.md +++ b/content/ember-data/v4/deprecate-v1cache-store-apis.md @@ -1,5 +1,5 @@ --- -id: ember-data:deprecate-v1cache-store-apis +displayId: ember-data:deprecate-v1cache-store-apis title: Deprecate V1 cache Store Apis until: '5.0' since: '4.7' diff --git a/content/ember-data/v4/model-save-promise.md b/content/ember-data/v4/model-save-promise.md index 09566666..ef2959cf 100644 --- a/content/ember-data/v4/model-save-promise.md +++ b/content/ember-data/v4/model-save-promise.md @@ -1,5 +1,5 @@ --- -id: ember-data:model-save-promise +displayId: ember-data:model-save-promise title: Model Save Promise until: '5.0' since: '4.4' diff --git a/content/ember-data/v4/no-a-with-array-like.md b/content/ember-data/v4/no-a-with-array-like.md index f73ed288..4861aba5 100644 --- a/content/ember-data/v4/no-a-with-array-like.md +++ b/content/ember-data/v4/no-a-with-array-like.md @@ -1,5 +1,5 @@ --- -id: ember-data:no-a-with-array-like +displayId: ember-data:no-a-with-array-like title: No A With Array Like until: '5.0' since: '4.7' diff --git a/content/ember-data/v4/non-explicit-relationships.md b/content/ember-data/v4/non-explicit-relationships.md index fca98807..d8a6d341 100644 --- a/content/ember-data/v4/non-explicit-relationships.md +++ b/content/ember-data/v4/non-explicit-relationships.md @@ -1,5 +1,5 @@ --- -id: ember-data:non-explicit-relationships +displayId: ember-data:non-explicit-relationships title: Non Explicit Relationships until: '5.0' since: '4.7' diff --git a/content/ember-data/v4/rsvp-unresolved-async.md b/content/ember-data/v4/rsvp-unresolved-async.md index cdc2b2f3..d00d98c6 100644 --- a/content/ember-data/v4/rsvp-unresolved-async.md +++ b/content/ember-data/v4/rsvp-unresolved-async.md @@ -1,5 +1,5 @@ --- -id: ember-data:rsvp-unresolved-async +displayId: ember-data:rsvp-unresolved-async title: Rsvp Unresolved Async until: '5.0' since: '4.5' From 63cd04d145749f165d6bafeb7db1caf1d354eed4 Mon Sep 17 00:00:00 2001 From: Jared Galanis Date: Sat, 17 Jun 2023 08:16:25 -0400 Subject: [PATCH 24/26] make until and since numbers not in quotes --- content/ember-data/v4/deprecate-array-like.md | 4 ++-- content/ember-data/v4/deprecate-early-static.md | 4 ++-- .../ember-data/v4/deprecate-errors-array-to-hash-helper.md | 4 ++-- .../ember-data/v4/deprecate-errors-hash-to-array-helper.md | 4 ++-- content/ember-data/v4/deprecate-has-record-for-id.md | 4 ++-- content/ember-data/v4/deprecate-instantiate-record-args.md | 4 ++-- content/ember-data/v4/deprecate-model-reopen.md | 4 ++-- content/ember-data/v4/deprecate-model-reopenclass.md | 4 ++-- content/ember-data/v4/deprecate-non-strict-relationships.md | 4 ++-- content/ember-data/v4/deprecate-normalize-modelname-helper.md | 4 ++-- .../ember-data/v4/deprecate-promise-many-array-behaviors.md | 4 ++-- content/ember-data/v4/deprecate-promise-proxies.md | 4 ++-- content/ember-data/v4/deprecate-secret-adapter-fallback.md | 4 ++-- .../ember-data/v4/deprecate-snapshot-model-class-access.md | 4 ++-- content/ember-data/v4/deprecate-store-find.md | 4 ++-- content/ember-data/v4/deprecate-string-arg-schemas.md | 4 ++-- content/ember-data/v4/deprecate-v1-cache.md | 4 ++-- content/ember-data/v4/deprecate-v1cache-store-apis.md | 4 ++-- content/ember-data/v4/model-save-promise.md | 4 ++-- content/ember-data/v4/no-a-with-array-like.md | 4 ++-- content/ember-data/v4/non-explicit-relationships.md | 4 ++-- content/ember-data/v4/rsvp-unresolved-async.md | 4 ++-- 22 files changed, 44 insertions(+), 44 deletions(-) diff --git a/content/ember-data/v4/deprecate-array-like.md b/content/ember-data/v4/deprecate-array-like.md index 2a2f5e2c..641a1225 100644 --- a/content/ember-data/v4/deprecate-array-like.md +++ b/content/ember-data/v4/deprecate-array-like.md @@ -1,8 +1,8 @@ --- displayId: ember-data:deprecate-array-like title: Deprecate Array Like -until: '5.0' -since: '4.7' +until: 5.0 +since: 4.7 --- Deprecates Ember "Array-like" methods on `RecordArray` and `ManyArray`. diff --git a/content/ember-data/v4/deprecate-early-static.md b/content/ember-data/v4/deprecate-early-static.md index e74743fe..dc732150 100644 --- a/content/ember-data/v4/deprecate-early-static.md +++ b/content/ember-data/v4/deprecate-early-static.md @@ -1,8 +1,8 @@ --- displayId: ember-data:deprecate-early-static title: Deprecate Early Static -until: '5.0' -since: '4.7' +until: 5.0 +since: 4.7 --- This deprecation triggers if static computed properties or methods are triggered without looking up the record via the store service's `modelFor` hook. Accessing this static information without looking up the model via the store most commonly occurs when: diff --git a/content/ember-data/v4/deprecate-errors-array-to-hash-helper.md b/content/ember-data/v4/deprecate-errors-array-to-hash-helper.md index 8349ba51..be351f0b 100644 --- a/content/ember-data/v4/deprecate-errors-array-to-hash-helper.md +++ b/content/ember-data/v4/deprecate-errors-array-to-hash-helper.md @@ -1,8 +1,8 @@ --- displayId: ember-data:deprecate-errors-hash-to-array-helper title: Deprecate Errors Hash To Array Helper -until: '5.0' -since: '4.7' +until: 5.0 +since: 4.7 --- Deprecates `errorsHashToArray` `errorsArrayToHash` and `normalizeModelName`. diff --git a/content/ember-data/v4/deprecate-errors-hash-to-array-helper.md b/content/ember-data/v4/deprecate-errors-hash-to-array-helper.md index 8349ba51..be351f0b 100644 --- a/content/ember-data/v4/deprecate-errors-hash-to-array-helper.md +++ b/content/ember-data/v4/deprecate-errors-hash-to-array-helper.md @@ -1,8 +1,8 @@ --- displayId: ember-data:deprecate-errors-hash-to-array-helper title: Deprecate Errors Hash To Array Helper -until: '5.0' -since: '4.7' +until: 5.0 +since: 4.7 --- Deprecates `errorsHashToArray` `errorsArrayToHash` and `normalizeModelName`. diff --git a/content/ember-data/v4/deprecate-has-record-for-id.md b/content/ember-data/v4/deprecate-has-record-for-id.md index b83547b4..69fdde7b 100644 --- a/content/ember-data/v4/deprecate-has-record-for-id.md +++ b/content/ember-data/v4/deprecate-has-record-for-id.md @@ -1,8 +1,8 @@ --- displayId: ember-data:deprecate-has-record-for-id title: Deprecate Has Record For Id -until: '5.0' -since: '4.5' +until: 5.0 +since: 4.5 --- Deprecates `store.hasRecordForId(type, id)` in favor of `store.peekRecord({ type, id }) !== null`. diff --git a/content/ember-data/v4/deprecate-instantiate-record-args.md b/content/ember-data/v4/deprecate-instantiate-record-args.md index b122f4b8..9fa203a6 100644 --- a/content/ember-data/v4/deprecate-instantiate-record-args.md +++ b/content/ember-data/v4/deprecate-instantiate-record-args.md @@ -1,8 +1,8 @@ --- displayId: ember-data:deprecate-instantiate-record-args title: Deprecate Instantiate Record Args -until: '5.0' -since: '4.12' +until: 5.0 +since: 4.12 --- Deprecates using the former 3rd and 4th arguments to `Store.instantiateRecord` which are now available as properties on the store. diff --git a/content/ember-data/v4/deprecate-model-reopen.md b/content/ember-data/v4/deprecate-model-reopen.md index 17c8df79..cffd8f3e 100644 --- a/content/ember-data/v4/deprecate-model-reopen.md +++ b/content/ember-data/v4/deprecate-model-reopen.md @@ -1,8 +1,8 @@ --- displayId: ember-data:deprecate-model-reopen title: Deprecate Model Reopen -until: '5.0' -since: '4.7' +until: 5.0 +since: 4.7 --- For properties known ahead of time, instead of: diff --git a/content/ember-data/v4/deprecate-model-reopenclass.md b/content/ember-data/v4/deprecate-model-reopenclass.md index 408bf35a..a58d8390 100644 --- a/content/ember-data/v4/deprecate-model-reopenclass.md +++ b/content/ember-data/v4/deprecate-model-reopenclass.md @@ -1,8 +1,8 @@ --- displayId: ember-data:deprecate-model-reopenclass title: Deprecate Model Reopenclass -until: '5.0' -since: '4.7' +until: 5.0 +since: 4.7 --- Instead of reopenClass, define `static` properties with native class syntax or add them to the final object. diff --git a/content/ember-data/v4/deprecate-non-strict-relationships.md b/content/ember-data/v4/deprecate-non-strict-relationships.md index ac9ce4c4..3146617b 100644 --- a/content/ember-data/v4/deprecate-non-strict-relationships.md +++ b/content/ember-data/v4/deprecate-non-strict-relationships.md @@ -1,8 +1,8 @@ --- displayId: ember-data:deprecate-non-strict-relationships title: Deprecate Non Strict Relationships -until: '5.0' -since: '4.7' +until: 5.0 +since: 4.7 --- Deprecates when belongsTo and hasMany relationships are defined without specifying whether the relationship is asynchronous. diff --git a/content/ember-data/v4/deprecate-normalize-modelname-helper.md b/content/ember-data/v4/deprecate-normalize-modelname-helper.md index ebb39451..962304ea 100644 --- a/content/ember-data/v4/deprecate-normalize-modelname-helper.md +++ b/content/ember-data/v4/deprecate-normalize-modelname-helper.md @@ -1,8 +1,8 @@ --- displayId: ember-data:deprecate-promise-many-array-behaviors title: Deprecate Promise Many Array Behaviors -until: '5.0' -since: '4.7' +until: 5.0 +since: 4.7 --- Deprecates `errorsHashToArray` `errorsArrayToHash` and `normalizeModelName`. diff --git a/content/ember-data/v4/deprecate-promise-many-array-behaviors.md b/content/ember-data/v4/deprecate-promise-many-array-behaviors.md index 9cfcfb52..74c025c3 100644 --- a/content/ember-data/v4/deprecate-promise-many-array-behaviors.md +++ b/content/ember-data/v4/deprecate-promise-many-array-behaviors.md @@ -1,8 +1,8 @@ --- displayId: ember-data:deprecate-promise-many-array-behaviors title: Deprecate Promise Many Array Behaviors -until: '5.0' -since: '4.7' +until: 5.0 +since: 4.7 --- [RFC Documentation](https://rfcs.emberjs.com/id/0745-ember-data-deprecate-methods-on-promise-many-array) diff --git a/content/ember-data/v4/deprecate-promise-proxies.md b/content/ember-data/v4/deprecate-promise-proxies.md index a225c47d..47a032fd 100644 --- a/content/ember-data/v4/deprecate-promise-proxies.md +++ b/content/ember-data/v4/deprecate-promise-proxies.md @@ -1,8 +1,8 @@ --- displayId: ember-data:deprecate-promise-proxies title: Deprecate Promise Proxies -until: '5.0' -since: '4.7' +until: 5.0 +since: 4.7 --- Additional Reading: [RFC#846 Deprecate Proxies](https://rfcs.emberjs.com/id/0846-ember-data-deprecate-proxies) diff --git a/content/ember-data/v4/deprecate-secret-adapter-fallback.md b/content/ember-data/v4/deprecate-secret-adapter-fallback.md index b898425b..54812ae8 100644 --- a/content/ember-data/v4/deprecate-secret-adapter-fallback.md +++ b/content/ember-data/v4/deprecate-secret-adapter-fallback.md @@ -1,8 +1,8 @@ --- displayId: ember-data:deprecate-secret-adapter-fallback title: Deprecate Secret Adapter Fallback -until: '5.0' -since: '4.5' +until: 5.0 +since: 4.5 --- Deprecates the secret `-json-api` fallback adapter in favor or an explicit "catch all" application adapter. In addition to this deprecation ensuring the user has explicitly chosen an adapter, this ensures that the user may choose to use no adapter at all. diff --git a/content/ember-data/v4/deprecate-snapshot-model-class-access.md b/content/ember-data/v4/deprecate-snapshot-model-class-access.md index 28ae6707..76b237bd 100644 --- a/content/ember-data/v4/deprecate-snapshot-model-class-access.md +++ b/content/ember-data/v4/deprecate-snapshot-model-class-access.md @@ -1,8 +1,8 @@ --- displayId: ember-data:deprecate-snapshot-model-class-access title: Deprecate Snapshot Model Class Access -until: '5.0' -since: '4.5' +until: 5.0 +since: 4.5 --- Deprecates accessing the factory class for a given resource type via properties on various classes. diff --git a/content/ember-data/v4/deprecate-store-find.md b/content/ember-data/v4/deprecate-store-find.md index a08a753d..58d46fa6 100644 --- a/content/ember-data/v4/deprecate-store-find.md +++ b/content/ember-data/v4/deprecate-store-find.md @@ -1,8 +1,8 @@ --- displayId: ember-data:deprecate-promise-many-array-behaviors title: Deprecate Promise Many Array Behaviors -until: '5.0' -since: '4.5' +until: 5.0 +since: 4.5 --- Deprecates `store.hasRecordForId(type, id)` in favor of `store.peekRecord({ type, id }) !== null`. diff --git a/content/ember-data/v4/deprecate-string-arg-schemas.md b/content/ember-data/v4/deprecate-string-arg-schemas.md index 12d2fa6d..3d0f39af 100644 --- a/content/ember-data/v4/deprecate-string-arg-schemas.md +++ b/content/ember-data/v4/deprecate-string-arg-schemas.md @@ -1,8 +1,8 @@ --- displayId: ember-data:deprecate-string-arg-schemas title: Deprecate String Arg Schemas -until: '5.0' -since: '4.5' +until: 5.0 +since: 4.5 --- Deprecates `schema.attributesDefinitionFor(type)` and `schema.relationshipsDefinitionFor(type)` in favor of a consistent object signature (`identifier | { type }`). diff --git a/content/ember-data/v4/deprecate-v1-cache.md b/content/ember-data/v4/deprecate-v1-cache.md index 0847d62e..ed777c06 100644 --- a/content/ember-data/v4/deprecate-v1-cache.md +++ b/content/ember-data/v4/deprecate-v1-cache.md @@ -1,8 +1,8 @@ --- displayId: ember-data:deprecate-v1-cache title: Deprecate V1 Cache -until: '5.0' -since: '4.7' +until: 5.0 +since: 4.7 --- Deprecates instantiating a non-singleton cache via `store.createRecordDataFor` in favor of a singleton-cache via `store.createCache`. diff --git a/content/ember-data/v4/deprecate-v1cache-store-apis.md b/content/ember-data/v4/deprecate-v1cache-store-apis.md index 0fe420bb..bdb74e03 100644 --- a/content/ember-data/v4/deprecate-v1cache-store-apis.md +++ b/content/ember-data/v4/deprecate-v1cache-store-apis.md @@ -1,8 +1,8 @@ --- displayId: ember-data:deprecate-v1cache-store-apis title: Deprecate V1 cache Store Apis -until: '5.0' -since: '4.7' +until: 5.0 +since: 4.7 --- Deprecates various methods on the store and store-cache-wrapper that were specific to the v1 cache. diff --git a/content/ember-data/v4/model-save-promise.md b/content/ember-data/v4/model-save-promise.md index ef2959cf..027d7f54 100644 --- a/content/ember-data/v4/model-save-promise.md +++ b/content/ember-data/v4/model-save-promise.md @@ -1,8 +1,8 @@ --- displayId: ember-data:model-save-promise title: Model Save Promise -until: '5.0' -since: '4.4' +until: 5.0 +since: 4.4 --- Affects: diff --git a/content/ember-data/v4/no-a-with-array-like.md b/content/ember-data/v4/no-a-with-array-like.md index 4861aba5..bdb9dd70 100644 --- a/content/ember-data/v4/no-a-with-array-like.md +++ b/content/ember-data/v4/no-a-with-array-like.md @@ -1,8 +1,8 @@ --- displayId: ember-data:no-a-with-array-like title: No A With Array Like -until: '5.0' -since: '4.7' +until: 5.0 +since: 4.7 --- Deprecates calling `A()` when an EmberData ArrayLike class is detected. This deprecation may not always trigger due to complexities in ember-source versions and the use (or disabling) of prototype extensions. diff --git a/content/ember-data/v4/non-explicit-relationships.md b/content/ember-data/v4/non-explicit-relationships.md index d8a6d341..f83b08b2 100644 --- a/content/ember-data/v4/non-explicit-relationships.md +++ b/content/ember-data/v4/non-explicit-relationships.md @@ -1,8 +1,8 @@ --- displayId: ember-data:non-explicit-relationships title: Non Explicit Relationships -until: '5.0' -since: '4.7' +until: 5.0 +since: 4.7 --- Deprecates when polymorphic relationships are detected via inheritance or mixins and no polymorphic relationship configuration has been setup. diff --git a/content/ember-data/v4/rsvp-unresolved-async.md b/content/ember-data/v4/rsvp-unresolved-async.md index d00d98c6..aeac9dc8 100644 --- a/content/ember-data/v4/rsvp-unresolved-async.md +++ b/content/ember-data/v4/rsvp-unresolved-async.md @@ -1,8 +1,8 @@ --- displayId: ember-data:rsvp-unresolved-async title: Rsvp Unresolved Async -until: '5.0' -since: '4.5' +until: 5.0 +since: 4.5 --- Deprecates when a request promise did not resolve prior to the store tearing down. From 79c6639fcf43f984df1e03b635dc3ba5fc85fd78 Mon Sep 17 00:00:00 2001 From: Jared Galanis Date: Sat, 17 Jun 2023 08:24:22 -0400 Subject: [PATCH 25/26] add data 4.x to prember pages --- ember-cli-build.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ember-cli-build.js b/ember-cli-build.js index 88ee8b15..ff0e36c8 100644 --- a/ember-cli-build.js +++ b/ember-cli-build.js @@ -4,7 +4,7 @@ const path = require('path'); const EmberApp = require('ember-cli/lib/broccoli/ember-app'); -/* +/* Map over filenames in order to help generate the prembered URLs for the individual deprecation article pages. Their URL is something like `/id/project.bower-dependencies` @@ -30,6 +30,7 @@ module.exports = function (defaults) { '/ember/v1.x', '/ember-data/v2.x', '/ember-data/v3.x', + '/ember-data/v4.x', '/ember-cli/v2.x', '/ember-cli/v4.x', ...getDeprecationFilenames(), From defcb868ad266497ee1e4eed18439ed506ff35b7 Mon Sep 17 00:00:00 2001 From: Jared Galanis Date: Sat, 17 Jun 2023 09:08:48 -0400 Subject: [PATCH 26/26] fix TOC links - ember data content files must have ember-data in the name --- ...ate-array-like.md => ember-data-deprecate-array-like.md} | 6 +++--- ...early-static.md => ember-data-deprecate-early-static.md} | 4 ++-- ... => ember-data-deprecate-errors-array-to-hash-helper.md} | 4 ++-- ... => ember-data-deprecate-errors-hash-to-array-helper.md} | 4 ++-- ...-for-id.md => ember-data-deprecate-has-record-for-id.md} | 4 ++-- ...s.md => ember-data-deprecate-instantiate-record-args.md} | 4 ++-- ...model-reopen.md => ember-data-deprecate-model-reopen.md} | 4 ++-- ...enclass.md => ember-data-deprecate-model-reopenclass.md} | 4 ++-- ....md => ember-data-deprecate-non-strict-relationships.md} | 4 ++-- ...d => ember-data-deprecate-normalize-modelname-helper.md} | 4 ++-- ...=> ember-data-deprecate-promise-many-array-behaviors.md} | 4 ++-- ...e-proxies.md => ember-data-deprecate-promise-proxies.md} | 4 ++-- ...k.md => ember-data-deprecate-secret-adapter-fallback.md} | 4 ++-- ... => ember-data-deprecate-snapshot-model-class-access.md} | 4 ++-- ...ate-store-find.md => ember-data-deprecate-store-find.md} | 4 ++-- ...chemas.md => ember-data-deprecate-string-arg-schemas.md} | 4 ++-- ...precate-v1-cache.md => ember-data-deprecate-v1-cache.md} | 4 ++-- ...e-apis.md => ember-data-deprecate-v1cache-store-apis.md} | 4 ++-- ...del-save-promise.md => ember-data-model-save-promise.md} | 4 ++-- ...ith-array-like.md => ember-data-no-a-with-array-like.md} | 4 ++-- ...ionships.md => ember-data-non-explicit-relationships.md} | 4 ++-- ...esolved-async.md => ember-data-rsvp-unresolved-async.md} | 4 ++-- 22 files changed, 45 insertions(+), 45 deletions(-) rename content/ember-data/v4/{deprecate-array-like.md => ember-data-deprecate-array-like.md} (95%) rename content/ember-data/v4/{deprecate-early-static.md => ember-data-deprecate-early-static.md} (97%) rename content/ember-data/v4/{deprecate-errors-array-to-hash-helper.md => ember-data-deprecate-errors-array-to-hash-helper.md} (95%) rename content/ember-data/v4/{deprecate-errors-hash-to-array-helper.md => ember-data-deprecate-errors-hash-to-array-helper.md} (95%) rename content/ember-data/v4/{deprecate-has-record-for-id.md => ember-data-deprecate-has-record-for-id.md} (95%) rename content/ember-data/v4/{deprecate-instantiate-record-args.md => ember-data-deprecate-instantiate-record-args.md} (94%) rename content/ember-data/v4/{deprecate-model-reopen.md => ember-data-deprecate-model-reopen.md} (96%) rename content/ember-data/v4/{deprecate-model-reopenclass.md => ember-data-deprecate-model-reopenclass.md} (93%) rename content/ember-data/v4/{deprecate-non-strict-relationships.md => ember-data-deprecate-non-strict-relationships.md} (98%) rename content/ember-data/v4/{deprecate-normalize-modelname-helper.md => ember-data-deprecate-normalize-modelname-helper.md} (95%) rename content/ember-data/v4/{deprecate-promise-many-array-behaviors.md => ember-data-deprecate-promise-many-array-behaviors.md} (98%) rename content/ember-data/v4/{deprecate-promise-proxies.md => ember-data-deprecate-promise-proxies.md} (96%) rename content/ember-data/v4/{deprecate-secret-adapter-fallback.md => ember-data-deprecate-secret-adapter-fallback.md} (94%) rename content/ember-data/v4/{deprecate-snapshot-model-class-access.md => ember-data-deprecate-snapshot-model-class-access.md} (92%) rename content/ember-data/v4/{deprecate-store-find.md => ember-data-deprecate-store-find.md} (95%) rename content/ember-data/v4/{deprecate-string-arg-schemas.md => ember-data-deprecate-string-arg-schemas.md} (94%) rename content/ember-data/v4/{deprecate-v1-cache.md => ember-data-deprecate-v1-cache.md} (94%) rename content/ember-data/v4/{deprecate-v1cache-store-apis.md => ember-data-deprecate-v1cache-store-apis.md} (95%) rename content/ember-data/v4/{model-save-promise.md => ember-data-model-save-promise.md} (95%) rename content/ember-data/v4/{no-a-with-array-like.md => ember-data-no-a-with-array-like.md} (96%) rename content/ember-data/v4/{non-explicit-relationships.md => ember-data-non-explicit-relationships.md} (97%) rename content/ember-data/v4/{rsvp-unresolved-async.md => ember-data-rsvp-unresolved-async.md} (94%) diff --git a/content/ember-data/v4/deprecate-array-like.md b/content/ember-data/v4/ember-data-deprecate-array-like.md similarity index 95% rename from content/ember-data/v4/deprecate-array-like.md rename to content/ember-data/v4/ember-data-deprecate-array-like.md index 641a1225..edc9760f 100644 --- a/content/ember-data/v4/deprecate-array-like.md +++ b/content/ember-data/v4/ember-data-deprecate-array-like.md @@ -1,8 +1,8 @@ --- -displayId: ember-data:deprecate-array-like title: Deprecate Array Like -until: 5.0 -since: 4.7 +until: '5.0' +since: '4.7' +displayId: ember-data:deprecate-array-like --- Deprecates Ember "Array-like" methods on `RecordArray` and `ManyArray`. diff --git a/content/ember-data/v4/deprecate-early-static.md b/content/ember-data/v4/ember-data-deprecate-early-static.md similarity index 97% rename from content/ember-data/v4/deprecate-early-static.md rename to content/ember-data/v4/ember-data-deprecate-early-static.md index dc732150..e74743fe 100644 --- a/content/ember-data/v4/deprecate-early-static.md +++ b/content/ember-data/v4/ember-data-deprecate-early-static.md @@ -1,8 +1,8 @@ --- displayId: ember-data:deprecate-early-static title: Deprecate Early Static -until: 5.0 -since: 4.7 +until: '5.0' +since: '4.7' --- This deprecation triggers if static computed properties or methods are triggered without looking up the record via the store service's `modelFor` hook. Accessing this static information without looking up the model via the store most commonly occurs when: diff --git a/content/ember-data/v4/deprecate-errors-array-to-hash-helper.md b/content/ember-data/v4/ember-data-deprecate-errors-array-to-hash-helper.md similarity index 95% rename from content/ember-data/v4/deprecate-errors-array-to-hash-helper.md rename to content/ember-data/v4/ember-data-deprecate-errors-array-to-hash-helper.md index be351f0b..8349ba51 100644 --- a/content/ember-data/v4/deprecate-errors-array-to-hash-helper.md +++ b/content/ember-data/v4/ember-data-deprecate-errors-array-to-hash-helper.md @@ -1,8 +1,8 @@ --- displayId: ember-data:deprecate-errors-hash-to-array-helper title: Deprecate Errors Hash To Array Helper -until: 5.0 -since: 4.7 +until: '5.0' +since: '4.7' --- Deprecates `errorsHashToArray` `errorsArrayToHash` and `normalizeModelName`. diff --git a/content/ember-data/v4/deprecate-errors-hash-to-array-helper.md b/content/ember-data/v4/ember-data-deprecate-errors-hash-to-array-helper.md similarity index 95% rename from content/ember-data/v4/deprecate-errors-hash-to-array-helper.md rename to content/ember-data/v4/ember-data-deprecate-errors-hash-to-array-helper.md index be351f0b..8349ba51 100644 --- a/content/ember-data/v4/deprecate-errors-hash-to-array-helper.md +++ b/content/ember-data/v4/ember-data-deprecate-errors-hash-to-array-helper.md @@ -1,8 +1,8 @@ --- displayId: ember-data:deprecate-errors-hash-to-array-helper title: Deprecate Errors Hash To Array Helper -until: 5.0 -since: 4.7 +until: '5.0' +since: '4.7' --- Deprecates `errorsHashToArray` `errorsArrayToHash` and `normalizeModelName`. diff --git a/content/ember-data/v4/deprecate-has-record-for-id.md b/content/ember-data/v4/ember-data-deprecate-has-record-for-id.md similarity index 95% rename from content/ember-data/v4/deprecate-has-record-for-id.md rename to content/ember-data/v4/ember-data-deprecate-has-record-for-id.md index 69fdde7b..b83547b4 100644 --- a/content/ember-data/v4/deprecate-has-record-for-id.md +++ b/content/ember-data/v4/ember-data-deprecate-has-record-for-id.md @@ -1,8 +1,8 @@ --- displayId: ember-data:deprecate-has-record-for-id title: Deprecate Has Record For Id -until: 5.0 -since: 4.5 +until: '5.0' +since: '4.5' --- Deprecates `store.hasRecordForId(type, id)` in favor of `store.peekRecord({ type, id }) !== null`. diff --git a/content/ember-data/v4/deprecate-instantiate-record-args.md b/content/ember-data/v4/ember-data-deprecate-instantiate-record-args.md similarity index 94% rename from content/ember-data/v4/deprecate-instantiate-record-args.md rename to content/ember-data/v4/ember-data-deprecate-instantiate-record-args.md index 9fa203a6..b122f4b8 100644 --- a/content/ember-data/v4/deprecate-instantiate-record-args.md +++ b/content/ember-data/v4/ember-data-deprecate-instantiate-record-args.md @@ -1,8 +1,8 @@ --- displayId: ember-data:deprecate-instantiate-record-args title: Deprecate Instantiate Record Args -until: 5.0 -since: 4.12 +until: '5.0' +since: '4.12' --- Deprecates using the former 3rd and 4th arguments to `Store.instantiateRecord` which are now available as properties on the store. diff --git a/content/ember-data/v4/deprecate-model-reopen.md b/content/ember-data/v4/ember-data-deprecate-model-reopen.md similarity index 96% rename from content/ember-data/v4/deprecate-model-reopen.md rename to content/ember-data/v4/ember-data-deprecate-model-reopen.md index cffd8f3e..17c8df79 100644 --- a/content/ember-data/v4/deprecate-model-reopen.md +++ b/content/ember-data/v4/ember-data-deprecate-model-reopen.md @@ -1,8 +1,8 @@ --- displayId: ember-data:deprecate-model-reopen title: Deprecate Model Reopen -until: 5.0 -since: 4.7 +until: '5.0' +since: '4.7' --- For properties known ahead of time, instead of: diff --git a/content/ember-data/v4/deprecate-model-reopenclass.md b/content/ember-data/v4/ember-data-deprecate-model-reopenclass.md similarity index 93% rename from content/ember-data/v4/deprecate-model-reopenclass.md rename to content/ember-data/v4/ember-data-deprecate-model-reopenclass.md index a58d8390..408bf35a 100644 --- a/content/ember-data/v4/deprecate-model-reopenclass.md +++ b/content/ember-data/v4/ember-data-deprecate-model-reopenclass.md @@ -1,8 +1,8 @@ --- displayId: ember-data:deprecate-model-reopenclass title: Deprecate Model Reopenclass -until: 5.0 -since: 4.7 +until: '5.0' +since: '4.7' --- Instead of reopenClass, define `static` properties with native class syntax or add them to the final object. diff --git a/content/ember-data/v4/deprecate-non-strict-relationships.md b/content/ember-data/v4/ember-data-deprecate-non-strict-relationships.md similarity index 98% rename from content/ember-data/v4/deprecate-non-strict-relationships.md rename to content/ember-data/v4/ember-data-deprecate-non-strict-relationships.md index 3146617b..ac9ce4c4 100644 --- a/content/ember-data/v4/deprecate-non-strict-relationships.md +++ b/content/ember-data/v4/ember-data-deprecate-non-strict-relationships.md @@ -1,8 +1,8 @@ --- displayId: ember-data:deprecate-non-strict-relationships title: Deprecate Non Strict Relationships -until: 5.0 -since: 4.7 +until: '5.0' +since: '4.7' --- Deprecates when belongsTo and hasMany relationships are defined without specifying whether the relationship is asynchronous. diff --git a/content/ember-data/v4/deprecate-normalize-modelname-helper.md b/content/ember-data/v4/ember-data-deprecate-normalize-modelname-helper.md similarity index 95% rename from content/ember-data/v4/deprecate-normalize-modelname-helper.md rename to content/ember-data/v4/ember-data-deprecate-normalize-modelname-helper.md index 962304ea..ebb39451 100644 --- a/content/ember-data/v4/deprecate-normalize-modelname-helper.md +++ b/content/ember-data/v4/ember-data-deprecate-normalize-modelname-helper.md @@ -1,8 +1,8 @@ --- displayId: ember-data:deprecate-promise-many-array-behaviors title: Deprecate Promise Many Array Behaviors -until: 5.0 -since: 4.7 +until: '5.0' +since: '4.7' --- Deprecates `errorsHashToArray` `errorsArrayToHash` and `normalizeModelName`. diff --git a/content/ember-data/v4/deprecate-promise-many-array-behaviors.md b/content/ember-data/v4/ember-data-deprecate-promise-many-array-behaviors.md similarity index 98% rename from content/ember-data/v4/deprecate-promise-many-array-behaviors.md rename to content/ember-data/v4/ember-data-deprecate-promise-many-array-behaviors.md index 74c025c3..9cfcfb52 100644 --- a/content/ember-data/v4/deprecate-promise-many-array-behaviors.md +++ b/content/ember-data/v4/ember-data-deprecate-promise-many-array-behaviors.md @@ -1,8 +1,8 @@ --- displayId: ember-data:deprecate-promise-many-array-behaviors title: Deprecate Promise Many Array Behaviors -until: 5.0 -since: 4.7 +until: '5.0' +since: '4.7' --- [RFC Documentation](https://rfcs.emberjs.com/id/0745-ember-data-deprecate-methods-on-promise-many-array) diff --git a/content/ember-data/v4/deprecate-promise-proxies.md b/content/ember-data/v4/ember-data-deprecate-promise-proxies.md similarity index 96% rename from content/ember-data/v4/deprecate-promise-proxies.md rename to content/ember-data/v4/ember-data-deprecate-promise-proxies.md index 47a032fd..a225c47d 100644 --- a/content/ember-data/v4/deprecate-promise-proxies.md +++ b/content/ember-data/v4/ember-data-deprecate-promise-proxies.md @@ -1,8 +1,8 @@ --- displayId: ember-data:deprecate-promise-proxies title: Deprecate Promise Proxies -until: 5.0 -since: 4.7 +until: '5.0' +since: '4.7' --- Additional Reading: [RFC#846 Deprecate Proxies](https://rfcs.emberjs.com/id/0846-ember-data-deprecate-proxies) diff --git a/content/ember-data/v4/deprecate-secret-adapter-fallback.md b/content/ember-data/v4/ember-data-deprecate-secret-adapter-fallback.md similarity index 94% rename from content/ember-data/v4/deprecate-secret-adapter-fallback.md rename to content/ember-data/v4/ember-data-deprecate-secret-adapter-fallback.md index 54812ae8..b898425b 100644 --- a/content/ember-data/v4/deprecate-secret-adapter-fallback.md +++ b/content/ember-data/v4/ember-data-deprecate-secret-adapter-fallback.md @@ -1,8 +1,8 @@ --- displayId: ember-data:deprecate-secret-adapter-fallback title: Deprecate Secret Adapter Fallback -until: 5.0 -since: 4.5 +until: '5.0' +since: '4.5' --- Deprecates the secret `-json-api` fallback adapter in favor or an explicit "catch all" application adapter. In addition to this deprecation ensuring the user has explicitly chosen an adapter, this ensures that the user may choose to use no adapter at all. diff --git a/content/ember-data/v4/deprecate-snapshot-model-class-access.md b/content/ember-data/v4/ember-data-deprecate-snapshot-model-class-access.md similarity index 92% rename from content/ember-data/v4/deprecate-snapshot-model-class-access.md rename to content/ember-data/v4/ember-data-deprecate-snapshot-model-class-access.md index 76b237bd..28ae6707 100644 --- a/content/ember-data/v4/deprecate-snapshot-model-class-access.md +++ b/content/ember-data/v4/ember-data-deprecate-snapshot-model-class-access.md @@ -1,8 +1,8 @@ --- displayId: ember-data:deprecate-snapshot-model-class-access title: Deprecate Snapshot Model Class Access -until: 5.0 -since: 4.5 +until: '5.0' +since: '4.5' --- Deprecates accessing the factory class for a given resource type via properties on various classes. diff --git a/content/ember-data/v4/deprecate-store-find.md b/content/ember-data/v4/ember-data-deprecate-store-find.md similarity index 95% rename from content/ember-data/v4/deprecate-store-find.md rename to content/ember-data/v4/ember-data-deprecate-store-find.md index 58d46fa6..a08a753d 100644 --- a/content/ember-data/v4/deprecate-store-find.md +++ b/content/ember-data/v4/ember-data-deprecate-store-find.md @@ -1,8 +1,8 @@ --- displayId: ember-data:deprecate-promise-many-array-behaviors title: Deprecate Promise Many Array Behaviors -until: 5.0 -since: 4.5 +until: '5.0' +since: '4.5' --- Deprecates `store.hasRecordForId(type, id)` in favor of `store.peekRecord({ type, id }) !== null`. diff --git a/content/ember-data/v4/deprecate-string-arg-schemas.md b/content/ember-data/v4/ember-data-deprecate-string-arg-schemas.md similarity index 94% rename from content/ember-data/v4/deprecate-string-arg-schemas.md rename to content/ember-data/v4/ember-data-deprecate-string-arg-schemas.md index 3d0f39af..12d2fa6d 100644 --- a/content/ember-data/v4/deprecate-string-arg-schemas.md +++ b/content/ember-data/v4/ember-data-deprecate-string-arg-schemas.md @@ -1,8 +1,8 @@ --- displayId: ember-data:deprecate-string-arg-schemas title: Deprecate String Arg Schemas -until: 5.0 -since: 4.5 +until: '5.0' +since: '4.5' --- Deprecates `schema.attributesDefinitionFor(type)` and `schema.relationshipsDefinitionFor(type)` in favor of a consistent object signature (`identifier | { type }`). diff --git a/content/ember-data/v4/deprecate-v1-cache.md b/content/ember-data/v4/ember-data-deprecate-v1-cache.md similarity index 94% rename from content/ember-data/v4/deprecate-v1-cache.md rename to content/ember-data/v4/ember-data-deprecate-v1-cache.md index ed777c06..0847d62e 100644 --- a/content/ember-data/v4/deprecate-v1-cache.md +++ b/content/ember-data/v4/ember-data-deprecate-v1-cache.md @@ -1,8 +1,8 @@ --- displayId: ember-data:deprecate-v1-cache title: Deprecate V1 Cache -until: 5.0 -since: 4.7 +until: '5.0' +since: '4.7' --- Deprecates instantiating a non-singleton cache via `store.createRecordDataFor` in favor of a singleton-cache via `store.createCache`. diff --git a/content/ember-data/v4/deprecate-v1cache-store-apis.md b/content/ember-data/v4/ember-data-deprecate-v1cache-store-apis.md similarity index 95% rename from content/ember-data/v4/deprecate-v1cache-store-apis.md rename to content/ember-data/v4/ember-data-deprecate-v1cache-store-apis.md index bdb74e03..0fe420bb 100644 --- a/content/ember-data/v4/deprecate-v1cache-store-apis.md +++ b/content/ember-data/v4/ember-data-deprecate-v1cache-store-apis.md @@ -1,8 +1,8 @@ --- displayId: ember-data:deprecate-v1cache-store-apis title: Deprecate V1 cache Store Apis -until: 5.0 -since: 4.7 +until: '5.0' +since: '4.7' --- Deprecates various methods on the store and store-cache-wrapper that were specific to the v1 cache. diff --git a/content/ember-data/v4/model-save-promise.md b/content/ember-data/v4/ember-data-model-save-promise.md similarity index 95% rename from content/ember-data/v4/model-save-promise.md rename to content/ember-data/v4/ember-data-model-save-promise.md index 027d7f54..ef2959cf 100644 --- a/content/ember-data/v4/model-save-promise.md +++ b/content/ember-data/v4/ember-data-model-save-promise.md @@ -1,8 +1,8 @@ --- displayId: ember-data:model-save-promise title: Model Save Promise -until: 5.0 -since: 4.4 +until: '5.0' +since: '4.4' --- Affects: diff --git a/content/ember-data/v4/no-a-with-array-like.md b/content/ember-data/v4/ember-data-no-a-with-array-like.md similarity index 96% rename from content/ember-data/v4/no-a-with-array-like.md rename to content/ember-data/v4/ember-data-no-a-with-array-like.md index bdb9dd70..4861aba5 100644 --- a/content/ember-data/v4/no-a-with-array-like.md +++ b/content/ember-data/v4/ember-data-no-a-with-array-like.md @@ -1,8 +1,8 @@ --- displayId: ember-data:no-a-with-array-like title: No A With Array Like -until: 5.0 -since: 4.7 +until: '5.0' +since: '4.7' --- Deprecates calling `A()` when an EmberData ArrayLike class is detected. This deprecation may not always trigger due to complexities in ember-source versions and the use (or disabling) of prototype extensions. diff --git a/content/ember-data/v4/non-explicit-relationships.md b/content/ember-data/v4/ember-data-non-explicit-relationships.md similarity index 97% rename from content/ember-data/v4/non-explicit-relationships.md rename to content/ember-data/v4/ember-data-non-explicit-relationships.md index f83b08b2..d8a6d341 100644 --- a/content/ember-data/v4/non-explicit-relationships.md +++ b/content/ember-data/v4/ember-data-non-explicit-relationships.md @@ -1,8 +1,8 @@ --- displayId: ember-data:non-explicit-relationships title: Non Explicit Relationships -until: 5.0 -since: 4.7 +until: '5.0' +since: '4.7' --- Deprecates when polymorphic relationships are detected via inheritance or mixins and no polymorphic relationship configuration has been setup. diff --git a/content/ember-data/v4/rsvp-unresolved-async.md b/content/ember-data/v4/ember-data-rsvp-unresolved-async.md similarity index 94% rename from content/ember-data/v4/rsvp-unresolved-async.md rename to content/ember-data/v4/ember-data-rsvp-unresolved-async.md index aeac9dc8..d00d98c6 100644 --- a/content/ember-data/v4/rsvp-unresolved-async.md +++ b/content/ember-data/v4/ember-data-rsvp-unresolved-async.md @@ -1,8 +1,8 @@ --- displayId: ember-data:rsvp-unresolved-async title: Rsvp Unresolved Async -until: 5.0 -since: 4.5 +until: '5.0' +since: '4.5' --- Deprecates when a request promise did not resolve prior to the store tearing down.