Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
49 changes: 49 additions & 0 deletions .changeset/slow-flowers-hang.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
"@smithy/service-client-documentation-generator": patch
"@smithy/eventstream-serde-config-resolver": patch
"@smithy/experimental-identity-and-auth": patch
"@smithy/middleware-apply-body-checksum": patch
"@smithy/service-error-classification": patch
"@smithy/eventstream-serde-universal": patch
"@smithy/eventstream-serde-browser": patch
"@smithy/middleware-content-length": patch
"@smithy/credential-provider-imds": patch
"@smithy/util-defaults-mode-node": patch
"@smithy/eventstream-serde-node": patch
"@smithy/middleware-compression": patch
"@smithy/shared-ini-file-loader": patch
"@smithy/node-config-provider": patch
"@smithy/util-config-provider": patch
"@smithy/middleware-endpoint": patch
"@smithy/querystring-builder": patch
"@smithy/util-stream-browser": patch
"@smithy/fetch-http-handler": patch
"@smithy/invalid-dependency": patch
"@smithy/querystring-parser": patch
"@smithy/eventstream-codec": patch
"@smithy/hash-blob-browser": patch
"@smithy/node-http-handler": patch
"@smithy/property-provider": patch
"@smithy/hash-stream-node": patch
"@smithy/middleware-retry": patch
"@smithy/middleware-serde": patch
"@smithy/middleware-stack": patch
"@smithy/util-stream-node": patch
"@smithy/config-resolver": patch
"@smithy/util-middleware": patch
"@smithy/util-endpoints": patch
"@smithy/protocol-http": patch
"@smithy/signature-v4a": patch
"@smithy/smithy-client": patch
"@smithy/signature-v4": patch
"@smithy/util-stream": patch
"@smithy/util-waiter": patch
"@smithy/url-parser": patch
"@smithy/util-retry": patch
"@smithy/hash-node": patch
"@smithy/md5-js": patch
"@smithy/types": patch
"@smithy/core": patch
---

enforce consistent-type-imports
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,6 @@ module.exports = {

/** Errors */
"simple-import-sort/imports": "error",
"@typescript-eslint/consistent-type-imports": "error",
},
};
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LoadedConfigSelectors } from "@smithy/node-config-provider";
import type { LoadedConfigSelectors } from "@smithy/node-config-provider";
import { booleanSelector, SelectorType } from "@smithy/util-config-provider";

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LoadedConfigSelectors } from "@smithy/node-config-provider";
import type { LoadedConfigSelectors } from "@smithy/node-config-provider";
import { booleanSelector, SelectorType } from "@smithy/util-config-provider";

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Endpoint, Provider, UrlParser } from "@smithy/types";
import type { Endpoint, Provider, UrlParser } from "@smithy/types";
import { normalizeProvider } from "@smithy/util-middleware";

import { EndpointsInputConfig, EndpointsResolvedConfig } from "./resolveEndpointsConfig";
import type { EndpointsInputConfig, EndpointsResolvedConfig } from "./resolveEndpointsConfig";

