serialize-query-params
Advanced tools
Comparing version 1.2.2 to 1.2.3
@@ -7,1 +7,18 @@ export { withDefault } from './withDefault'; | ||
export { decodeQueryParams } from './decodeQueryParams'; | ||
if (process.env.NODE_ENV !== 'production') { | ||
/* | ||
* run checks to ensure a valid version of query-string is installed | ||
* see https://github.com/pbeshai/use-query-params/issues/127 for discussion | ||
*/ | ||
var queryStringVersion = require('query-string/package.json').version; | ||
// simple check of versions since we don't anticipate any new minor v5s and | ||
// don't want to require the semver package as a dependency for just a simple | ||
// dev check. | ||
var validQueryStringInstalled = /^5.1.[1-9][0-9]*/.test(queryStringVersion) || | ||
/^6\./.test(queryStringVersion); | ||
if (!validQueryStringInstalled) { | ||
throw new Error("serialize-query-params requires query-string ^5.1.1 || ^6, " + | ||
("but " + queryStringVersion + " is installed. Note: you may also ") + | ||
"see this message if you're using use-query-params."); | ||
} | ||
} |
@@ -49,1 +49,18 @@ "use strict"; | ||
exports.decodeQueryParams = decodeQueryParams_1.decodeQueryParams; | ||
if (process.env.NODE_ENV !== 'production') { | ||
/* | ||
* run checks to ensure a valid version of query-string is installed | ||
* see https://github.com/pbeshai/use-query-params/issues/127 for discussion | ||
*/ | ||
var queryStringVersion = require('query-string/package.json').version; | ||
// simple check of versions since we don't anticipate any new minor v5s and | ||
// don't want to require the semver package as a dependency for just a simple | ||
// dev check. | ||
var validQueryStringInstalled = /^5.1.[1-9][0-9]*/.test(queryStringVersion) || | ||
/^6\./.test(queryStringVersion); | ||
if (!validQueryStringInstalled) { | ||
throw new Error("serialize-query-params requires query-string ^5.1.1 || ^6, " + | ||
("but " + queryStringVersion + " is installed. Note: you may also ") + | ||
"see this message if you're using use-query-params."); | ||
} | ||
} |
{ | ||
"name": "serialize-query-params", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "A library for simplifying encoding and decoding URL query parameters.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
95710
2307
2