@smithy/signature-v4 2.2.1 → 3.0.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
@@ -35,6 +35,7 @@ module.exports = __toCommonJS(src_exports);
35
35
  // src/SignatureV4.ts
36
36
 
37
37
  var import_util_middleware = require("@smithy/util-middleware");
38
+
38
39
  var import_util_utf84 = require("@smithy/util-utf8");
39
40
 
40
41
  // src/constants.ts
@@ -540,7 +541,7 @@ ${(0, import_util_hex_encoding.toHex)(hashedRequest)}`;
540
541
  }
541
542
  }
542
543
  const normalizedPath = `${(path == null ? void 0 : path.startsWith("/")) ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && (path == null ? void 0 : path.endsWith("/")) ? "/" : ""}`;
543
- const doubleEncoded = encodeURIComponent(normalizedPath);
544
+ const doubleEncoded = (0, import_util_uri_escape.escapeUri)(normalizedPath);
544
545
  return doubleEncoded.replace(/%2F/g, "/");
545
546
  }
546
547
  return path;
@@ -1,5 +1,6 @@
1
1
  import { toHex } from "@smithy/util-hex-encoding";
2
2
  import { normalizeProvider } from "@smithy/util-middleware";
3
+ import { escapeUri } from "@smithy/util-uri-escape";
3
4
  import { toUint8Array } from "@smithy/util-utf8";
4
5
  import { ALGORITHM_IDENTIFIER, ALGORITHM_QUERY_PARAM, AMZ_DATE_HEADER, AMZ_DATE_QUERY_PARAM, AUTH_HEADER, CREDENTIAL_QUERY_PARAM, EVENT_ALGORITHM_IDENTIFIER, EXPIRES_QUERY_PARAM, MAX_PRESIGNED_TTL, SHA256_HEADER, SIGNATURE_QUERY_PARAM, SIGNED_HEADERS_QUERY_PARAM, TOKEN_HEADER, TOKEN_QUERY_PARAM, } from "./constants";
5
6
  import { createScope, getSigningKey } from "./credentialDerivation";
@@ -158,7 +159,7 @@ ${toHex(hashedRequest)}`;
158
159
  }
159
160
  }
160
161
  const normalizedPath = `${path?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path?.endsWith("/") ? "/" : ""}`;
161
- const doubleEncoded = encodeURIComponent(normalizedPath);
162
+ const doubleEncoded = escapeUri(normalizedPath);
162
163
  return doubleEncoded.replace(/%2F/g, "/");
163
164
  }
164
165
  return path;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/signature-v4",
3
- "version": "2.2.1",
3
+ "version": "3.0.0",
4
4
  "description": "A standalone implementation of the AWS Signature V4 request signing algorithm",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -24,25 +24,24 @@
24
24
  },
25
25
  "license": "Apache-2.0",
26
26
  "dependencies": {
27
- "@smithy/is-array-buffer": "^2.2.0",
28
- "@smithy/types": "^2.12.0",
29
- "@smithy/util-hex-encoding": "^2.2.0",
30
- "@smithy/util-middleware": "^2.2.0",
31
- "@smithy/util-uri-escape": "^2.2.0",
32
- "@smithy/util-utf8": "^2.3.0",
27
+ "@smithy/is-array-buffer": "^3.0.0",
28
+ "@smithy/types": "^3.0.0",
29
+ "@smithy/util-hex-encoding": "^3.0.0",
30
+ "@smithy/util-middleware": "^3.0.0",
31
+ "@smithy/util-uri-escape": "^3.0.0",
32
+ "@smithy/util-utf8": "^3.0.0",
33
33
  "tslib": "^2.6.2"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@aws-crypto/sha256-js": "3.0.0",
37
- "@smithy/protocol-http": "^3.3.0",
38
- "@tsconfig/recommended": "1.0.1",
37
+ "@smithy/protocol-http": "^4.0.0",
39
38
  "concurrently": "7.0.0",
40
39
  "downlevel-dts": "0.10.1",
41
40
  "rimraf": "3.0.2",
42
41
  "typedoc": "0.23.23"
43
42
  },
44
43
  "engines": {
45
- "node": ">=14.0.0"
44
+ "node": ">=16.0.0"
46
45
  },
47
46
  "typesVersions": {
48
47
  "<4.0": {