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
6 changes: 6 additions & 0 deletions .changeset/pretty-cows-remember.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@smithy/middleware-retry": minor
"@smithy/core": minor
---

Replace 'uuid' with '@smithy/uuid'
5 changes: 2 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,8 @@
"@smithy/util-middleware": "workspace:^",
"@smithy/util-stream": "workspace:^",
"@smithy/util-utf8": "workspace:^",
"@types/uuid": "^9.0.1",
"tslib": "^2.6.2",
"uuid": "^9.0.1"
"@smithy/uuid": "workspace:^",
"tslib": "^2.6.2"
},
"engines": {
"node": ">=18.0.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { v4 as generateIdempotencyToken } from "uuid";
import { v4 as generateIdempotencyToken } from "@smithy/uuid";

export { generateIdempotencyToken };
5 changes: 2 additions & 3 deletions packages/middleware-retry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@
"@smithy/types": "workspace:^",
"@smithy/util-middleware": "workspace:^",
"@smithy/util-retry": "workspace:^",
"@types/uuid": "^9.0.1",
"tslib": "^2.6.2",
"uuid": "^9.0.1"
"@smithy/uuid": "workspace:^",
"tslib": "^2.6.2"
},
"devDependencies": {
"@smithy/util-test": "workspace:^",
Expand Down
4 changes: 2 additions & 2 deletions packages/middleware-retry/src/StandardRetryStrategy.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
RETRY_MODES,
THROTTLING_RETRY_DELAY_BASE,
} from "@smithy/util-retry";
import { v4 } from "uuid";
import { v4 } from "@smithy/uuid";
import { afterEach, beforeEach, describe, expect, test as it, vi } from "vitest";

import { getDefaultRetryQuota } from "./defaultRetryQuota";
Expand All @@ -21,7 +21,7 @@ vi.mock("./delayDecider");
vi.mock("./retryDecider");
vi.mock("./defaultRetryQuota");
vi.mock("@smithy/protocol-http");
vi.mock("uuid");
vi.mock("@smithy/uuid");

describe("defaultStrategy", () => {
let next: any; // variable for next mock function in utility methods
Expand Down
2 changes: 1 addition & 1 deletion packages/middleware-retry/src/StandardRetryStrategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
RETRY_MODES,
THROTTLING_RETRY_DELAY_BASE,
} from "@smithy/util-retry";
import { v4 } from "uuid";
import { v4 } from "@smithy/uuid";

import { getDefaultRetryQuota } from "./defaultRetryQuota";
import { defaultDelayDecider } from "./delayDecider";
Expand Down
4 changes: 2 additions & 2 deletions packages/middleware-retry/src/retryMiddleware.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import { HttpRequest, HttpResponse } from "@smithy/protocol-http";
import { isServerError, isThrottlingError, isTransientError } from "@smithy/service-error-classification";
import type { FinalizeHandlerArguments, HandlerExecutionContext, MiddlewareStack } from "@smithy/types";
import { INVOCATION_ID_HEADER, REQUEST_HEADER } from "@smithy/util-retry";
import { v4 } from "uuid";
import { v4 } from "@smithy/uuid";
import { afterEach, beforeEach, describe, expect, test as it, vi } from "vitest";

import { getRetryPlugin, retryMiddleware, retryMiddlewareOptions } from "./retryMiddleware";

vi.mock("@smithy/service-error-classification");
vi.mock("@smithy/protocol-http");
vi.mock("uuid");
vi.mock("@smithy/uuid");

describe(getRetryPlugin.name, () => {
const mockClientStack = {
Expand Down
2 changes: 1 addition & 1 deletion packages/middleware-retry/src/retryMiddleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import type {
SdkError,
} from "@smithy/types";
import { INVOCATION_ID_HEADER, REQUEST_HEADER } from "@smithy/util-retry";
import { v4 } from "uuid";
import { v4 } from "@smithy/uuid";

import type { RetryResolvedConfig } from "./configurations";
import { isStreamingPayload } from "./isStreamingPayload/isStreamingPayload";
Expand Down
24 changes: 3 additions & 21 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2329,15 +2329,14 @@ __metadata:
"@smithy/util-middleware": "workspace:^"
"@smithy/util-stream": "workspace:^"
"@smithy/util-utf8": "workspace:^"
"@smithy/uuid": "workspace:^"
"@types/node": "npm:^18.11.9"
"@types/uuid": "npm:^9.0.1"
concurrently: "npm:7.0.0"
downlevel-dts: "npm:0.10.1"
json-bigint: "npm:^1.0.0"
rimraf: "npm:3.0.2"
tslib: "npm:^2.6.2"
typedoc: "npm:0.23.23"
uuid: "npm:^9.0.1"
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -2655,13 +2654,12 @@ __metadata:
"@smithy/util-middleware": "workspace:^"
"@smithy/util-retry": "workspace:^"
"@smithy/util-test": "workspace:^"
"@types/uuid": "npm:^9.0.1"
"@smithy/uuid": "workspace:^"
concurrently: "npm:7.0.0"
downlevel-dts: "npm:0.10.1"
rimraf: "npm:3.0.2"
tslib: "npm:^2.6.2"
typedoc: "npm:0.23.23"
uuid: "npm:^9.0.1"
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -3283,7 +3281,7 @@ __metadata:
languageName: unknown
linkType: soft

"@smithy/uuid@workspace:packages/uuid":
"@smithy/uuid@workspace:^, @smithy/uuid@workspace:packages/uuid":
version: 0.0.0-use.local
resolution: "@smithy/uuid@workspace:packages/uuid"
dependencies:
Expand Down Expand Up @@ -3563,13 +3561,6 @@ __metadata:
languageName: node
linkType: hard

"@types/uuid@npm:^9.0.1":
version: 9.0.8
resolution: "@types/uuid@npm:9.0.8"
checksum: 10c0/b411b93054cb1d4361919579ef3508a1f12bf15b5fdd97337d3d351bece6c921b52b6daeef89b62340fd73fd60da407878432a1af777f40648cbe53a01723489
languageName: node
linkType: hard

"@types/yargs-parser@npm:*":
version: 21.0.0
resolution: "@types/yargs-parser@npm:21.0.0"
Expand Down Expand Up @@ -10786,15 +10777,6 @@ __metadata:
languageName: node
linkType: hard

"uuid@npm:^9.0.1":
version: 9.0.1
resolution: "uuid@npm:9.0.1"
bin:
uuid: dist/bin/uuid
checksum: 10c0/1607dd32ac7fc22f2d8f77051e6a64845c9bce5cd3dd8aa0070c074ec73e666a1f63c7b4e0f4bf2bc8b9d59dc85a15e17807446d9d2b17c8485fbc2147b27f9b
languageName: node
linkType: hard

"v8-to-istanbul@npm:^9.0.1":
version: 9.1.0
resolution: "v8-to-istanbul@npm:9.1.0"
Expand Down
Loading