@tanstack/router-core 1.134.18 → 1.135.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.
@@ -339,7 +339,6 @@ class RouterCore {
339
339
  // This preserves the original parameter syntax including optional parameters
340
340
  path: nextTo,
341
341
  params: nextParams,
342
- leaveWildcards: false,
343
342
  leaveParams: opts.leaveParams,
344
343
  decodeCharMap: this.pathParamsDecodeCharMap,
345
344
  parseCache: this.parsePathnameCache
@@ -767,13 +766,17 @@ class RouterCore {
767
766
  }
768
767
  };
769
768
  this.updateMatch = (id, updater) => {
770
- const matchesKey = this.state.pendingMatches?.some((d) => d.id === id) ? "pendingMatches" : this.state.matches.some((d) => d.id === id) ? "matches" : this.state.cachedMatches.some((d) => d.id === id) ? "cachedMatches" : "";
771
- if (matchesKey) {
772
- this.__store.setState((s) => ({
773
- ...s,
774
- [matchesKey]: s[matchesKey]?.map((d) => d.id === id ? updater(d) : d)
775
- }));
776
- }
769
+ this.startTransition(() => {
770
+ const matchesKey = this.state.pendingMatches?.some((d) => d.id === id) ? "pendingMatches" : this.state.matches.some((d) => d.id === id) ? "matches" : this.state.cachedMatches.some((d) => d.id === id) ? "cachedMatches" : "";
771
+ if (matchesKey) {
772
+ this.__store.setState((s) => ({
773
+ ...s,
774
+ [matchesKey]: s[matchesKey]?.map(
775
+ (d) => d.id === id ? updater(d) : d
776
+ )
777
+ }));
778
+ }
779
+ });
777
780
  };
778
781
  this.getMatch = (matchId) => {
779
782
  const findFn = (d) => d.id === matchId;
@@ -1051,13 +1054,12 @@ class RouterCore {
1051
1054
  params: routeParams,
1052
1055
  decodeCharMap: this.pathParamsDecodeCharMap
1053
1056
  });
1054
- const matchId = path.interpolatePath({
1055
- path: route.id,
1056
- params: routeParams,
1057
- leaveWildcards: true,
1058
- decodeCharMap: this.pathParamsDecodeCharMap,
1059
- parseCache: this.parsePathnameCache
1060
- }).interpolatedPath + loaderDepsHash;
1057
+ const matchId = (
1058
+ // route.id for disambiguation
1059
+ route.id + // interpolatedPath for param changes
1060
+ interpolatedPath + // explicit deps
1061
+ loaderDepsHash
1062
+ );
1061
1063
  const existingMatch = this.getMatch(matchId);
1062
1064
  const previousMatch = this.state.matches.find(
1063
1065
  (d) => d.routeId === route.id