houdini-svelte 1.2.46 → 1.2.48

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.
@@ -76796,9 +76796,12 @@ var InMemorySubscriptions = class {
76796
76796
  removeSubscribers(id2, fieldName, specs) {
76797
76797
  let targets = [];
76798
76798
  const subscriber = this.subscribers.get(id2);
76799
- const subscriberField = subscriber?.get(fieldName);
76799
+ if (!subscriber) {
76800
+ return;
76801
+ }
76802
+ const subscriberField = subscriber.get(fieldName);
76800
76803
  for (const spec of specs) {
76801
- const counts = subscriber?.get(fieldName)?.referenceCounts;
76804
+ const counts = subscriber.get(fieldName)?.referenceCounts;
76802
76805
  if (!counts?.has(spec.set)) {
76803
76806
  continue;
76804
76807
  }
@@ -76808,12 +76811,18 @@ var InMemorySubscriptions = class {
76808
76811
  targets.push(spec.set);
76809
76812
  counts.delete(spec.set);
76810
76813
  }
76814
+ if (counts.size === 0) {
76815
+ subscriber.delete(fieldName);
76816
+ }
76811
76817
  }
76812
76818
  if (subscriberField) {
76813
76819
  subscriberField.selections = this.get(id2, fieldName).filter(
76814
76820
  ([{ set }]) => !targets.includes(set)
76815
76821
  );
76816
76822
  }
76823
+ if (subscriber.size === 0) {
76824
+ this.subscribers.delete(id2);
76825
+ }
76817
76826
  }
76818
76827
  removeAllSubscribers(id2, targets, visited = []) {
76819
76828
  visited.push(id2);
@@ -76834,6 +76843,15 @@ var InMemorySubscriptions = class {
76834
76843
  }
76835
76844
  }
76836
76845
  }
76846
+ get size() {
76847
+ let size = 0;
76848
+ for (const [, nodeCounts] of this.subscribers) {
76849
+ for (const [, { referenceCounts }] of nodeCounts) {
76850
+ size += [...referenceCounts.values()].reduce((size2, count) => size2 + count, 0);
76851
+ }
76852
+ }
76853
+ return size;
76854
+ }
76837
76855
  };
76838
76856
  var Cache = class {
76839
76857
  _internal_unstable;
@@ -76880,6 +76898,9 @@ var Cache = class {
76880
76898
  };
76881
76899
  }
