@smithy/util-uri-escape 4.2.2 → 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,9 +1,6 @@
1
- 'use strict';
2
-
3
- const escapeUri = (uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode);
4
- const hexEncode = (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`;
5
-
6
- const escapeUriPath = (uri) => uri.split("/").map(escapeUri).join("/");
7
-
8
- exports.escapeUri = escapeUri;
9
- exports.escapeUriPath = escapeUriPath;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.escapeUriPath = exports.escapeUri = void 0;
4
+ var protocols_1 = require("@smithy/core/protocols");
5
+ Object.defineProperty(exports, "escapeUri", { enumerable: true, get: function () { return protocols_1.escapeUri; } });
6
+ Object.defineProperty(exports, "escapeUriPath", { enumerable: true, get: function () { return protocols_1.escapeUriPath; } });
package/dist-es/index.js CHANGED
@@ -1,2 +1 @@
1
- export * from "./escape-uri";
2
- export * from "./escape-uri-path";
1
+ export { escapeUri, escapeUriPath } from "@smithy/core/protocols";
@@ -1,8 +1,2 @@
1
- /**
2
- * @internal
3
- */
4
- export * from "./escape-uri";
5
- /**
6
- * @internal
7
- */
8
- export * from "./escape-uri-path";
1
+ /** @deprecated Use @smithy/core/protocols instead. */
2
+ export { escapeUri, escapeUriPath } from "@smithy/core/protocols";
package/package.json CHANGED
@@ -1,18 +1,10 @@
1
1
  {
2
2
  "name": "@smithy/util-uri-escape",
3
- "version": "4.2.2",
3
+ "version": "4.3.0",
4
4
  "scripts": {
5
- "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
- "build:cjs": "node ../../scripts/inline util-uri-escape",
7
- "build:es": "yarn g:tsc -p tsconfig.es.json",
8
- "build:types": "yarn g:tsc -p tsconfig.types.json",
9
- "build:types:downlevel": "premove dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4",
10
- "stage-release": "premove .release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz",
11
- "clean": "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo",
12
- "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
13
- "format": "prettier --config ../../prettier.config.js --ignore-path ../../.prettierignore --write \"**/*.{ts,md,json}\"",
14
- "test": "yarn g:vitest run",
15
- "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"
16
8
  },
17
9
  "main": "./dist-cjs/index.js",
18
10
  "module": "./dist-es/index.js",
@@ -24,18 +16,12 @@
24
16
  "license": "Apache-2.0",
25
17
  "sideEffects": false,
26
18
  "dependencies": {
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/util-uri-escape"
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,10 +0,0 @@
1
- # @smithy/util-uri-escape
2
-
3
- [![NPM version](https://img.shields.io/npm/v/@smithy/util-uri-escape/latest.svg)](https://www.npmjs.com/package/@smithy/util-uri-escape)
4
- [![NPM downloads](https://img.shields.io/npm/dm/@smithy/util-uri-escape.svg)](https://www.npmjs.com/package/@smithy/util-uri-escape)
5
-
6
- > An internal package
7
-
8
- ## Usage
9
-
10
- You probably shouldn't, at least directly.
@@ -1,2 +0,0 @@
1
- import { escapeUri } from "./escape-uri";
2
- export const escapeUriPath = (uri) => uri.split("/").map(escapeUri).join("/");
@@ -1,2 +0,0 @@
1
- export const escapeUri = (uri) => encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode);
2
- const hexEncode = (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`;
@@ -1,4 +0,0 @@
1
- /**
2
- * @internal
3
- */
4
- export declare const escapeUriPath: (uri: string) => string;
@@ -1,4 +0,0 @@
1
- /**
2
- * @internal
3
- */
4
- export declare const escapeUri: (uri: string) => string;
@@ -1,4 +0,0 @@
1
- /**
2
- * @internal
3
- */
4
- export declare const escapeUriPath: (uri: string) => string;
@@ -1,4 +0,0 @@
1
- /**
2
- * @internal
3
- */
4
- export declare const escapeUri: (uri: string) => string;
@@ -1,8 +0,0 @@
1
- /**
2
- * @internal
3
- */
4
- export * from "./escape-uri";
5
- /**
6
- * @internal
7
- */
8
- export * from "./escape-uri-path";