@smithy/querystring-builder 4.2.14 → 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,26 +1,5 @@
1
- 'use strict';
2
-
3
- var utilUriEscape = require('@smithy/util-uri-escape');
4
-
5
- function buildQueryString(query) {
6
- const parts = [];
7
- for (let key of Object.keys(query).sort()) {
8
- const value = query[key];
9
- key = utilUriEscape.escapeUri(key);
10
- if (Array.isArray(value)) {
11
- for (let i = 0, iLen = value.length; i < iLen; i++) {
12
- parts.push(`${key}=${utilUriEscape.escapeUri(value[i])}`);
13
- }
14
- }
15
- else {
16
- let qsEntry = key;
17
- if (value || typeof value === "string") {
18
- qsEntry += `=${utilUriEscape.escapeUri(value)}`;
19
- }
20
- parts.push(qsEntry);
21
- }
22
- }
23
- return parts.join("&");
24
- }
25
-
26
- exports.buildQueryString = buildQueryString;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buildQueryString = void 0;
4
+ var protocols_1 = require("@smithy/core/protocols");
5
+ Object.defineProperty(exports, "buildQueryString", { enumerable: true, get: function () { return protocols_1.buildQueryString; } });
package/dist-es/index.js CHANGED
@@ -1,21 +1 @@
1
- import { escapeUri } from "@smithy/util-uri-escape";
2
- export function buildQueryString(query) {
3
- const parts = [];
4
- for (let key of Object.keys(query).sort()) {
5
- const value = query[key];
6
- key = escapeUri(key);
7
- if (Array.isArray(value)) {
8
- for (let i = 0, iLen = value.length; i < iLen; i++) {
9
- parts.push(`${key}=${escapeUri(value[i])}`);
10
- }
11
- }
12
- else {
13
- let qsEntry = key;
14
- if (value || typeof value === "string") {
15
- qsEntry += `=${escapeUri(value)}`;
16
- }
17
- parts.push(qsEntry);
18
- }
19
- }
20
- return parts.join("&");
21
- }
1
+ export { buildQueryString } from "@smithy/core/protocols";
@@ -1,5 +1,2 @@
1
- import type { QueryParameterBag } from "@smithy/types";
2
- /**
3
- * @internal
4
- */
5
- export declare function buildQueryString(query: QueryParameterBag): string;
1
+ /** @deprecated Use @smithy/core/protocols instead. */
2
+ export { buildQueryString } from "@smithy/core/protocols";
package/package.json CHANGED
@@ -1,16 +1,10 @@
1
1
  {
2
2
  "name": "@smithy/querystring-builder",
3
- "version": "4.2.14",
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-builder",
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": "exit 0"
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"
14
8
  },
15
9
  "main": "./dist-cjs/index.js",
16
10
  "module": "./dist-es/index.js",
@@ -22,20 +16,12 @@
22
16
  "license": "Apache-2.0",
23
17
  "sideEffects": false,
24
18
  "dependencies": {
25
- "@smithy/types": "^4.14.1",
26
- "@smithy/util-uri-escape": "^4.2.2",
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-builder"
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-builder
2
-
3
- [![NPM version](https://img.shields.io/npm/v/@smithy/querystring-builder/latest.svg)](https://www.npmjs.com/package/@smithy/querystring-builder)
4
- [![NPM downloads](https://img.shields.io/npm/dm/@smithy/querystring-builder.svg)](https://www.npmjs.com/package/@smithy/querystring-builder)
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
- ---