fix: mitigate dependency issues — remove deprecated packages#1654
Merged
fix: mitigate dependency issues — remove deprecated packages#1654
Conversation
Remove aws-sdk v2 from devDependencies and remove duplicate v2 test blocks from kms-keyring-browser and kms-keyring-node tests. The v3 test blocks provide identical coverage.
- Replace @aws-sdk/util-utf8-browser with @smithy/util-utf8 - Replace @aws-sdk/util-base64-browser with @aws-sdk/util-base64 - Unpin @aws-sdk/util-locate-window from 3.310.0 to ^3.568.0 - Unpin end-of-stream from <=1.4.4 to ^1.4.4
Resolves TS7016 errors for uuid imports that lacked type declarations.
end-of-stream 1.4.5 references `process` which is not available in the browser, causing 'ReferenceError: process is not defined' in test-vectors-browser CI. The <=1.4.4 pin was intentional.
Contributor
|
Is the error message below part of flaky test failure?
Based on the change, it looks related. Can you please confirm? |
… test @smithy/util-utf8 toUtf8 requires string | Uint8Array, unlike the old @aws-sdk/util-utf8-browser which accepted ArrayBuffer via TextDecoder. response.arrayBuffer() returns ArrayBuffer, so wrap it.
texastony
commented
Mar 24, 2026
sharmabikram
approved these changes
Mar 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR addresses multiple dependency issues in the AWS Encryption SDK for JavaScript.
Changes
aws-sdkv2 from root devDependencies and removed duplicate v2 test blocks from 6 test files inkms-keyring-browserandkms-keyring-node. The v2 blocks were structurally identical to the v3 blocks, so no test coverage is lost. (482 lines deleted)@aws-sdk/util-utf8-browser→@smithy/util-utf8(5 modules, drop-in replacement)@aws-sdk/util-base64-browser→@aws-sdk/util-base64(3 modules, drop-in replacement)@aws-sdk/util-locate-windowfrom3.310.0to^3.568.02.6.3→2.8.1(semver-compatible, lockfile-only change)@types/uuidtomaterial-managementandserializemodules to resolve TS7016 errors (uuid v10 does not bundle types)end-of-streamfrom<=1.4.4to^1.4.4, but1.4.5referencesprocesswhich breaks in the browser. Reverted to keep the<=1.4.4pin.@smithy/util-utf8toUtf8requiresstring | Uint8Array, unlike the old@aws-sdk/util-utf8-browserwhich acceptedArrayBufferviaTextDecoder. Wrappedresponse.arrayBuffer()result innew Uint8Array().Testing
tsc -b tsconfig.json— zero errors)verdaccio-browser-decryptpasses locally (9086/9087 tests, 1 pre-existing flaky failure)