@ember-data/store 4.0.0-beta.0 → 4.0.0-beta.4

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.
@@ -2,7 +2,6 @@
2
2
  @module @ember-data/store
3
3
  */
4
4
  import { assert, warn } from '@ember/debug';
5
- import { assign } from '@ember/polyfills';
6
5
  import { DEBUG } from '@glimmer/env';
7
6
 
8
7
  import coerceId from '../system/coerce-id';
@@ -372,7 +371,7 @@ export class IdentifierCache {
372
371
  // If the incoming type does not match the identifier type, we need to create an identifier for the incoming
373
372
  // data so we can merge the incoming data with the existing identifier, see #7325 and #7363
374
373
  if ('type' in data && data.type && identifier.type !== normalizeModelName(data.type)) {
375
- let incomingDataResource = assign({}, data);
374
+ let incomingDataResource = { ...data };
376
375
  // Need to strip the lid from the incomingData in order force a new identifier creation
377
376
  delete incomingDataResource.lid;
378
377
  existingIdentifier = this.getOrCreateRecordIdentifier(incomingDataResource);
@@ -5,7 +5,6 @@ import { getOwner } from '@ember/application';
5
5
  import { A } from '@ember/array';
6
6
  import { assert, deprecate, inspect, warn } from '@ember/debug';
7
7
  import { computed, defineProperty, get, set } from '@ember/object';
8
- import { assign } from '@ember/polyfills';
9
8
  import { _backburner as emberBackburner } from '@ember/runloop';
10
9
  import type { Backburner } from '@ember/runloop/-private/backburner';
11
10
  import Service from '@ember/service';
@@ -646,7 +645,7 @@ abstract class CoreStore extends Service {
646
645
  return emberBackburner.join(() => {
647
646
  return this._backburner.join(() => {
648
647
  let normalizedModelName = normalizeModelName(modelName);
649
- let properties = assign({}, inputProperties);
648
+ let properties = { ...inputProperties };
650
649
 
651
650
  // If the passed properties do not include a primary key,
652
651
  // give the adapter an opportunity to generate one. Typically,
@@ -2,7 +2,6 @@ import { getOwner, setOwner } from '@ember/application';
2
2
  import { assert, deprecate } from '@ember/debug';
3
3
  import EmberError from '@ember/error';
4
4
  import { get } from '@ember/object';
5
- import { assign } from '@ember/polyfills';
6
5
  import { isPresent } from '@ember/utils';
7
6
  import { DEBUG } from '@glimmer/env';
8
7
 
@@ -40,7 +39,7 @@ class Store extends CoreStore {
40
39
  _internalModel: internalModel,
41
40
  container: null,
42
41
  };
43
- assign(createOptions, createRecordArgs);
42
+ Object.assign(createOptions, createRecordArgs);
44
43
 
45
44
  // ensure that `getOwner(this)` works inside a model instance
46
45
  setOwner(createOptions, getOwner(this));
@@ -3,7 +3,6 @@ import { A, default as EmberArray } from '@ember/array';
3
3
  import { assert, inspect } from '@ember/debug';
4
4
  import EmberError from '@ember/error';
5
5
  import { get, set } from '@ember/object';
6
- import { assign } from '@ember/polyfills';
7
6
  import { _backburner as emberBackburner, cancel, run } from '@ember/runloop';
8
7
  import { DEBUG } from '@glimmer/env';
9
8
 
@@ -354,7 +353,7 @@ export default class InternalModel {
354
353
  }
355
354
 
356
355
  let additionalCreateOptions = this._recordData._initRecordCreateOptions(properties);
357
- assign(createOptions, additionalCreateOptions);
356
+ Object.assign(createOptions, additionalCreateOptions);
358
357
 
359
358
  // ensure that `getOwner(this)` works inside a model instance
360
359
  setOwner(createOptions, getOwner(store));
@@ -5,7 +5,6 @@
5
5
  import { A } from '@ember/array';
6
6
  import { assert } from '@ember/debug';
7
7
  import { get, set } from '@ember/object';
8
- import { assign } from '@ember/polyfills';
9
8
  import { _backburner as emberBackburner } from '@ember/runloop';
10
9
 
11
10
  import { REMOVE_RECORD_ARRAY_MANAGER_LEGACY_COMPAT } from '@ember-data/canary-features';
@@ -281,8 +280,8 @@ class RecordArrayManager {
281
280
  manager: this,
282
281
  isLoaded: true,
283
282
  isUpdating: false,
284
- meta: assign({}, payload.meta),
285
- links: assign({}, payload.links),
283
+ meta: { ...payload.meta },
284
+ links: { ...payload.links },
286
285
  });
287
286
 
288
287
  this._associateWithRecordArray(identifiers, array);
@@ -1,6 +1,5 @@
1
1
  import { A } from '@ember/array';
2
2
  import { get } from '@ember/object';
3
- import { assign } from '@ember/polyfills';
4
3
  import { once } from '@ember/runloop';
5
4
  import { DEBUG } from '@glimmer/env';
6
5
 
@@ -86,8 +85,8 @@ let AdapterPopulatedRecordArray = RecordArray.extend({
86
85
  this.setProperties({
87
86
  isLoaded: true,
88
87
  isUpdating: false,
89
- meta: assign({}, payload.meta),
90
- links: assign({}, payload.links),
88
+ meta: { ...payload.meta },
89
+ links: { ...payload.links },
91
90
  });
92
91
 
93
92
  this.manager._associateWithRecordArray(identifiersOrInternalModels, this);
@@ -3,7 +3,6 @@
3
3
  */
4
4
  import { assert } from '@ember/debug';
5
5
  import { get } from '@ember/object';
6
- import { assign } from '@ember/polyfills';
7
6
 
8
7
  import { CUSTOM_MODEL_CLASS } from '@ember-data/canary-features';
9
8
  import { HAS_RECORD_DATA_PACKAGE } from '@ember-data/private-build-infra';
@@ -234,7 +233,7 @@ export default class Snapshot implements Snapshot {
234
233
  @public
235
234
  */
236
235
  attributes(): Dict<unknown> {
237
- return assign({}, this._attributes);
236
+ return { ...this._attributes };
238
237
  }
239
238
 
240
239
  /**
@@ -1,5 +1,4 @@
1
1
  import { assert, deprecate, warn } from '@ember/debug';
2
- import { assign } from '@ember/polyfills';
3
2
  import { DEBUG } from '@glimmer/env';
4
3
 
5
4
  import { Promise } from 'rsvp';
@@ -294,7 +293,7 @@ function fixRelationshipData(relationshipData, relationshipKind, { id, modelName
294
293
  }
295
294
  } else {
296
295
  payload = relationshipData || {};
297
- assign(payload, parentRelationshipData);
296
+ Object.assign(payload, parentRelationshipData);
298
297
  }
299
298
 
300
299
  return payload;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ember-data/store",
3
- "version": "4.0.0-beta.0",
3
+ "version": "4.0.0-beta.4",
4
4
  "description": "The default blueprint for ember-cli addons.",
5
5
  "keywords": [
6
6
  "ember-addon"
@@ -17,16 +17,16 @@
17
17
  "start": "ember serve"
18
18
  },
19
19
  "dependencies": {
20
- "@ember-data/canary-features": "4.0.0-beta.0",
21
- "@ember-data/private-build-infra": "4.0.0-beta.0",
22
- "@ember/string": "^1.0.0",
20
+ "@ember-data/canary-features": "4.0.0-beta.4",
21
+ "@ember-data/private-build-infra": "4.0.0-beta.4",
22
+ "@ember/string": "^3.0.0",
23
23
  "@glimmer/tracking": "^1.0.4",
24
24
  "ember-cli-babel": "^7.26.6",
25
25
  "ember-cli-path-utils": "^1.0.0",
26
26
  "ember-cli-typescript": "^4.1.0"
27
27
  },
28
28
  "devDependencies": {
29
- "@ember-data/unpublished-test-infra": "4.0.0-beta.0",
29
+ "@ember-data/unpublished-test-infra": "4.0.0-beta.4",
30
30
  "@ember/optional-features": "^2.0.0",
31
31
  "@ember/test-helpers": "^2.2.5",
32
32
  "@types/ember": "^3.16.5",