76882
76900
  subscribe(spec, variables = {}) {
76901
+ if (this._internal_unstable.disabled) {
76902
+ return;
76903
+ }
76883
76904
  return this._internal_unstable.subscriptions.add({
76884
76905
  parent: spec.parentID || rootID,
76885
76906
  spec,
@@ -77019,7 +77040,7 @@ var Cache = class {
77019
77040
  }
77020
77041
  };
77021
77042
  var CacheInternal = class {
77022
- _disabled = false;
77043
+ disabled = false;
77023
77044
  _config;
77024
77045
  storage;
77025
77046
  subscriptions;
@@ -77050,10 +77071,10 @@ var CacheInternal = class {
77050
77071
  this._config = config2;
77051
77072
  this.componentCache = componentCache ?? {};
77052
77073
  this.createComponent = createComponent ?? (() => ({}));
77053
- this._disabled = disabled;
77074
+ this.disabled = disabled;
77054
77075
  try {
77055
77076
  if (process.env.HOUDINI_TEST === "true") {
77056
- this._disabled = false;
77077
+ this.disabled = false;
77057
77078
  }
77058
77079
  } catch {
77059
77080
  }
@@ -77075,7 +77096,7 @@ var CacheInternal = class {
77075
77096
  forceNotify,
77076
77097
  forceStale
77077
77098
  }) {
77078
- if (this._disabled) {
77099
+ if (this.disabled) {
77079
77100
  return [];
77080
77101
  }
77081
77102
  let targetSelection = getFieldsForType(
@@ -133610,9 +133631,12 @@ var InMemorySubscriptions2 = class {
133610
133631
  removeSubscribers(id2, fieldName, specs) {
133611
133632
  let targets = [];
133612
133633
  const subscriber = this.subscribers.get(id2);
133613
- const subscriberField = subscriber?.get(fieldName);
133634
+ if (!subscriber) {
133635
+ return;
133636
+ }
133637
+ const subscriberField = subscriber.get(fieldName);
133614
133638
  for (const spec of specs) {
133615
- const counts = subscriber?.get(fieldName)?.referenceCounts;
133639
+ const counts = subscriber.get(fieldName)?.referenceCounts;
133616
133640
  if (!counts?.has(spec.set)) {
133617
133641
  continue;
133618
133642
  }
@@ -133622,12 +133646,18 @@ var InMemorySubscriptions2 = class {
133622
133646
  targets.push(spec.set);
133623
133647
  counts.delete(spec.set);
133624
133648
  }
133649
+ if (counts.size === 0) {
133650
+ subscriber.delete(fieldName);
133651
+ }
133625
133652
  }
133626
133653
  if (subscriberField) {
133627
133654
  subscriberField.selections = this.get(id2, fieldName).filter(
133628
133655
  ([{ set }]) => !targets.includes(set)
133629
133656
  );
133630
133657
  }
133658
+ if (subscriber.size === 0) {
133659
+ this.subscribers.delete(id2);
133660
+ }
133631
133661
  }
133632
133662
  removeAllSubscribers(id2, targets, visited = []) {
133633
133663
  visited.push(id2);
@@ -133648,6 +133678,15 @@ var InMemorySubscriptions2 = class {
133648
133678
  }
133649
133679
  }
133650
133680
  }
133681
+ get size() {
133682
+ let size = 0;
133683
+ for (const [, nodeCounts] of this.subscribers) {
133684
+ for (const [, { referenceCounts }] of nodeCounts) {
133685
+ size += [...referenceCounts.values()].reduce((size2, count) => size2 + count, 0);
133686
+ }
133687
+ }
133688
+ return size;
133689
+ }
133651
133690
  };
133652
133691
  var Cache2 = class {
133653
133692
  _internal_unstable;
@@ -133694,6 +133733,9 @@ var Cache2 = class {
133694
133733
  };
133695
133734
  }
133696
133735
  subscribe(spec, variables = {}) {
133736
+ if (this._internal_unstable.disabled) {
133737
+ return;
133738
+ }
133697
133739
  return this._internal_unstable.subscriptions.add({
133698
133740
  parent: spec.parentID || rootID2,
133699
133741
  spec,
@@ -133833,7 +133875,7 @@ var Cache2 = class {
133833
133875
  }
133834
133876
  };
133835
133877
  var CacheInternal2 = class {
133836
- _disabled = false;
133878
+ disabled = false;
133837
133879
  _config;
133838
133880
  storage;
133839
133881
  subscriptions;
@@ -133864,10 +133906,10 @@ var CacheInternal2 = class {
133864
133906
  this._config = config2;
133865
133907
  this.componentCache = componentCache ?? {};
133866
133908
  this.createComponent = createComponent ?? (() => ({}));
133867
- this._disabled = disabled;
133909
+ this.disabled = disabled;
133868
133910
  try {
133869
133911
  if (process.env.HOUDINI_TEST === "true") {
133870
- this._disabled = false;
133912
+ this.disabled = false;
133871
133913
  }
133872
133914
  } catch {
133873
133915
  }
@@ -133889,7 +133931,7 @@ var CacheInternal2 = class {
133889
133931
  forceNotify,
133890
133932
  forceStale
133891
133933
  }) {
133892
- if (this._disabled) {
133934
+ if (this.disabled) {
133893
133935
  return [];
133894
133936
  }
133895
133937
  let targetSelection = getFieldsForType2(
@@ -197855,9 +197897,12 @@ var InMemorySubscriptions3 = class {
197855
197897
  removeSubscribers(id2, fieldName, specs) {
197856
197898
  let targets = [];
197857
197899
  const subscriber = this.subscribers.get(id2);
197858
- const subscriberField = subscriber?.get(fieldName);
197900
+ if (!subscriber) {
197901
+ return;
197902
+ }
197903
+ const subscriberField = subscriber.get(fieldName);
197859
197904
  for (const spec of specs) {
197860
- const counts = subscriber?.get(fieldName)?.referenceCounts;
197905
+ const counts = subscriber.get(fieldName)?.referenceCounts;
197861
197906
  if (!counts?.has(spec.set)) {
197862
197907
  continue;
197863
197908
  }
@@ -197867,12 +197912,18 @@ var InMemorySubscriptions3 = class {
197867
197912
  targets.push(spec.set);
197868
197913
  counts.delete(spec.set);
197869
197914
  }
197915
+ if (counts.size === 0) {
197916
+ subscriber.delete(fieldName);
197917
+ }
197870
197918
  }
197871
197919
  if (subscriberField) {
197872
197920
  subscriberField.selections = this.get(id2, fieldName).filter(
197873
197921
  ([{ set }]) => !targets.includes(set)
197874
197922
  );
197875
197923
  }
197924
+ if (subscriber.size === 0) {
197925
+ this.subscribers.delete(id2);
197926
+ }
197876
197927
  }
197877
197928
  removeAllSubscribers(id2, targets, visited = []) {
197878
197929
  visited.push(id2);
@@ -197893,6 +197944,15 @@ var InMemorySubscriptions3 = class {
197893
197944
  }
197894
197945
  }
197895
197946
  }
197947
+ get size() {
197948
+ let size = 0;
197949
+ for (const [, nodeCounts] of this.subscribers) {
197950
+ for (const [, { referenceCounts }] of nodeCounts) {
197951
+ size += [...referenceCounts.values()].reduce((size2, count) => size2 + count, 0);
197952
+ }
197953
+ }
197954
+ return size;
197955
+ }
197896
197956
  };
197897
197957
  var Cache3 = class {
197898
197958
  _internal_unstable;
@@ -197939,6 +197999,9 @@ var Cache3 = class {
197939
197999
  };
197940
198000
  }
197941
198001
  subscribe(spec, variables = {}) {
198002
+ if (this._internal_unstable.disabled) {
198003
+ return;
198004
+ }
197942
198005
  return this._internal_unstable.subscriptions.add({
197943
198006
  parent: spec.parentID || rootID3,
197944
198007
  spec,
@@ -198078,7 +198141,7 @@ var Cache3 = class {
198078
198141
  }
198079
198142
  };
198080
198143
  var CacheInternal3 = class {
198081
- _disabled = false;
198144
+ disabled = false;
198082
198145
  _config;
198083
198146
  storage;
198084
198147
  subscriptions;
@@ -198109,10 +198172,10 @@ var CacheInternal3 = class {
198109
198172
  this._config = config2;
198110
198173
  this.componentCache = componentCache ?? {};
198111
198174
  this.createComponent = createComponent ?? (() => ({}));
198112
- this._disabled = disabled;
198175
+ this.disabled = disabled;
198113
198176
  try {
198114
198177
  if (process.env.HOUDINI_TEST === "true") {
198115
- this._disabled = false;
198178
+ this.disabled = false;
198116
198179
  }
198117
198180
  } catch {
198118
198181
  }
@@ -198134,7 +198197,7 @@ var CacheInternal3 = class {
198134
198197
  forceNotify,
198135
198198
  forceStale
198136
198199
  }) {
198137
- if (this._disabled) {
198200
+ if (this.disabled) {
198138
198201
  return [];
198139
198202
  }
198140
198203
  let targetSelection = getFieldsForType3(
@@ -263542,9 +263605,12 @@ var InMemorySubscriptions4 = class {
263542
263605
  removeSubscribers(id2, fieldName, specs) {
263543
263606
  let targets = [];
263544
263607
  const subscriber = this.subscribers.get(id2);
263545
- const subscriberField = subscriber?.get(fieldName);
263608
+ if (!subscriber) {
263609
+ return;
263610
+ }
263611
+ const subscriberField = subscriber.get(fieldName);
263546
263612
  for (const spec of specs) {
263547
- const counts = subscriber?.get(fieldName)?.referenceCounts;
263613
+ const counts = subscriber.get(fieldName)?.referenceCounts;
263548
263614
  if (!counts?.has(spec.set)) {
263549
263615
  continue;
263550
263616
  }
@@ -263554,12 +263620,18 @@ var InMemorySubscriptions4 = class {
263554
263620
  targets.push(spec.set);
263555
263621
  counts.delete(spec.set);
263556
263622
  }
263623
+ if (counts.size === 0) {
263624
+ subscriber.delete(fieldName);
263625
+ }
263557
263626
  }
263558
263627
  if (subscriberField) {
263559
263628
  subscriberField.selections = this.get(id2, fieldName).filter(
263560
263629
  ([{ set }]) => !targets.includes(set)
263561
263630
  );
263562
263631
  }
263632
+ if (subscriber.size === 0) {
263633
+ this.subscribers.delete(id2);
263634
+ }
263563
263635
  }
263564
263636
  removeAllSubscribers(id2, targets, visited = []) {
263565
263637
  visited.push(id2);
@@ -263580,6 +263652,15 @@ var InMemorySubscriptions4 = class {
263580
263652
  }
263581
263653
  }
263582
263654
  }
263655
+ get size() {
263656
+ let size = 0;
263657
+ for (const [, nodeCounts] of this.subscribers) {
263658
+ for (const [, { referenceCounts }] of nodeCounts) {
263659
+ size += [...referenceCounts.values()].reduce((size2, count) => size2 + count, 0);
263660
+ }
263661
+ }
263662
+ return size;
263663
+ }
263583
263664
  };
263584
263665
  var Cache4 = class {
263585
263666
  _internal_unstable;
@@ -263626,6 +263707,9 @@ var Cache4 = class {
263626
263707
  };
263627
263708
  }
263628
263709
  subscribe(spec, variables = {}) {
263710
+ if (this._internal_unstable.disabled) {
263711
+ return;
263712
+ }
263629
263713
  return this._internal_unstable.subscriptions.add({
263630
263714
  parent: spec.parentID || rootID4,
263631
263715
  spec,
@@ -263765,7 +263849,7 @@ var Cache4 = class {
263765
263849
  }
263766
263850
  };
263767
263851
  var CacheInternal4 = class {
263768
- _disabled = false;
263852
+ disabled = false;
263769
263853
  _config;
263770
263854
  storage;
263771
263855
  subscriptions;
@@ -263796,10 +263880,10 @@ var CacheInternal4 = class {
263796
263880
  this._config = config2;
263797
263881
  this.componentCache = componentCache ?? {};
263798
263882
  this.createComponent = createComponent ?? (() => ({}));
263799
- this._disabled = disabled;
263883
+ this.disabled = disabled;
263800
263884
  try {
263801
263885
  if (process.env.HOUDINI_TEST === "true") {
263802
- this._disabled = false;
263886
+ this.disabled = false;
263803
263887
  }
263804
263888
  } catch {
263805
263889
  }
@@ -263821,7 +263905,7 @@ var CacheInternal4 = class {
263821
263905
  forceNotify,
263822
263906
  forceStale
263823
263907
  }) {
263824
- if (this._disabled) {
263908
+ if (this.disabled) {
263825
263909
  return [];
263826
263910
  }
263827
263911
  let targetSelection = getFieldsForType4(
@@ -294282,9 +294366,10 @@ filesystem.readFileSync = function(fp, options) {
294282
294366
  }
294283
294367
  return _readFileSync(filepath, options);
294284
294368
  };
294285
- filesystem.statSync = function(filepath, options) {
294369
+ filesystem.statSync = function(fp, options) {
294370
+ let filepath = fp.toString();
294286
294371
  if (!filepath.includes("routes") || !path_exports.basename(filepath).startsWith("+")) {
294287
- return _statSync(filepath, options);
294372
+ return _statSync(fp, options);
294288
294373
  }
294289
294374
  try {
294290
294375
  const result = _statSync(filepath, options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "houdini-svelte",
3
- "version": "1.2.46",
3
+ "version": "1.2.48",
4
4
  "description": "The svelte plugin for houdini",
5
5
  "keywords": [
6
6
  "typescript",
@@ -33,7 +33,7 @@
33
33
  "rollup": "^3.7.4",
34
34
  "svelte": "^3.57.0",
35
35
  "vite": "^4.1.1",
36
- "houdini": "^1.2.46"
36
+ "houdini": "^1.2.48"
37
37
  },
38
38
  "files": [
39
39
  "build"