@smithy/querystring-parser 4.2.13 → 4.3.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/dist-cjs/index.js CHANGED
@@ -1,27 +1,5 @@
1
- 'use strict';
2
-
3
- function parseQueryString(querystring) {
4
- const query = {};
5
- querystring = querystring.replace(/^\?/, "");
6
- if (querystring) {
7
- for (const pair of querystring.split("&")) {
8
- let [key, value = null] = pair.split("=");
9
- key = decodeURIComponent(key);
10
- if (value) {
11
- value = decodeURIComponent(value);
12
- }
13
- if (!(key in query)) {
14
- query[key] = value;
15
- }
16
- else if (Array.isArray(query[key])) {
17
- query[key].push(value);
18
- }
19
- else {
20
- query[key] = [query[key], value];
21
- }
22
- }
23
- }
24
- return query;
25
- }
26
-
27
- exports.parseQueryString = parseQueryString;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseQueryString = void 0;
4
+ var protocols_1 = require("@smithy/core/protocols");
5
+ Object.defineProperty(exports, "parseQueryString", { enumerable: true, get: function () { return protocols_1.parseQueryString; } });
package/dist-es/index.js CHANGED
@@ -1,23 +1 @@
1
- export function parseQueryString(querystring) {
2
- const query = {};
3
- querystring = querystring.replace(/^\?/, "");
4
- if (querystring) {
5
- for (const pair of querystring.split("&")) {
6
- let [key, value = null] = pair.split("=");
7
- key = decodeURIComponent(key);
8
- if (value) {
9
- value = decodeURIComponent(value);
10
- }
11
- if (!(key in query)) {
12
- query[key] = value;
13
- }
14
- else if (Array.isArray(query[key])) {
15
- query[key].push(value);
16
- }
17
- else {
18
- query[key] = [query[key], value];
19
- }
20
- }
21
- }
22
- return query;
23
- }
1
+ export { parseQueryString } from "@smithy/core/protocols";
@@ -1,5 +1,2 @@
1
- import type { QueryParameterBag } from "@smithy/types";
2
- /**
3
- * @internal
4
- */
5
- export declare function parseQueryString(querystring: string): QueryParameterBag;
1
+ /** @deprecated Use @smithy/core/protocols instead. */
2
+ export { parseQueryString } from "@smithy/core/protocols";
package/package.json CHANGED
@@ -1,17 +1,10 @@
1
1
  {
2
2
  "name": "@smithy/querystring-parser",
3
- "version": "4.2.13",
3
+ "version": "4.3.0",
4
4
  "scripts": {
5
- "build": "concurrently 'yarn:build:types' 'yarn:build:es:cjs'",
6
- "build:es:cjs": "yarn g:tsc -p tsconfig.es.json && node ../../scripts/inline querystring-parser",
7
- "build:types": "yarn g:tsc -p tsconfig.types.json",
8
- "build:types:downlevel": "premove dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4",
9
- "clean": "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo",
10
- "format": "prettier --config ../../prettier.config.js --ignore-path ../../.prettierignore --write \"**/*.{ts,md,json}\"",
11
- "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
12
- "stage-release": "premove .release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz",
13
- "test": "yarn g:vitest run",
14
- "test:watch": "yarn g:vitest watch"
5
+ "build": "yarn g:tsc -p tsconfig.cjs.json && yarn g:tsc -p tsconfig.es.json && yarn g:tsc -p tsconfig.types.json",
6
+ "clean": "rm -rf dist-cjs dist-es dist-types",
7
+ "stage-release": "rm -rf .release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz"
15
8
  },
16
9
  "main": "./dist-cjs/index.js",
17
10
  "module": "./dist-es/index.js",
@@ -23,19 +16,12 @@
23
16
  "license": "Apache-2.0",
24
17
  "sideEffects": false,
25
18
  "dependencies": {
26
- "@smithy/types": "^4.14.0",
19
+ "@smithy/core": "^3.24.0",
27
20
  "tslib": "^2.6.2"
28
21
  },
29
22
  "engines": {
30
23
  "node": ">=18.0.0"
31
24
  },
32
- "typesVersions": {
33
- "<4.5": {
34
- "dist-types/*": [
35
- "dist-types/ts3.4/*"
36
- ]
37
- }
38
- },
39
25
  "files": [
40
26
  "dist-*/**"
41
27
  ],
@@ -45,12 +31,6 @@
45
31
  "url": "https://github.com/smithy-lang/smithy-typescript.git",
46
32
  "directory": "packages/querystring-parser"
47
33
  },
48
- "devDependencies": {
49
- "concurrently": "7.0.0",
50
- "downlevel-dts": "0.10.1",
51
- "premove": "4.0.0",
52
- "typedoc": "0.23.23"
53
- },
54
34
  "typedoc": {
55
35
  "entryPoint": "src/index.ts"
56
36
  },
package/README.md DELETED
@@ -1,17 +0,0 @@
1
- # @smithy/querystring-parser
2
-
3
- [![NPM version](https://img.shields.io/npm/v/@smithy/querystring-parser/latest.svg)](https://www.npmjs.com/package/@smithy/querystring-parser)
4
- [![NPM downloads](https://img.shields.io/npm/dm/@smithy/querystring-parser.svg)](https://www.npmjs.com/package/@smithy/querystring-parser)
5
-
6
- ### :warning: Internal API :warning:
7
-
8
- > This is an internal package.
9
- > That means this is used as a dependency for other, public packages, but
10
- > should not be taken directly as a dependency in your application's `package.json`.
11
-
12
- > If you are updating the version of this package, for example to bring in a
13
- > bug-fix, you should do so by updating your application lockfile with
14
- > e.g. `npm up @scope/package` or equivalent command in another
15
- > package manager, rather than taking a direct dependency.
16
-
17
- ---