@common.js/query-string 8.1.0 → 8.2.0

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.
package/README.md CHANGED
@@ -2,4 +2,4 @@
2
2
 
3
3
  The [query-string](https://www.npmjs.com/package/query-string) package exported as CommonJS modules.
4
4
 
5
- Exported from [query-string@8.1.0](https://www.npmjs.com/package/query-string/v/8.1.0) using https://github.com/etienne-martin/common.js.
5
+ Exported from [query-string@8.2.0](https://www.npmjs.com/package/query-string/v/8.2.0) using https://github.com/etienne-martin/common.js.
package/base.d.ts CHANGED
@@ -220,7 +220,7 @@ export function parseUrl(url: string, options?: ParseOptions): ParsedUrl;
220
220
 
221
221
  export type StringifyOptions = {
222
222
  /**
223
- Strictly encode URI components with [`strict-uri-encode`](https://github.com/kevva/strict-uri-encode). It uses [`encodeURIComponent`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) if set to `false`. You probably [don't care](https://github.com/sindresorhus/query-string/issues/42) about this option.
223
+ Strictly encode URI components. It uses [`encodeURIComponent`](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent) if set to `false`. You probably [don't care](https://github.com/sindresorhus/query-string/issues/42) about this option.
224
224
 
225
225
  @default true
226
226
  */
@@ -412,7 +412,7 @@ export type StringifyOptions = {
412
412
  readonly skipEmptyString?: boolean;
413
413
  };
414
414
 
415
- export type Stringifiable = string | boolean | number | null | undefined; // eslint-disable-line @typescript-eslint/ban-types
415
+ export type Stringifiable = string | boolean | number | bigint | null | undefined; // eslint-disable-line @typescript-eslint/ban-types
416
416
 
417
417
  export type StringifiableRecord = Record<
418
418
  string,
package/base.js CHANGED
@@ -543,12 +543,7 @@ function parse(query, options) {
543
543
  // eslint-disable-next-line unicorn/no-array-reduce
544
544
  return (options.sort === true ? Object.keys(returnValue).sort() : Object.keys(returnValue).sort(options.sort)).reduce(function(result, key) {
545
545
  var value = returnValue[key];
546
- if (Boolean(value) && typeof value === "object" && !Array.isArray(value)) {
547
- // Sort object keys, not values
548
- result[key] = keysSorter(value);
549
- } else {
550
- result[key] = value;
551
- }
546
+ result[key] = Boolean(value) && typeof value === "object" && !Array.isArray(value) ? keysSorter(value) : value;
552
547
  return result;
553
548
  }, Object.create(null));
554
549
  }
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@common.js/query-string",
3
- "version": "8.1.0",
3
+ "version": "8.2.0",
4
4
  "description": "query-string package exported as CommonJS modules",
5
5
  "license": "MIT",
6
6
  "repository": "etienne-martin/common.js",
7
7
  "funding": "https://github.com/sponsors/sindresorhus",
8
8
  "type": "commonjs",
9
+ "sideEffects": false,
9
10
  "engines": {
10
11
  "node": ">=14.16"
11
12
  },
@@ -30,7 +31,7 @@
30
31
  "deep-equal": "^2.1.0",
31
32
  "fast-check": "^3.4.0",
32
33
  "tsd": "^0.25.0",
33
- "xo": "^0.53.1"
34
+ "xo": "^0.54.2"
34
35
  },
35
36
  "tsd": {
36
37
  "compilerOptions": {