Skip to content

Commit 17fb6ac

Browse files
committed
chore(signature-v4-multi-region): test orchestration from root
1 parent 6f07c3d commit 17fb6ac

File tree

10 files changed

+20
-11817
lines changed

10 files changed

+20
-11817
lines changed

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ sync:
1313
make -f Makefile.private.mk sync
1414

1515
test-unit: build-s3-browser-bundle
16+
build-signature-v4-multi-region-browser-bundle
1617
yarn g:vitest run -c vitest.config.ts
1718
yarn g:vitest run -c vitest.config.browser.ts
1819
yarn g:vitest run -c vitest.config.clients.unit.ts
@@ -26,19 +27,24 @@ test-protocols: build-s3-browser-bundle
2627
yarn g:vitest run -c vitest.config.protocols.integ.ts
2728

2829
test-integration: build-s3-browser-bundle
30+
build-signature-v4-multi-region-browser-bundle
2931
rm -rf ./clients/client-sso/node_modules/\@smithy # todo(yarn) incompatible redundant nesting.
3032
yarn g:vitest run -c vitest.config.integ.ts
3133
npx jest -c jest.config.integ.js
3234
make test-protocols;
3335
make test-types;
3436

3537
test-e2e: build-s3-browser-bundle
38+
build-signature-v4-multi-region-browser-bundle
3639
yarn g:vitest run -c vitest.config.e2e.ts --retry=4
3740
yarn g:vitest run -c vitest.config.browser.e2e.ts --retry=4
3841

3942
build-s3-browser-bundle:
4043
node ./clients/client-s3/test/browser-build/esbuild
4144

45+
build-signature-v4-multi-region-browser-bundle:
46+
node ./packages/signature-v4-multi-region/test-browser/browser-build/esbuild.js
47+
4248
# removes nested node_modules folders
4349
clean-nested:
4450
rm -rf ./lib/*/node_modules

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -195,13 +195,13 @@ we have them listed in [UPGRADING.md](https://github.com/aws/aws-sdk-js-v3/blob/
195195

196196
### General Info
197197

198-
The Lambda provided AWS SDK is set to a specific minor version, and NOT the latest version. To
199-
determine which version of the SDK is included with the runtime you're using,
200-
see [Runtime-included SDK versions](https://docs.aws.amazon.com/lambda/latest/dg/lambda-nodejs.html#nodejs-sdk-included)
201-
in the Lambda Developer Guide. To maintain full control of your dependencies, and to maximize
202-
backward compatibility during automatic runtime updates, we recommend that you always include
203-
the SDK modules your code uses in your function's deployment package or in a Lambda layer.
204-
See [Backward compatibility](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html#runtime-update-compatibility)
198+
The Lambda provided AWS SDK is set to a specific minor version, and NOT the latest version. To
199+
determine which version of the SDK is included with the runtime you're using,
200+
see [Runtime-included SDK versions](https://docs.aws.amazon.com/lambda/latest/dg/lambda-nodejs.html#nodejs-sdk-included)
201+
in the Lambda Developer Guide. To maintain full control of your dependencies, and to maximize
202+
backward compatibility during automatic runtime updates, we recommend that you always include
203+
the SDK modules your code uses in your function's deployment package or in a Lambda layer.
204+
See [Backward compatibility](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html#runtime-update-compatibility)
205205
to learn more.
206206

207207
The performance of the AWS SDK for JavaScript v3 on node 18 has improved from v2 as seen in the [performance benchmarking](https://aws.amazon.com/blogs/developer/reduce-lambda-cold-start-times-migrate-to-aws-sdk-for-javascript-v3/)
@@ -702,6 +702,8 @@ Note that you can also use the native JavaScript implementation of SigV4a that d
702702

703703
### Using JavaScript (non-CRT) implementation of SigV4a
704704

705+
Note: Use of AWS SignatureV4a in the browser (JS implementation) is not recommended, due to the bundle size of the SigV4a signing algorithm code. Consider whether there are other ways to achieve your desired application functionality without the use of sigv4a before installing these packages.
706+
705707
AWS SDK for JavaScript v3 now supports a native JavaScript version of SigV4a that can be used in browsers and Node, and does not depend on [AWS Common Runtime (CRT)](https://docs.aws.amazon.com/sdkref/latest/guide/common-runtime.html). This is an alternative to the AWS CRT version, so you don't need to have both packages together.
706708

707709
If neither the CRT components nor the JavaScript SigV4a implementation are installed, you will receive an error like:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/test-browser/browser-build/browser-signature-v4-multi-region-bundle.js

packages/signature-v4-multi-region/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
66
"build:cjs": "node ../../scripts/compilation/inline signature-v4-multi-region",
77
"build:es": "tsc -p tsconfig.es.json",
8+
"build:browser": "node ./test-browser/browser-build/esbuild",
89
"build:include:deps": "lerna run --scope $npm_package_name --include-dependencies build",
910
"build:types": "tsc -p tsconfig.types.json",
1011
"build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
1112
"clean": "rimraf ./dist-* && rimraf *.tsbuildinfo",
1213
"test": "yarn g:vitest run",
1314
"test:e2e": "yarn g:vitest run -c vitest.config.e2e.ts",
14-
"test:browser": "node ./src/browser-build/esbuild && yarn g:vitest run -c vitest.config.browser.ts",
15+
"test:browser": "yarn build:browser && yarn g:vitest run -c vitest.config.browser.ts",
1516
"test:watch": "yarn g:vitest watch"
1617
},
1718
"main": "./dist-cjs/index.js",
@@ -27,15 +28,13 @@
2728
"@aws-sdk/types": "*",
2829
"@smithy/protocol-http": "^5.1.0",
2930
"@smithy/signature-v4": "^5.0.2",
30-
"@smithy/signature-v4a": "^3.0.0",
3131
"@smithy/types": "^4.2.0",
3232
"tslib": "^2.6.2"
3333
},
3434
"devDependencies": {
3535
"@tsconfig/recommended": "1.0.1",
3636
"concurrently": "7.0.0",
3737
"downlevel-dts": "0.10.1",
38-
"jsdom": "^26.0.0",
3938
"rimraf": "3.0.2",
4039
"typescript": "~5.2.2"
4140
},
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { HttpRequest } from "@smithy/protocol-http";
22
import { Checksum } from "@smithy/types";
33
import { beforeEach, describe, expect, it, vi } from "vitest";
44

5-
import { SignatureV4MultiRegion } from "./browser-build/browser-signature-v4-multi-region-bundle.js";
5+
import { SignatureV4MultiRegion } from "../test-browser/browser-build/browser-signature-v4-multi-region-bundle.js";
66

77
describe("SignatureV4MultiRegion (Browser Bundle SigV4a Test)", () => {
88
const credentials = {

0 commit comments

Comments
 (0)