Skip to content

Commit

Permalink
fix(packages): fix migrated package imports (#4990)
Browse files Browse the repository at this point in the history
  • Loading branch information
srchase authored Jul 20, 2023
1 parent bb2232f commit d800f78
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions UPGRADING.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ This list is indexed by [v2 config parameters](https://docs.aws.amazon.com/AWSJa
```javascript
const { Agent } = require("https");
const { Agent: HttpAgent } = require("http");
const { NodeHttpHandler } = require("@aws-sdk/node-http-handler");
const { NodeHttpHandler } = require("@smithy/node-http-handler");
const dynamodbClient = new DynamoDBClient({
requestHandler: new NodeHttpHandler({
httpsAgent: new Agent({
Expand All @@ -74,7 +74,7 @@ This list is indexed by [v2 config parameters](https://docs.aws.amazon.com/AWSJa

```javascript
const { Agent } = require("http");
const { NodeHttpHandler } = require("@aws-sdk/node-http-handler");
const { NodeHttpHandler } = require("@smithy/node-http-handler");

const dynamodbClient = new DynamoDBClient({
requestHandler: new NodeHttpHandler({
Expand All @@ -90,7 +90,7 @@ This list is indexed by [v2 config parameters](https://docs.aws.amazon.com/AWSJa
reference for FetchHttpHandler](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/classes/_aws_sdk_fetch_http_handler.fetchhttphandler-1.html).

```javascript
const { FetchHttpHandler } = require("@aws-sdk/fetch-http-handler");
const { FetchHttpHandler } = require("@smithy/fetch-http-handler");
const dynamodbClient = new DynamoDBClient({
requestHandler: new FetchHttpHandler({
requestTimeout: /*number in milliseconds*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types="mocha" />
import { HttpRequest } from "@aws-sdk/protocol-http";
import { SerializeMiddleware } from "@aws-sdk/types";
import { HttpRequest } from "@smithy/protocol-http";
import { SerializeMiddleware } from "@smithy/types";
import { expect } from "chai";

import { LexRuntimeService } from "../src/LexRuntimeService";
Expand Down
4 changes: 2 additions & 2 deletions clients/client-mediastore-data/test/MediaStoreData.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/// <reference types="mocha" />
import { HttpRequest } from "@aws-sdk/protocol-http";
import { SerializeMiddleware } from "@aws-sdk/types";
import { HttpRequest } from "@smithy/protocol-http";
import { SerializeMiddleware } from "@smithy/types";
import { expect } from "chai";

import { MediaStoreData } from "../src/MediaStoreData";
Expand Down
2 changes: 1 addition & 1 deletion clients/client-s3/src/runtimeConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import packageInfo from "../package.json"; // eslint-disable-line

import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
import { readableStreamHasher as streamHasher } from "@aws-sdk/hash-stream-node";
import { NODE_USE_ARN_REGION_CONFIG_OPTIONS } from "@aws-sdk/middleware-bucket-endpoint";
import { ChecksumConstructor as __ChecksumConstructor, HashConstructor as __HashConstructor } from "@aws-sdk/types";
import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
Expand All @@ -16,6 +15,7 @@ import {
} from "@smithy/config-resolver";
import { eventStreamSerdeProvider } from "@smithy/eventstream-serde-node";
import { Hash } from "@smithy/hash-node";
import { readableStreamHasher as streamHasher } from "@smithy/hash-stream-node";
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@smithy/middleware-retry";
import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider";
import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,23 +113,23 @@ public Map<String, Consumer<TypeScriptWriter>> getRuntimeConfigWriters(
"streamHasher", writer -> {
writer.addDependency(AwsDependency.STREAM_HASHER_NODE);
writer.addImport("readableStreamHasher", "streamHasher",
AwsDependency.STREAM_HASHER_NODE.packageName);
TypeScriptDependency.STREAM_HASHER_NODE);
writer.write("streamHasher");
},
"md5", writer -> {
writer.addDependency(TypeScriptDependency.AWS_SDK_TYPES);
writer.addImport("HashConstructor", "__HashConstructor",
TypeScriptDependency.AWS_SDK_TYPES.packageName);
TypeScriptDependency.AWS_SDK_TYPES);
writer.addImport("ChecksumConstructor", "__ChecksumConstructor",
TypeScriptDependency.AWS_SDK_TYPES.packageName);
TypeScriptDependency.AWS_SDK_TYPES);
writer.write("Hash.bind(null, \"md5\")");
},
"sha1", writer -> {
writer.addDependency(TypeScriptDependency.AWS_SDK_TYPES);
writer.addImport("HashConstructor", "__HashConstructor",
TypeScriptDependency.AWS_SDK_TYPES.packageName);
TypeScriptDependency.AWS_SDK_TYPES);
writer.addImport("ChecksumConstructor", "__ChecksumConstructor",
TypeScriptDependency.AWS_SDK_TYPES.packageName);
TypeScriptDependency.AWS_SDK_TYPES);
writer.write("Hash.bind(null, \"sha1\")");
}
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { toUint8Array } from "@aws-sdk/util-utf8/src";
import { toUint8Array } from "@smithy/util-utf8";

import { stringHasher } from "./stringHasher";

Expand Down
4 changes: 2 additions & 2 deletions tests/endpoints-2.0/endpoints-integration.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { resolveParams } from "@aws-sdk/middleware-endpoint";
import { EndpointParameters, EndpointV2 } from "@aws-sdk/types";
import { resolveParams } from "@smithy/middleware-endpoint";
import { EndpointParameters, EndpointV2 } from "@smithy/types";
import * as fs from "fs";
import * as path from "path";

Expand Down
2 changes: 1 addition & 1 deletion tests/endpoints-2.0/integration-test-types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { EndpointParameterInstructionsSupplier } from "@aws-sdk/middleware-endpoint";
import { EndpointParameterInstructionsSupplier } from "@smithy/middleware-endpoint";

export interface EndpointTestCase {
documentation?: string;
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
gensync "^1.0.0-beta.2"
json5 "^2.2.2"

"@babel/generator@^7.22.5", "@babel/generator@^7.22.7", "@babel/generator@^7.7.2":
"@babel/generator@^7.22.5", "@babel/generator@^7.7.2":
version "7.22.7"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.7.tgz#a6b8152d5a621893f2c9dacf9a4e286d520633d5"
integrity sha512-p+jPjMG+SI8yvIaxGgeW24u7q9+5+TGpZh8/CuB7RhBKd7RCy8FayNEFNNKrNK/eUcY/4ExQqLmyrvBXKsIcwQ==
Expand Down

0 comments on commit d800f78

Please sign in to comment.