@ember-data/store 4.1.0-alpha.9 → 4.2.0-alpha.2

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';
@@ -23,7 +22,6 @@ import type {
23
22
  import { DEBUG_CLIENT_ORIGINATED, DEBUG_IDENTIFIER_BUCKET } from '../ts-interfaces/identifier';
24
23
  import type { ConfidentDict } from '../ts-interfaces/utils';
25
24
  import isNonEmptyString from '../utils/is-non-empty-string';
26
- import { addSymbol } from '../utils/symbol';
27
25
  import isStableIdentifier, { markStableIdentifier, unmarkStableIdentifier } from './is-stable-identifier';
28
26
  import uuidv4 from './utils/uuid-v4';
29
27
 
@@ -372,7 +370,7 @@ export class IdentifierCache {
372
370
  // If the incoming type does not match the identifier type, we need to create an identifier for the incoming
373
371
  // data so we can merge the incoming data with the existing identifier, see #7325 and #7363
374
372
  if ('type' in data && data.type && identifier.type !== normalizeModelName(data.type)) {
375
- let incomingDataResource = assign({}, data);
373
+ let incomingDataResource = { ...data };
376
374
  // Need to strip the lid from the incomingData in order force a new identifier creation
377
375
  delete incomingDataResource.lid;
378
376
  existingIdentifier = this.getOrCreateRecordIdentifier(incomingDataResource);
@@ -511,8 +509,8 @@ function makeStableRecordIdentifier(
511
509
  return `${clientOriginated ? '[CLIENT_ORIGINATED] ' : ''}${type}:${id} (${lid})`;
512
510
  },
513
511
  };
514
- addSymbol(wrapper, DEBUG_CLIENT_ORIGINATED, clientOriginated);
515
- addSymbol(wrapper, DEBUG_IDENTIFIER_BUCKET, bucket);
512
+ wrapper[DEBUG_CLIENT_ORIGINATED] = clientOriginated;
513
+ wrapper[DEBUG_IDENTIFIER_BUCKET] = bucket;
516
514
  wrapper = freeze(wrapper);
517
515
  markStableIdentifier(wrapper);
518
516
  DEBUG_MAP.set(wrapper, recordIdentifier);
@@ -2,13 +2,6 @@
2
2
  @module @ember-data/store
3
3
  */
4
4
 
5
- // support IE11
6
- declare global {
7
- interface Window {
8
- msCrypto: Crypto;
9
- }
10
- }
11
-
12
5
  const CRYPTO = (() => {
13
6
  const hasWindow = typeof window !== 'undefined';
14
7
  const isFastBoot = typeof FastBoot !== 'undefined';
@@ -27,12 +20,6 @@ const CRYPTO = (() => {
27
20
  };
28
21
  } else if (hasWindow && typeof window.crypto !== 'undefined') {
29
22
  return window.crypto;
30
- } else if (
31
- hasWindow &&
32
- typeof window.msCrypto !== 'undefined' &&
33
- typeof window.msCrypto.getRandomValues === 'function'
34
- ) {
35
- return window.msCrypto;
36
23
  } else {
37
24
  throw new Error('ember-data: Cannot find a valid way to generate local identifiers');
38
25
  }
@@ -25,7 +25,6 @@ export { default as RootState } from './system/model/states';
25
25
  export { default as InternalModel } from './system/model/internal-model';
26
26
 
27
27
  export { PromiseArray, PromiseObject } from './system/promise-proxies';
28
- export { addSymbol, symbol } from './utils/symbol';
29
28
 
30
29
  export { RecordArray, AdapterPopulatedRecordArray } from './system/record-arrays';
31
30