@parcel/graph 2.0.2-nightly.2558 → 2.0.2-nightly.2569

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.
@@ -25,6 +25,16 @@ function _nullthrows() {
25
25
  return data;
26
26
  }
27
27
 
28
+ function _utils() {
29
+ const data = require("@parcel/utils");
30
+
31
+ _utils = function () {
32
+ return data;
33
+ };
34
+
35
+ return data;
36
+ }
37
+
28
38
  var _types = require("./types");
29
39
 
30
40
  var _Graph = require("./Graph");
@@ -541,7 +551,7 @@ class SharedTypeMap {
541
551
  } = Uint32Array;
542
552
  let CAPACITY = SharedTypeMap.#CAPACITY; // $FlowFixMe[incompatible-call]
543
553
 
544
- this.data = new Uint32Array(new SharedArrayBuffer(this.getLength(capacityOrData) * BYTES_PER_ELEMENT));
554
+ this.data = new Uint32Array(new (_utils().SharedBuffer)(this.getLength(capacityOrData) * BYTES_PER_ELEMENT));
545
555
  this.data[CAPACITY] = capacityOrData;
546
556
  } else {
547
557
  this.data = capacityOrData;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parcel/graph",
3
- "version": "2.0.2-nightly.2558+ebd1d6af",
3
+ "version": "2.0.2-nightly.2569+68ceb558",
4
4
  "description": "Blazing fast, zero configuration web application bundler",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -22,5 +22,5 @@
22
22
  "dependencies": {
23
23
  "nullthrows": "^1.1.1"
24
24
  },
25
- "gitHead": "ebd1d6afc96d613b3cf65e73cf4e7272ddb1449d"
25
+ "gitHead": "68ceb5581497cb336e82002fafcec53fb6cfc084"
26
26
  }
@@ -1,6 +1,7 @@
1
1
  // @flow
2
2
  import assert from 'assert';
3
3
  import nullthrows from 'nullthrows';
4
+ import {SharedBuffer} from '@parcel/utils';
4
5
  import {fromNodeId, toNodeId} from './types';
5
6
  import {ALL_EDGE_TYPES, type NullEdgeType, type AllEdgeTypes} from './Graph';
6
7
  import type {NodeId} from './types';
@@ -610,9 +611,7 @@ export class SharedTypeMap<TItemType, THash, TAddress: number>
610
611
  let CAPACITY = SharedTypeMap.#CAPACITY;
611
612
  // $FlowFixMe[incompatible-call]
612
613
  this.data = new Uint32Array(
613
- new SharedArrayBuffer(
614
- this.getLength(capacityOrData) * BYTES_PER_ELEMENT,
615
- ),
614
+ new SharedBuffer(this.getLength(capacityOrData) * BYTES_PER_ELEMENT),
616
615
  );
617
616
  this.data[CAPACITY] = capacityOrData;
618
617
  } else {