From 5787602b24db9a8b610a13477a214ee8738d9990 Mon Sep 17 00:00:00 2001 From: chradek <51000525+chradek@users.noreply.github.com> Date: Mon, 23 Aug 2021 18:50:39 -0700 Subject: [PATCH] [event-hubs] fix IoT Connection string sample (#16945) --- sdk/eventhub/event-hubs/package.json | 3 +++ .../event-hubs/samples-dev/iothubConnectionString.ts | 2 +- sdk/eventhub/event-hubs/samples/v5/javascript/package.json | 4 ++-- sdk/eventhub/event-hubs/samples/v5/typescript/package.json | 5 +++-- .../samples/v5/typescript/src/iothubConnectionString.ts | 2 +- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/sdk/eventhub/event-hubs/package.json b/sdk/eventhub/event-hubs/package.json index 2cd6e37460ae..38fe56bbe635 100644 --- a/sdk/eventhub/event-hubs/package.json +++ b/sdk/eventhub/event-hubs/package.json @@ -82,6 +82,9 @@ ] }, "//sampleConfiguration": { + "dependencyOverrides": { + "@azure/identity": "^1.5.1" + }, "extraFiles": { "./samples-browser": [ "browser" diff --git a/sdk/eventhub/event-hubs/samples-dev/iothubConnectionString.ts b/sdk/eventhub/event-hubs/samples-dev/iothubConnectionString.ts index 65de46db56df..c444d2caecac 100644 --- a/sdk/eventhub/event-hubs/samples-dev/iothubConnectionString.ts +++ b/sdk/eventhub/event-hubs/samples-dev/iothubConnectionString.ts @@ -15,7 +15,7 @@ import * as crypto from "crypto"; import { Buffer } from "buffer"; import { AmqpError, Connection, ReceiverEvents, parseConnectionString } from "rhea-promise"; -import rheaPromise from "rhea-promise"; +import * as rheaPromise from "rhea-promise"; import { EventHubConsumerClient, earliestEventPosition } from "@azure/event-hubs"; // Load the .env file if it exists diff --git a/sdk/eventhub/event-hubs/samples/v5/javascript/package.json b/sdk/eventhub/event-hubs/samples/v5/javascript/package.json index dcc07913380a..e40c8ea41c41 100644 --- a/sdk/eventhub/event-hubs/samples/v5/javascript/package.json +++ b/sdk/eventhub/event-hubs/samples/v5/javascript/package.json @@ -27,8 +27,8 @@ "dependencies": { "@azure/event-hubs": "latest", "dotenv": "latest", - "rhea-promise": "^2.0.0", - "@azure/identity": "2.0.0-beta.5", + "rhea-promise": "^2.1.0", + "@azure/identity": "^1.5.1", "ws": "^7.1.1", "https-proxy-agent": "^5.0.0" } diff --git a/sdk/eventhub/event-hubs/samples/v5/typescript/package.json b/sdk/eventhub/event-hubs/samples/v5/typescript/package.json index a8dd00775b43..62214facc802 100644 --- a/sdk/eventhub/event-hubs/samples/v5/typescript/package.json +++ b/sdk/eventhub/event-hubs/samples/v5/typescript/package.json @@ -31,12 +31,13 @@ "dependencies": { "@azure/event-hubs": "latest", "dotenv": "latest", - "rhea-promise": "^2.0.0", - "@azure/identity": "2.0.0-beta.5", + "rhea-promise": "^2.1.0", + "@azure/identity": "^1.5.1", "ws": "^7.1.1", "https-proxy-agent": "^5.0.0" }, "devDependencies": { + "@types/ws": "^7.2.4", "typescript": "~4.2.0", "rimraf": "latest" } diff --git a/sdk/eventhub/event-hubs/samples/v5/typescript/src/iothubConnectionString.ts b/sdk/eventhub/event-hubs/samples/v5/typescript/src/iothubConnectionString.ts index 65de46db56df..c444d2caecac 100644 --- a/sdk/eventhub/event-hubs/samples/v5/typescript/src/iothubConnectionString.ts +++ b/sdk/eventhub/event-hubs/samples/v5/typescript/src/iothubConnectionString.ts @@ -15,7 +15,7 @@ import * as crypto from "crypto"; import { Buffer } from "buffer"; import { AmqpError, Connection, ReceiverEvents, parseConnectionString } from "rhea-promise"; -import rheaPromise from "rhea-promise"; +import * as rheaPromise from "rhea-promise"; import { EventHubConsumerClient, earliestEventPosition } from "@azure/event-hubs"; // Load the .env file if it exists