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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/wild-papayas-rest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@smithy/core": patch
---

export surface equality for core, Node.js/browser/react-native
68 changes: 34 additions & 34 deletions api-snapshot/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@
"@smithy/core/checksum": {
"blobHasher": "function",
"blobReader": "function",
"fileStreamHasher": "function",
"fileStreamHasher": "function(node-only)",
"Md5": "function",
"readableStreamHasher": "function"
"readableStreamHasher": "function(node-only)"
},
"@smithy/core/client": {
"_json": "function",
Expand Down Expand Up @@ -165,9 +165,9 @@
"@smithy/core/config": {
"booleanSelector": "function",
"chain": "function",
"CONFIG_PREFIX_SEPARATOR": "string",
"CONFIG_USE_DUALSTACK_ENDPOINT": "string",
"CONFIG_USE_FIPS_ENDPOINT": "string",
"CONFIG_PREFIX_SEPARATOR": "string(node-only)",
"CONFIG_USE_DUALSTACK_ENDPOINT": "string(node-only)",
"CONFIG_USE_FIPS_ENDPOINT": "string(node-only)",
"CredentialsProviderError": "function",
"CustomEndpointsInputConfig": "type(interface)",
"CustomEndpointsResolvedConfig": "type(interface)",
Expand All @@ -178,45 +178,45 @@
"EndpointsResolvedConfig": "type(interface)",
"EndpointVariant": "type(object)",
"EndpointVariantTag": "type(union)",
"ENV_PROFILE": "string",
"ENV_USE_DUALSTACK_ENDPOINT": "string",
"ENV_USE_FIPS_ENDPOINT": "string",
"ENV_PROFILE": "string(node-only)",
"ENV_USE_DUALSTACK_ENDPOINT": "string(node-only)",
"ENV_USE_FIPS_ENDPOINT": "string(node-only)",
"EnvOptions": "type(interface)",
"externalDataInterceptor": "object",
"fromStatic": "function",
"externalDataInterceptor": "object(node-only)",
"fromStatic": "function(node-only)",
"fromValue": "function",
"getHomeDir": "function",
"getProfileName": "function",
"getHomeDir": "function(node-only)",
"getProfileName": "function(node-only)",
"getRegionInfo": "function",
"GetRegionInfoOptions": "type(interface)",
"getSSOTokenFilepath": "function",
"getSSOTokenFromFile": "function",
"getSSOTokenFilepath": "function(node-only)",
"getSSOTokenFromFile": "function(node-only)",
"GetterFromConfig": "type(object)",
"GetterFromEnv": "type(object)",
"loadConfig": "function",
"loadConfig": "function(node-only)",
"LoadedConfigSelectors": "type(interface)",
"loadSharedConfigFiles": "function",
"loadSsoSessionData": "function",
"loadSharedConfigFiles": "function(node-only)",
"loadSsoSessionData": "function(node-only)",
"LocalConfigOptions": "type(intersection)",
"memoize": "function",
"NODE_REGION_CONFIG_FILE_OPTIONS": "object",
"NODE_REGION_CONFIG_OPTIONS": "object",
"NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS": "object",
"NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS": "object",
"nodeDualstackConfigSelectors": "object",
"nodeFipsConfigSelectors": "object",
"NODE_REGION_CONFIG_FILE_OPTIONS": "object(node-only)",
"NODE_REGION_CONFIG_OPTIONS": "object(node-only)",
"NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS": "object(node-only)",
"NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS": "object(node-only)",
"nodeDualstackConfigSelectors": "object(node-only)",
"nodeFipsConfigSelectors": "object(node-only)",
"NodeSharedConfigInit": "type(interface)",
"numberSelector": "function",
"ParsedIniData": "type(object)",
"parseKnownFiles": "function",
"parseKnownFiles": "function(node-only)",
"PartitionHash": "type(object)",
"Profile": "type(object)",
"ProviderError": "function",
"ProviderErrorOptionsType": "type(object)",
"readFile": "function",
"readFile": "function(node-only)",
"ReadFileOptions": "type(interface)",
"REGION_ENV_NAME": "string",
"REGION_INI_NAME": "string",
"REGION_ENV_NAME": "string(node-only)",
"REGION_INI_NAME": "string(node-only)",
"RegionHash": "type(object)",
"RegionInputConfig": "type(interface)",
"RegionResolvedConfig": "type(interface)",
Expand Down Expand Up @@ -370,8 +370,8 @@
"@smithy/core/retry": {
"AdaptiveRetryStrategy": "function",
"AdaptiveRetryStrategyOptions": "type(interface)",
"CONFIG_MAX_ATTEMPTS": "string",
"CONFIG_RETRY_MODE": "string",
"CONFIG_MAX_ATTEMPTS": "string(node-only)",
"CONFIG_RETRY_MODE": "string(node-only)",
"ConfiguredRetryStrategy": "function",
"DEFAULT_MAX_ATTEMPTS": "number",
"DEFAULT_RETRY_DELAY_BASE": "number",
Expand All @@ -384,8 +384,8 @@
"DeprecatedAdaptiveRetryStrategyOptions": "type(interface)",
"DeprecatedStandardRetryStrategy": "function",
"DeprecatedStandardRetryStrategyOptions": "type(interface)",
"ENV_MAX_ATTEMPTS": "string",
"ENV_RETRY_MODE": "string",
"ENV_MAX_ATTEMPTS": "string(node-only)",
"ENV_RETRY_MODE": "string(node-only)",
"getOmitRetryHeadersPlugin": "function",
"getRetryAfterHint": "function",
"getRetryPlugin": "function",
Expand All @@ -401,8 +401,8 @@
"isTransientError": "function",
"MAXIMUM_RETRY_DELAY": "number",
"NO_RETRY_INCREMENT": "number",
"NODE_MAX_ATTEMPT_CONFIG_OPTIONS": "object",
"NODE_RETRY_MODE_CONFIG_OPTIONS": "object",
"NODE_MAX_ATTEMPT_CONFIG_OPTIONS": "object(node-only)",
"NODE_RETRY_MODE_CONFIG_OPTIONS": "object(node-only)",
"omitRetryHeadersMiddleware": "function",
"omitRetryHeadersMiddlewareOptions": "object",
"PreviouslyResolved": "type(interface)",
Expand Down Expand Up @@ -485,7 +485,7 @@
"getAwsChunkedEncodingStream": "function",
"getSerdePlugin": "function",
"handleFloat": "function",
"Hash": "function",
"Hash": "function(node-only)",
"headStream": "function",
"isArrayBuffer": "function",
"isBlob": "function",
Expand Down
6 changes: 6 additions & 0 deletions packages/core/src/submodules/checksum/index.browser.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
const no = Symbol.for("node-only");

// @smithy/hash-blob-browser
export { blobHasher } from "./hash-blob-browser/blobHasher";

// @smithy/hash-stream-node
export const fileStreamHasher = no;
export const readableStreamHasher = no;

// @smithy/md5-js
export { Md5 } from "./md5-js/md5";

Expand Down
6 changes: 6 additions & 0 deletions packages/core/src/submodules/checksum/index.native.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
const no = Symbol.for("node-only");

// @smithy/hash-blob-browser
export { blobHasher } from "./hash-blob-browser/blobHasher";

// @smithy/hash-stream-node
export const fileStreamHasher = no;
export const readableStreamHasher = no;

// @smithy/md5-js
export { Md5 } from "./md5-js/md5";

Expand Down
43 changes: 43 additions & 0 deletions packages/core/src/submodules/config/index.browser.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const no = Symbol.for("node-only");

// @smithy/property-provider
export { ProviderError, type ProviderErrorOptionsType } from "./property-provider/ProviderError";
export { CredentialsProviderError } from "./property-provider/CredentialsProviderError";
Expand All @@ -11,7 +13,44 @@ export { booleanSelector } from "./util-config-provider/booleanSelector";
export { numberSelector } from "./util-config-provider/numberSelector";
export { SelectorType } from "./util-config-provider/types";

// @smithy/shared-ini-file-loader
export const getHomeDir = no;
export const ENV_PROFILE = no;
export const DEFAULT_PROFILE = "default";
export const getProfileName = no;
export const getSSOTokenFilepath = no;
export const getSSOTokenFromFile = no;
export const CONFIG_PREFIX_SEPARATOR = no;
export const loadSharedConfigFiles = no;
export const loadSsoSessionData = no;
export const parseKnownFiles = no;
export const externalDataInterceptor = no;
export const readFile = no;
export type { SSOToken } from "./shared-ini-file-loader/getSSOTokenFromFile";
export type { SharedConfigInit } from "./shared-ini-file-loader/loadSharedConfigFiles";
export type { SsoSessionInit } from "./shared-ini-file-loader/loadSsoSessionData";
export type { SourceProfileInit } from "./shared-ini-file-loader/parseKnownFiles";
export type { Profile, ParsedIniData, SharedConfigFiles } from "./shared-ini-file-loader/types";
export type { ReadFileOptions } from "./shared-ini-file-loader/readFile";

// @smithy/node-config-provider
export const loadConfig = no;
export const fromStatic = no;
export type { LocalConfigOptions, LoadedConfigSelectors } from "./node-config-provider/configLoader";
export type { EnvOptions, GetterFromEnv } from "./node-config-provider/fromEnv";
export type { NodeSharedConfigInit, GetterFromConfig } from "./node-config-provider/fromSharedConfigFiles";

// @smithy/config-resolver
export const ENV_USE_DUALSTACK_ENDPOINT = no;
export const CONFIG_USE_DUALSTACK_ENDPOINT = no;
export const DEFAULT_USE_DUALSTACK_ENDPOINT = false;
export const NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = no;
export const nodeDualstackConfigSelectors = no;
export const ENV_USE_FIPS_ENDPOINT = no;
export const CONFIG_USE_FIPS_ENDPOINT = no;
export const DEFAULT_USE_FIPS_ENDPOINT = false;
export const NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = no;
export const nodeFipsConfigSelectors = no;
export {
resolveCustomEndpointsConfig,
type CustomEndpointsInputConfig,
Expand All @@ -24,6 +63,10 @@ export {
} from "./config-resolver/endpointsConfig/resolveEndpointsConfig";

// @smithy/config-resolver
export const REGION_ENV_NAME = no;
export const REGION_INI_NAME = no;
export const NODE_REGION_CONFIG_OPTIONS = no;
export const NODE_REGION_CONFIG_FILE_OPTIONS = no;
export {
resolveRegionConfig,
type RegionInputConfig,
Expand Down
43 changes: 43 additions & 0 deletions packages/core/src/submodules/config/index.native.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const no = Symbol.for("node-only");

// @smithy/property-provider
export { ProviderError, type ProviderErrorOptionsType } from "./property-provider/ProviderError";
export { CredentialsProviderError } from "./property-provider/CredentialsProviderError";
Expand All @@ -11,7 +13,44 @@ export { booleanSelector } from "./util-config-provider/booleanSelector";
export { numberSelector } from "./util-config-provider/numberSelector";
export { SelectorType } from "./util-config-provider/types";

// @smithy/shared-ini-file-loader
export const getHomeDir = no;
export const ENV_PROFILE = no;
export const DEFAULT_PROFILE = "default";
export const getProfileName = no;
export const getSSOTokenFilepath = no;
export const getSSOTokenFromFile = no;
export const CONFIG_PREFIX_SEPARATOR = no;
export const loadSharedConfigFiles = no;
export const loadSsoSessionData = no;
export const parseKnownFiles = no;
export const externalDataInterceptor = no;
export const readFile = no;
export type { SSOToken } from "./shared-ini-file-loader/getSSOTokenFromFile";
export type { SharedConfigInit } from "./shared-ini-file-loader/loadSharedConfigFiles";
export type { SsoSessionInit } from "./shared-ini-file-loader/loadSsoSessionData";
export type { SourceProfileInit } from "./shared-ini-file-loader/parseKnownFiles";
export type { Profile, ParsedIniData, SharedConfigFiles } from "./shared-ini-file-loader/types";
export type { ReadFileOptions } from "./shared-ini-file-loader/readFile";

// @smithy/node-config-provider
export const loadConfig = no;
export const fromStatic = no;
export type { LocalConfigOptions, LoadedConfigSelectors } from "./node-config-provider/configLoader";
export type { EnvOptions, GetterFromEnv } from "./node-config-provider/fromEnv";
export type { NodeSharedConfigInit, GetterFromConfig } from "./node-config-provider/fromSharedConfigFiles";

// @smithy/config-resolver
export const ENV_USE_DUALSTACK_ENDPOINT = no;
export const CONFIG_USE_DUALSTACK_ENDPOINT = no;
export const DEFAULT_USE_DUALSTACK_ENDPOINT = false;
export const NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = no;
export const nodeDualstackConfigSelectors = no;
export const ENV_USE_FIPS_ENDPOINT = no;
export const CONFIG_USE_FIPS_ENDPOINT = no;
export const DEFAULT_USE_FIPS_ENDPOINT = false;
export const NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = no;
export const nodeFipsConfigSelectors = no;
export {
resolveCustomEndpointsConfig,
type CustomEndpointsInputConfig,
Expand All @@ -24,6 +63,10 @@ export {
} from "./config-resolver/endpointsConfig/resolveEndpointsConfig";

// @smithy/config-resolver
export const REGION_ENV_NAME = no;
export const REGION_INI_NAME = no;
export const NODE_REGION_CONFIG_OPTIONS = no;
export const NODE_REGION_CONFIG_FILE_OPTIONS = no;
export {
resolveRegionConfig,
type RegionInputConfig,
Expand Down
18 changes: 9 additions & 9 deletions packages/core/src/submodules/retry/index.browser.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const no = Symbol.for("node-only");

// @smithy/service-error-classification
export {
isRetryableByTrait,
Expand Down Expand Up @@ -41,15 +43,13 @@ export {
} from "./middleware-retry/retry-pre-sra-deprecated/StandardRetryStrategy";
export { defaultDelayDecider } from "./middleware-retry/retry-pre-sra-deprecated/delayDecider";
export { defaultRetryDecider } from "./middleware-retry/retry-pre-sra-deprecated/retryDecider";
export {
ENV_MAX_ATTEMPTS,
CONFIG_MAX_ATTEMPTS,
NODE_MAX_ATTEMPT_CONFIG_OPTIONS,
ENV_RETRY_MODE,
CONFIG_RETRY_MODE,
NODE_RETRY_MODE_CONFIG_OPTIONS,
resolveRetryConfig,
} from "./middleware-retry/configurations";
export const ENV_MAX_ATTEMPTS = no;
export const CONFIG_MAX_ATTEMPTS = no;
export const NODE_MAX_ATTEMPT_CONFIG_OPTIONS = no;
export const ENV_RETRY_MODE = no;
export const CONFIG_RETRY_MODE = no;
export const NODE_RETRY_MODE_CONFIG_OPTIONS = no;
export { resolveRetryConfig } from "./middleware-retry/configurations";
export type { RetryInputConfig, RetryResolvedConfig, PreviouslyResolved } from "./middleware-retry/configurations";
export {
omitRetryHeadersMiddleware,
Expand Down
5 changes: 5 additions & 0 deletions packages/core/src/submodules/serde/index.browser.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const no = Symbol.for("node-only");

export { copyDocumentWithTransform } from "./copyDocumentWithTransform";
export {
dateToUtcString,
Expand Down Expand Up @@ -77,6 +79,9 @@ export {
} from "./middleware-serde/serdePlugin";
export { serializerMiddleware } from "./middleware-serde/serializerMiddleware";

// @smithy/hash-node
export const Hash = no;

// @smithy/util-stream
export { Uint8ArrayBlobAdapter } from "./util-stream/blob/Uint8ArrayBlobAdapter";
export { ChecksumStream, type ChecksumStreamInit } from "./util-stream/checksum/ChecksumStream.browser";
Expand Down
5 changes: 5 additions & 0 deletions packages/core/src/submodules/serde/index.native.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const no = Symbol.for("node-only");

export { copyDocumentWithTransform } from "./copyDocumentWithTransform";
export {
dateToUtcString,
Expand Down Expand Up @@ -77,6 +79,9 @@ export {
} from "./middleware-serde/serdePlugin";
export { serializerMiddleware } from "./middleware-serde/serializerMiddleware";

// @smithy/hash-node
export const Hash = no;

// @smithy/util-stream
export { Uint8ArrayBlobAdapter } from "./util-stream/blob/Uint8ArrayBlobAdapter";
export { ChecksumStream, type ChecksumStreamInit } from "./util-stream/checksum/ChecksumStream.browser";
Expand Down
Loading
Loading