@tanstack/history
Advanced tools
Comparing version 1.44.2 to 1.45.3
@@ -6,2 +6,3 @@ export interface NavigateOptions { | ||
location: HistoryLocation; | ||
subscribers: Set<() => void>; | ||
subscribe: (cb: () => void) => () => void; | ||
@@ -8,0 +9,0 @@ push: (path: string, state?: any, navigateOpts?: NavigateOptions) => void; |
@@ -39,2 +39,3 @@ const pushStateEvent = "pushstate"; | ||
}, | ||
subscribers, | ||
subscribe: (cb) => { | ||
@@ -149,2 +150,6 @@ subscribers.add(cb); | ||
if (!scheduled) { | ||
if (process.env.NODE_ENV === "test") { | ||
flush(); | ||
return; | ||
} | ||
scheduled = Promise.resolve().then(() => flush()); | ||
@@ -151,0 +156,0 @@ } |
{ | ||
"name": "@tanstack/history", | ||
"version": "1.44.2", | ||
"version": "1.45.3", | ||
"description": "Modern and scalable routing for React applications", | ||
@@ -5,0 +5,0 @@ "author": "Tanner Linsley", |
@@ -10,2 +10,3 @@ // While the public API was clearly inspired by the "history" npm package, | ||
location: HistoryLocation | ||
subscribers: Set<() => void> | ||
subscribe: (cb: () => void) => () => void | ||
@@ -104,2 +105,3 @@ push: (path: string, state?: any, navigateOpts?: NavigateOptions) => void | ||
}, | ||
subscribers, | ||
subscribe: (cb: () => void) => { | ||
@@ -274,2 +276,6 @@ subscribers.add(cb) | ||
if (!scheduled) { | ||
if (process.env.NODE_ENV === 'test') { | ||
flush() | ||
return | ||
} | ||
// Schedule an update to the browser history | ||
@@ -276,0 +282,0 @@ scheduled = Promise.resolve().then(() => flush()) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
71372
991