/**
* @public
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Endpoint, Provider, RegionInfoProvider, UrlParser } from "@smithy/types";
import type { Endpoint, Provider, RegionInfoProvider, UrlParser } from "@smithy/types";
import { normalizeProvider } from "@smithy/util-middleware";

import { getEndpointFromRegion } from "./utils/getEndpointFromRegion";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Provider, RegionInfoProvider, UrlParser } from "@smithy/types";
import type { Provider, RegionInfoProvider, UrlParser } from "@smithy/types";

interface GetEndpointFromRegionOptions {
region: Provider<string>;
Expand Down
2 changes: 1 addition & 1 deletion packages/config-resolver/src/regionConfig/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LoadedConfigSelectors, LocalConfigOptions } from "@smithy/node-config-provider";
import type { LoadedConfigSelectors, LocalConfigOptions } from "@smithy/node-config-provider";

/**
* @internal
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Provider } from "@smithy/types";
import type { Provider } from "@smithy/types";

import { getRealRegion } from "./getRealRegion";
import { isFipsRegion } from "./isFipsRegion";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { EndpointVariantTag } from "./EndpointVariantTag";
import type { EndpointVariantTag } from "./EndpointVariantTag";

/**
* Provides hostname information for specific host label.
Expand Down
2 changes: 1 addition & 1 deletion packages/config-resolver/src/regionInfo/PartitionHash.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { EndpointVariant } from "./EndpointVariant";
import type { EndpointVariant } from "./EndpointVariant";

/**
* The hash of partition with the information specific to that partition.
Expand Down
2 changes: 1 addition & 1 deletion packages/config-resolver/src/regionInfo/RegionHash.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { EndpointVariant } from "./EndpointVariant";
import type { EndpointVariant } from "./EndpointVariant";

/**
* The hash of region with the information specific to that region.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { describe, expect, test as it } from "vitest";

import { EndpointVariant } from "./EndpointVariant";
import { getHostnameFromVariants, GetHostnameFromVariantsOptions } from "./getHostnameFromVariants";
import type { EndpointVariant } from "./EndpointVariant";
import type { GetHostnameFromVariantsOptions } from "./getHostnameFromVariants";
import { getHostnameFromVariants } from "./getHostnameFromVariants";

describe(getHostnameFromVariants.name, () => {
const getMockHostname = (options: GetHostnameFromVariantsOptions) => JSON.stringify(options);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { EndpointVariant } from "./EndpointVariant";
import type { EndpointVariant } from "./EndpointVariant";

/**
* @internal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { getRegionInfo } from "./getRegionInfo";
import { getResolvedHostname } from "./getResolvedHostname";
import { getResolvedPartition } from "./getResolvedPartition";
import { getResolvedSigningRegion } from "./getResolvedSigningRegion";
import { PartitionHash } from "./PartitionHash";
import { RegionHash } from "./RegionHash";
import type { PartitionHash } from "./PartitionHash";
import type { RegionHash } from "./RegionHash";

vi.mock("./getHostnameFromVariants");
vi.mock("./getResolvedHostname");
Expand Down
6 changes: 3 additions & 3 deletions packages/config-resolver/src/regionInfo/getRegionInfo.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { RegionInfo } from "@smithy/types";
import type { RegionInfo } from "@smithy/types";

import { getHostnameFromVariants } from "./getHostnameFromVariants";
import { getResolvedHostname } from "./getResolvedHostname";
import { getResolvedPartition } from "./getResolvedPartition";
import { getResolvedSigningRegion } from "./getResolvedSigningRegion";
import { PartitionHash } from "./PartitionHash";
import { RegionHash } from "./RegionHash";
import type { PartitionHash } from "./PartitionHash";
import type { RegionHash } from "./RegionHash";

/**
* @internal
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { describe, expect, test as it } from "vitest";

import { getResolvedPartition } from "./getResolvedPartition";
import { PartitionHash } from "./PartitionHash";
import type { PartitionHash } from "./PartitionHash";

describe(getResolvedPartition.name, () => {
const mockRegion = "mockRegion";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PartitionHash } from "./PartitionHash";
import type { PartitionHash } from "./PartitionHash";

/**
* @internal
Expand Down
3 changes: 2 additions & 1 deletion packages/core/src/getSmithyContext.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { HandlerExecutionContext, SMITHY_CONTEXT_KEY } from "@smithy/types";
import type { HandlerExecutionContext } from "@smithy/types";
import { SMITHY_CONTEXT_KEY } from "@smithy/types";

/**
* @internal
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
import type {
HandlerExecutionContext,
HttpAuthSchemeParameters,
HttpAuthSchemeParametersProvider,
Expand All @@ -8,7 +8,8 @@ import {
SerializeHandlerOptions,
} from "@smithy/types";

import { httpAuthSchemeMiddleware, PreviouslyResolved } from "./httpAuthSchemeMiddleware";
import type { PreviouslyResolved } from "./httpAuthSchemeMiddleware";
import { httpAuthSchemeMiddleware } from "./httpAuthSchemeMiddleware";

/**
* @internal
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { serializerMiddlewareOption } from "@smithy/middleware-serde";
import {
import type {
HandlerExecutionContext,
HttpAuthSchemeParameters,
HttpAuthSchemeParametersProvider,
Expand All @@ -9,7 +9,8 @@ import {
SerializeHandlerOptions,
} from "@smithy/types";

import { httpAuthSchemeMiddleware, PreviouslyResolved } from "./httpAuthSchemeMiddleware";
import type { PreviouslyResolved } from "./httpAuthSchemeMiddleware";
import { httpAuthSchemeMiddleware } from "./httpAuthSchemeMiddleware";

/**
* @internal
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {
import type {
HandlerExecutionContext,
HttpAuthScheme,
HttpAuthSchemeId,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { HttpAuthOption } from "@smithy/types";
import type { HttpAuthOption } from "@smithy/types";
import { describe, expect, it } from "vitest";

import { resolveAuthOptions } from "./resolveAuthOptions";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { HttpAuthOption } from "@smithy/types";
import type { HttpAuthOption } from "@smithy/types";

/**
* Resolves list of auth options based on the supported ones, vs the preference list.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FinalizeRequestHandlerOptions, Pluggable, RelativeMiddlewareOptions } from "@smithy/types";
import type { FinalizeRequestHandlerOptions, Pluggable, RelativeMiddlewareOptions } from "@smithy/types";

import { httpSigningMiddleware } from "./httpSigningMiddleware";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import { HttpRequest } from "@smithy/protocol-http";
import {
import type {
ErrorHandler,
FinalizeHandler,
FinalizeHandlerArguments,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/normalizeProvider.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Provider } from "@smithy/types";
import type { Provider } from "@smithy/types";

/**
* @internal
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/pagination/createPaginator.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PaginationConfiguration } from "@smithy/types";
import type { PaginationConfiguration } from "@smithy/types";
import { afterEach, describe, expect, test as it, vi } from "vitest";

import { createPaginator } from "./createPaginator";
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/setFeature.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { HandlerExecutionContext } from "@smithy/types";
import type { HandlerExecutionContext } from "@smithy/types";
import { describe, expect, test as it } from "vitest";

import { setFeature } from "./setFeature";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { error, list, map, op, SCHEMA, struct, TypeRegistry } from "@smithy/core/schema";
import { HttpRequest, HttpResponse } from "@smithy/protocol-http";
import { ResponseMetadata, RetryableTrait, SchemaRef } from "@smithy/types";
import type { ResponseMetadata, RetryableTrait, SchemaRef } from "@smithy/types";
import { beforeEach, describe, expect, test as it } from "vitest";

import { cbor } from "./cbor";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { RpcProtocol } from "@smithy/core/protocols";
import { deref, ErrorSchema, NormalizedSchema, OperationSchema, TypeRegistry } from "@smithy/core/schema";
import type { ErrorSchema, OperationSchema } from "@smithy/core/schema";
import { deref, NormalizedSchema, TypeRegistry } from "@smithy/core/schema";
import type {
EndpointBearer,
HandlerExecutionContext,
Expand Down
14 changes: 8 additions & 6 deletions packages/core/src/submodules/cbor/cbor-decode.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
import { nv } from "@smithy/core/serde";
import { toUtf8 } from "@smithy/util-utf8";

import {
alloc,
import type {
CborArgumentLength,
CborArgumentLengthOffset,
CborListType,
CborMapType,
CborOffset,
CborUnstructuredByteStringType,
CborValueType,
Float32,
Uint8,
Uint32,
Uint64,
} from "./cbor-types";
import {
alloc,
extendedFloat16,
extendedFloat32,
extendedFloat64,
extendedOneByte,
Float32,
majorList,
majorMap,
majorNegativeInt64,
Expand All @@ -28,9 +33,6 @@ import {
specialTrue,
specialUndefined,
tag,
Uint8,
Uint32,
Uint64,
} from "./cbor-types";

const USE_TEXT_DECODER = typeof TextDecoder !== "undefined";
Expand Down
3 changes: 1 addition & 2 deletions packages/core/src/submodules/cbor/cbor-encode.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { NumericValue } from "@smithy/core/serde";
import { fromUtf8 } from "@smithy/util-utf8";

import type { CborMajorType, Uint64 } from "./cbor-types";
import {
alloc,
CborMajorType,
extendedFloat16,
extendedFloat32,
extendedFloat64,
Expand All @@ -19,7 +19,6 @@ import {
specialNull,
specialTrue,
tagSymbol,
Uint64,
} from "./cbor-types";

const USE_BUFFER = typeof Buffer !== "undefined";
Expand Down
3 changes: 2 additions & 1 deletion packages/core/src/submodules/cbor/parseCborBody.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import type {
import { calculateBodyLength } from "@smithy/util-body-length-browser";

import { cbor } from "./cbor";
import { tag, tagSymbol } from "./cbor-types";
import type { tagSymbol } from "./cbor-types";
import { tag } from "./cbor-types";

/**
* @internal
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { cbor, CborCodec, dateToTag } from "@smithy/core/cbor";
import { NormalizedSchema, SCHEMA, sim, struct } from "@smithy/core/schema";
import { EventStreamMarshaller } from "@smithy/eventstream-serde-node";
import { HttpResponse } from "@smithy/protocol-http";
import { Message as EventMessage } from "@smithy/types";
import type { Message as EventMessage } from "@smithy/types";
import { fromUtf8, toUtf8 } from "@smithy/util-utf8";
import { describe, expect, test as it } from "vitest";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { NormalizedSchema, SCHEMA } from "@smithy/core/schema";
import type { NormalizedSchema } from "@smithy/core/schema";
import { SCHEMA } from "@smithy/core/schema";
import type {
EventStreamMarshaller,
HttpRequest as IHttpRequest,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SerdeContext } from "@smithy/types";
import type { SerdeContext } from "@smithy/types";
import { Uint8ArrayBlobAdapter } from "@smithy/util-stream";

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { NormalizedSchema, SCHEMA } from "@smithy/core/schema";
import type { NormalizedSchema } from "@smithy/core/schema";
import { SCHEMA } from "@smithy/core/schema";
import type {
CodecSettings,
TimestampDateTimeSchema,
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/submodules/schema/TypeRegistry.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Schema as ISchema } from "@smithy/types";

import { ErrorSchema } from "./schemas/ErrorSchema";
import type { ErrorSchema } from "./schemas/ErrorSchema";

/**
* A way to look up schema by their ShapeId values.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type {
SerializeHandlerOptions,
} from "@smithy/types";

import { PreviouslyResolved } from "./schema-middleware-types";
import type { PreviouslyResolved } from "./schema-middleware-types";
import { schemaDeserializationMiddleware } from "./schemaDeserializationMiddleware";
import { schemaSerializationMiddleware } from "./schemaSerializationMiddleware";

Expand Down
Loading
Loading