Comparing version 1.15.2 to 1.15.3
@@ -243,3 +243,3 @@ import { getDefaultThrottle, error, debug, parseAsString, parseAsInteger, parseAsFloat, parseAsBoolean, parseAsTimestamp, parseAsIsoDateTime, parseAsStringEnum, parseAsJson, parseAsArrayOf, safeParse } from './chunk-QIXCTYMQ.js'; | ||
function patchHistory() { | ||
const version = "1.15.2"; | ||
const version = "1.15.3"; | ||
const patched = history.__nuqs_patched; | ||
@@ -339,11 +339,12 @@ if (patched) { | ||
); | ||
if (process.env.__NEXT_WINDOW_HISTORY_SUPPORT) { | ||
React.useEffect(() => { | ||
const value = initialSearchParams.get(key) ?? null; | ||
const state = value === null ? null : safeParse(parse, value, key); | ||
debug("[nuqs `%s`] syncFromUseSearchParams %O", key, state); | ||
stateRef.current = state; | ||
setInternalState(state); | ||
}, [initialSearchParams?.get(key), key]); | ||
} | ||
React.useEffect(() => { | ||
if (window.next.version !== "14.0.3") { | ||
return; | ||
} | ||
const value = initialSearchParams.get(key) ?? null; | ||
const state = value === null ? null : safeParse(parse, value, key); | ||
debug("[nuqs `%s`] syncFromUseSearchParams %O", key, state); | ||
stateRef.current = state; | ||
setInternalState(state); | ||
}, [initialSearchParams?.get(key), key]); | ||
React.useInsertionEffect(() => { | ||
@@ -350,0 +351,0 @@ function updateInternalState(state) { |
{ | ||
"name": "nuqs", | ||
"version": "1.15.2", | ||
"version": "1.15.3", | ||
"description": "Type-safe search params state manager for Next.js - Like React.useState, but stored in the URL query string", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -745,2 +745,2 @@ # useQueryState for Next.js | ||
![Project analytics and stats](https://repobeats.axiom.co/api/embed/042323b03b6ae1e039c89ac77e3cf0b0032c512e.svg 'Repobeats analytics image') | ||
![Project analytics and stats](https://repobeats.axiom.co/api/embed/3ee740e4729dce3992bfa8c74645cfebad8ba034.svg 'Repobeats analytics image') |
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
2097
0
106981