@ember-data/store 5.4.0-alpha.112 → 5.4.0-alpha.115
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/-private.js +1 -1
- package/dist/{handler-Dj0xi5y4.js → handler-DwYqXLCv.js} +11 -10
- package/dist/handler-DwYqXLCv.js.map +1 -0
- package/dist/index.js +1 -1
- package/package.json +17 -17
- package/unstable-preview-types/-private/legacy-model-support/record-reference.d.ts.map +1 -1
- package/unstable-preview-types/-private/store-service.d.ts +6 -6
- package/dist/handler-Dj0xi5y4.js.map +0 -1
package/dist/-private.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { A as ARRAY_SIGNAL, C as CacheHandler, j as CollectionRecordArray, I as LiveArray, M as MUTATE, R as RecordArrayManager, k as SOURCE, S as Store, q as StoreMap, _ as _clearCaches, u as _deprecatingNormalize, g as coerceId, f as constructResource, h as ensureStringId, l as fastPush, i as isStableIdentifier, n as notifyArray, p as peekCache, r as recordIdentifierFor, m as removeRecordDataFor, t as setCacheFor, o as setRecordIdentifier, s as storeFor } from "./handler-
|
|
1
|
+
export { A as ARRAY_SIGNAL, C as CacheHandler, j as CollectionRecordArray, I as LiveArray, M as MUTATE, R as RecordArrayManager, k as SOURCE, S as Store, q as StoreMap, _ as _clearCaches, u as _deprecatingNormalize, g as coerceId, f as constructResource, h as ensureStringId, l as fastPush, i as isStableIdentifier, n as notifyArray, p as peekCache, r as recordIdentifierFor, m as removeRecordDataFor, t as setCacheFor, o as setRecordIdentifier, s as storeFor } from "./handler-DwYqXLCv.js";
|
|
@@ -842,6 +842,7 @@ class RecordReference {
|
|
|
842
842
|
@return {String} The id of the record.
|
|
843
843
|
*/
|
|
844
844
|
id() {
|
|
845
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
|
|
845
846
|
this._ref; // consume the tracked prop
|
|
846
847
|
return this.___identifier.id;
|
|
847
848
|
}
|
|
@@ -4424,7 +4425,7 @@ class Store extends BaseClass {
|
|
|
4424
4425
|
```app/routes/post.js
|
|
4425
4426
|
export default class PostRoute extends Route {
|
|
4426
4427
|
model(params) {
|
|
4427
|
-
return this.store.findRecord('post', params.post_id, { include: 'comments' });
|
|
4428
|
+
return this.store.findRecord('post', params.post_id, { include: ['comments'] });
|
|
4428
4429
|
}
|
|
4429
4430
|
}
|
|
4430
4431
|
```
|
|
@@ -4446,13 +4447,13 @@ class Store extends BaseClass {
|
|
|
4446
4447
|
In this case, the post's comments would then be available in your template as
|
|
4447
4448
|
`model.comments`.
|
|
4448
4449
|
Multiple relationships can be requested using an `include` parameter consisting of a
|
|
4449
|
-
|
|
4450
|
+
list of relationship names, while nested relationships can be specified
|
|
4450
4451
|
using a dot-separated sequence of relationship names. So to request both the post's
|
|
4451
4452
|
comments and the authors of those comments the request would look like this:
|
|
4452
4453
|
```app/routes/post.js
|
|
4453
4454
|
export default class PostRoute extends Route {
|
|
4454
4455
|
model(params) {
|
|
4455
|
-
return this.store.findRecord('post', params.post_id, { include: 'comments,comments.author' });
|
|
4456
|
+
return this.store.findRecord('post', params.post_id, { include: ['comments','comments.author'] });
|
|
4456
4457
|
}
|
|
4457
4458
|
}
|
|
4458
4459
|
```
|
|
@@ -4973,18 +4974,18 @@ class Store extends BaseClass {
|
|
|
4973
4974
|
```app/routes/posts.js
|
|
4974
4975
|
export default class PostsRoute extends Route {
|
|
4975
4976
|
model() {
|
|
4976
|
-
return this.store.findAll('post', { include: 'comments' });
|
|
4977
|
+
return this.store.findAll('post', { include: ['comments'] });
|
|
4977
4978
|
}
|
|
4978
4979
|
}
|
|
4979
4980
|
```
|
|
4980
4981
|
Multiple relationships can be requested using an `include` parameter consisting of a
|
|
4981
|
-
|
|
4982
|
+
list or relationship names, while nested relationships can be specified
|
|
4982
4983
|
using a dot-separated sequence of relationship names. So to request both the posts'
|
|
4983
4984
|
comments and the authors of those comments the request would look like this:
|
|
4984
4985
|
```app/routes/posts.js
|
|
4985
4986
|
export default class PostsRoute extends Route {
|
|
4986
4987
|
model() {
|
|
4987
|
-
return this.store.findAll('post', { include: 'comments,comments.author' });
|
|
4988
|
+
return this.store.findAll('post', { include: ['comments','comments.author'] });
|
|
4988
4989
|
}
|
|
4989
4990
|
}
|
|
4990
4991
|
```
|
|
@@ -5260,7 +5261,7 @@ class Store extends BaseClass {
|
|
|
5260
5261
|
const data = JSON.parse(JSON.stringify(jsonApiDoc));
|
|
5261
5262
|
// eslint-disable-next-line no-console
|
|
5262
5263
|
console.log('EmberData | Payload - push', data);
|
|
5263
|
-
} catch
|
|
5264
|
+
} catch {
|
|
5264
5265
|
// eslint-disable-next-line no-console
|
|
5265
5266
|
console.log('EmberData | Payload - push', jsonApiDoc);
|
|
5266
5267
|
}
|
|
@@ -5395,7 +5396,7 @@ if (macroCondition(getGlobalConfig().WarpDrive.deprecations.ENABLE_LEGACY_SCHEMA
|
|
|
5395
5396
|
})(this._schema) : {};
|
|
5396
5397
|
deprecate(`Use \`store.schema\` instead of \`store.getSchemaDefinitionService()\``, false, {
|
|
5397
5398
|
id: 'ember-data:schema-service-updates',
|
|
5398
|
-
until: '
|
|
5399
|
+
until: '6.0',
|
|
5399
5400
|
for: 'ember-data',
|
|
5400
5401
|
since: {
|
|
5401
5402
|
available: '5.4',
|
|
@@ -5407,7 +5408,7 @@ if (macroCondition(getGlobalConfig().WarpDrive.deprecations.ENABLE_LEGACY_SCHEMA
|
|
|
5407
5408
|
Store.prototype.registerSchemaDefinitionService = function (schema) {
|
|
5408
5409
|
deprecate(`Use \`store.createSchemaService\` instead of \`store.registerSchemaDefinitionService()\``, false, {
|
|
5409
5410
|
id: 'ember-data:schema-service-updates',
|
|
5410
|
-
until: '
|
|
5411
|
+
until: '6.0',
|
|
5411
5412
|
for: 'ember-data',
|
|
5412
5413
|
since: {
|
|
5413
5414
|
available: '5.4',
|
|
@@ -5419,7 +5420,7 @@ if (macroCondition(getGlobalConfig().WarpDrive.deprecations.ENABLE_LEGACY_SCHEMA
|
|
|
5419
5420
|
Store.prototype.registerSchema = function (schema) {
|
|
5420
5421
|
deprecate(`Use \`store.createSchemaService\` instead of \`store.registerSchema()\``, false, {
|
|
5421
5422
|
id: 'ember-data:schema-service-updates',
|
|
5422
|
-
until: '
|
|
5423
|
+
until: '6.0',
|
|
5423
5424
|
for: 'ember-data',
|
|
5424
5425
|
since: {
|
|
5425
5426
|
available: '5.4',
|