react-instantsearch-hooks
Advanced tools
Comparing version 6.44.3 to 6.45.0
@@ -18,2 +18,5 @@ "use strict"; | ||
var serverUserAgent = "react-instantsearch-server (".concat(_version.default, ")"); | ||
var nextUserAgent = function nextUserAgent(nextVersion) { | ||
return nextVersion ? "next.js (".concat(nextVersion, ")") : null; | ||
}; | ||
function useInstantSearchApi(props) { | ||
@@ -57,3 +60,3 @@ var forceUpdate = (0, _useForceUpdate.useForceUpdate)(); | ||
} | ||
addAlgoliaAgents(props.searchClient, [].concat(defaultUserAgents, [serverContext && serverUserAgent])); | ||
addAlgoliaAgents(props.searchClient, [].concat(defaultUserAgents, [serverContext && serverUserAgent, nextUserAgent(getNextVersion())])); | ||
@@ -180,2 +183,12 @@ // On the server, we start the search early to compute the search parameters. | ||
} | ||
} | ||
/** | ||
* Gets the version of Next.js if it is available in the `window` object, | ||
* otherwise it returns the NEXT_RUNTIME environment variable (in SSR), | ||
* which is either `nodejs` or `edge`. | ||
*/ | ||
function getNextVersion() { | ||
var _next, _process$env; | ||
return typeof window !== 'undefined' && ((_next = window.next) === null || _next === void 0 ? void 0 : _next.version) || (typeof process !== 'undefined' ? (_process$env = process.env) === null || _process$env === void 0 ? void 0 : _process$env.NEXT_RUNTIME : undefined); | ||
} |
@@ -7,3 +7,3 @@ "use strict"; | ||
exports.default = void 0; | ||
var _default = '6.44.3'; | ||
var _default = '6.45.0'; | ||
exports.default = _default; |
/// <reference types="react" /> | ||
import type { IndexWidget } from 'instantsearch.js/es/widgets/index/index'; | ||
export declare const IndexContext: import("react").Context<IndexWidget<import("instantsearch.js").UiState> | null>; | ||
export declare const IndexContext: import("react").Context<IndexWidget | null>; |
@@ -11,2 +11,5 @@ import InstantSearch from "instantsearch.js/es/lib/InstantSearch.js"; | ||
var serverUserAgent = "react-instantsearch-server (".concat(version, ")"); | ||
var nextUserAgent = function nextUserAgent(nextVersion) { | ||
return nextVersion ? "next.js (".concat(nextVersion, ")") : null; | ||
}; | ||
export function useInstantSearchApi(props) { | ||
@@ -50,3 +53,3 @@ var forceUpdate = useForceUpdate(); | ||
} | ||
addAlgoliaAgents(props.searchClient, [].concat(defaultUserAgents, [serverContext && serverUserAgent])); | ||
addAlgoliaAgents(props.searchClient, [].concat(defaultUserAgents, [serverContext && serverUserAgent, nextUserAgent(getNextVersion())])); | ||
@@ -173,2 +176,12 @@ // On the server, we start the search early to compute the search parameters. | ||
} | ||
} | ||
/** | ||
* Gets the version of Next.js if it is available in the `window` object, | ||
* otherwise it returns the NEXT_RUNTIME environment variable (in SSR), | ||
* which is either `nodejs` or `edge`. | ||
*/ | ||
function getNextVersion() { | ||
var _next, _process$env; | ||
return typeof window !== 'undefined' && ((_next = window.next) === null || _next === void 0 ? void 0 : _next.version) || (typeof process !== 'undefined' ? (_process$env = process.env) === null || _process$env === void 0 ? void 0 : _process$env.NEXT_RUNTIME : undefined); | ||
} |
@@ -1,2 +0,2 @@ | ||
declare const _default: "6.44.3"; | ||
declare const _default: "6.45.0"; | ||
export default _default; |
@@ -1,1 +0,1 @@ | ||
export default '6.44.3'; | ||
export default '6.45.0'; |
{ | ||
"name": "react-instantsearch-hooks", | ||
"version": "6.44.3", | ||
"version": "6.45.0", | ||
"description": "⚡ Lightning-fast search for React, by Algolia", | ||
@@ -52,4 +52,4 @@ "source": "src/index.ts", | ||
"@babel/runtime": "^7.1.2", | ||
"algoliasearch-helper": "^3.13.0", | ||
"instantsearch.js": "4.56.2", | ||
"algoliasearch-helper": "^3.13.2", | ||
"instantsearch.js": "4.56.3", | ||
"use-sync-external-store": "^1.0.0" | ||
@@ -64,3 +64,3 @@ }, | ||
}, | ||
"gitHead": "aa19955aae2c79b93d5f952832d366e8abff9886" | ||
"gitHead": "f550379829306217e021fd9c538ec4ebd0153b19" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
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
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
3159513
19228
20
+ Addedinstantsearch.js@4.56.3(transitive)
- Removedinstantsearch.js@4.56.2(transitive)
Updatedalgoliasearch-helper@^3.13.2
Updatedinstantsearch.js@4.56.3