Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: mutating ManyArray should handle duplicates gracefully (with deprecation) #9198

Merged
merged 11 commits into from
Jan 3, 2024
2 changes: 1 addition & 1 deletion @types/ember-data-qunit-asserts/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ declare global {
}

interface Assert {
expectDeprecation(options: { id: string; count: number; until?: string }): void;
expectDeprecation(options: DeprecationConfig, label?: string): void;
expectDeprecation(callback: () => unknown, options: DeprecationConfig | string | RegExp): Promise<void>;
expectNoDeprecation(callback: () => unknown): Promise<void>;
expectWarning(callback: () => unknown, options: WarningConfig | string | RegExp): Promise<void>;
Expand Down
2 changes: 1 addition & 1 deletion ember-data-types/cache/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export interface Cache {
* An implementation might want to do this because
* de-referencing records which read from their own
* blob is generally safer because the record does
* not require retainining connections to the Store
* not require retaining connections to the Store
* and Cache to present data on a per-field basis.
*
* This generally takes the place of `getAttr` as
Expand Down
2 changes: 1 addition & 1 deletion packages/graph/src/-private/-diff.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export function diffCollection(

if (DEBUG) {
deprecate(
`Expected all entries in the relationship ${relationship.definition.type}:${relationship.definition.key} to be unique, see log for a list of duplicate entry indeces`,
`Expected all entries in the relationship ${relationship.definition.type}:${relationship.definition.key} to be unique, see log for a list of duplicate entry indices`,
false,
{
id: 'ember-data:deprecate-non-unique-relationship-entries',
Expand Down
2 changes: 1 addition & 1 deletion packages/json-api/src/-private/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ export default class JSONAPICache implements Cache {
* An implementation might want to do this because
* de-referencing records which read from their own
* blob is generally safer because the record does
* not require retainining connections to the Store
* not require retaining connections to the Store
* and Cache to present data on a per-field basis.
*
* This generally takes the place of `getAttr` as
Expand Down
Loading