Skip to content

Migrate @aws-sdk packages to smithy-typescript #737

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 880 commits into from
Closed

Conversation

srchase
Copy link
Contributor

@srchase srchase commented Apr 17, 2023

This PR migrates the following packages from the AWS SDK for JavaScript v3 repository to this smithy-typescript repository.

abort-controller
chunked-blob-reader
chunked-blob-reader-native
config-resolver
credential-provider-imds
eventstream-codec
eventstream-serde-browser
eventstream-serde-config-resolver
eventstream-serde-node
eventstream-serde-universal
fetch-http-handler
hash-blob-browser
hash-node
hash-stream-node
invalid-dependency
is-array-buffer
md5-js
middleware-apply-body-checksum
middleware-content-length
middleware-endpoint
middleware-retry
middleware-serde
middleware-stack
node-config-provider
node-http-handler
property-provider
protocol-http
querystring-builder
querystring-parser
service-client-documentation-generator
service-error-classification
shared-ini-file-loader
signature-v4
smithy-client
types
url-parser
util-base64
util-body-length-browser
util-body-length-node
util-buffer-from
util-config-provider
util-defaults-mode-browser
util-defaults-mode-node
util-endpoints
util-hex-encoding
util-middleware
util-retry
util-stream-browser
util-stream-node
util-uri-escape
util-utf8

These packages are use by generic smithy-typescript generated clients and the TypeScript SSDK, and moving these packages to this repository will aide in the development of generic clients and the SSDK.

As part of migrating these packages, additional changes were made:

  • The existing package.json from the SSDK libs directory was moved to the top-level, along with tsconfig, jest, eslint and prettier configuration files.
  • For the SSDK libs, paths were updated to use the top-level config files.
  • Dev dependencies for the SSDK libs were moved to the top-level package.json
  • The @AWS-SDK scopes were updated to @smithy-io.

While the aws-sdk-js-v3 repository uses Yarn v1 with Lerna, this repository will use Yarn v3 with Turborepo. Commands can be executed from the top-level.

For instance, to test all of the client and SSDK packages, run yarn test from the top level. This will assure that each package has been built before invoking its test script.

To build a single package, run yarn build --filter@smithy-io/protcol-http.

Since these packages are consumed by aws-sdk-js-v3, it will likely be necessary to test changes to the client packages locally against with aws-sdk-js-v3. For example to test a change to @smithy-io/protocol-http, the following can be run:

  • Change to @smithy-io/protocol-http package: cd packages/protocol-http.
  • Link package: YARN_IGNORE_PATH=1 yarn link
  • Change to consuming package: cd ~/another-repo/packages/consuming-package
  • For consuming package managed with Yarn v1, run yarn link @smithy-io/protocol-http
    Once linked, building and testing on the consuming package can be completed per that repository.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

trivikr and others added 30 commits April 27, 2022 14:43
* fix(shared-ini-file-loader): update ini parsing

* fix(shared-ini-file-loader): use indexOf instead of split

* fix(shared-ini-file-loader): require non-empty for ini parse
* chore(deps-dev): bump jest to 28.1.1

* chore(workspaces): nohoist @babel to fix missing dep @babel/traverse error

* test: update unit test for jest 28

* test(lib-storage): speed up assertion of 5MB buffer
@srchase srchase requested review from a team as code owners April 17, 2023 20:52
Comment on lines +29 to +30
"@smithy-io/protocol-http": "workspace:^",
"@smithy-io/types": "workspace:^",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some questions:

  • What's the @smithy-io npm namespace? Could we make sure we move all the ssdk server dependencies as well?
  • Do we need to add permissions and modify the MCMs to publish to it?

srchase pushed a commit that referenced this pull request Apr 26, 2023
Sometimes yarn/npm will install different version of protocol-http
package under individual clients and root node_modules because of
hoisting policy. Private class member will block the ts compiling

Reference: microsoft/TypeScript#18499
@srchase srchase closed this May 1, 2023
@kuhe kuhe deleted the yarn-versioning branch May 13, 2025 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.