From abe3e516f83204ac235b4ec184319f6453701bc5 Mon Sep 17 00:00:00 2001 From: Alex Ghiondea Date: Fri, 11 Jan 2019 13:15:44 -0800 Subject: [PATCH] Enable the esModuleInterop compiler flag and address compiler warnings (#16) * Enable the esModuleInterop compiler flag, address compiler warnings and bump version number * Bump the package version and update the changelog * Update tests to address the new compiler flag --- changelog.md | 3 +++ lib/log.ts | 2 +- lib/util/utils.ts | 2 +- package-lock.json | 2 +- package.json | 2 +- tests/retry.spec.ts | 2 +- tests/tokenProvider.spec.ts | 2 +- tsconfig.json | 1 + 8 files changed, 10 insertions(+), 6 deletions(-) diff --git a/changelog.md b/changelog.md index 46a17b877118..715045679ac6 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,6 @@ +### 2019-1-11 1.0.0-preview.1 +- Enabled esModuleInterop flag for the TypeScript compiler. + ### 2018-12-15 0.1.9 - Added constants for rule and filter descriptors as defined in the [service bus docs](https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-amqp-request-response#rule-operations) diff --git a/lib/log.ts b/lib/log.ts index f897e722eba1..f16fb93db36b 100644 --- a/lib/log.ts +++ b/lib/log.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -import * as debugModule from "debug"; +import debugModule from "debug"; /** * @ignore * log statements for cbs diff --git a/lib/util/utils.ts b/lib/util/utils.ts index 951b7174472c..cb8eef977350 100644 --- a/lib/util/utils.ts +++ b/lib/util/utils.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. See License.txt in the project root for license information. -import * as AsyncLock from "async-lock"; +import AsyncLock from "async-lock"; export { AsyncLock }; /** * Describes the options that can be provided to create an async lock. diff --git a/package-lock.json b/package-lock.json index e45da60755ff..af86125c236d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@azure/amqp-common", - "version": "0.1.9", + "version": "1.0.0-preview.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index e4f0c5af616a..94ff5f05477a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@azure/amqp-common", - "version": "0.1.9", + "version": "1.0.0-preview.1", "description": "Common library for amqp based azure sdks like @azure/event-hubs.", "author": "Microsoft Corporation", "license": "MIT", diff --git a/tests/retry.spec.ts b/tests/retry.spec.ts index dd21b8081560..5af7474396eb 100644 --- a/tests/retry.spec.ts +++ b/tests/retry.spec.ts @@ -6,7 +6,7 @@ import { retry, translate, RetryConfig, RetryOperationType, Constants, delay, MessagingError } from "../lib"; import * as chai from "chai"; -import * as debugModule from "debug"; +import debugModule from "debug"; const debug = debugModule("azure:amqp-common:retry-spec"); const should = chai.should(); import * as dotenv from "dotenv"; diff --git a/tests/tokenProvider.spec.ts b/tests/tokenProvider.spec.ts index 9306352a6a88..f78e3bd2bd39 100644 --- a/tests/tokenProvider.spec.ts +++ b/tests/tokenProvider.spec.ts @@ -4,7 +4,7 @@ import "mocha"; import * as chai from "chai"; chai.should(); -import * as debugModule from "debug"; +import debugModule from "debug"; const debug = debugModule("azure:amqp-common:token-spec"); import { SasTokenProvider, IotSasTokenProvider } from "../lib"; diff --git a/tsconfig.json b/tsconfig.json index fff081f5450c..920a3c356206 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,6 +10,7 @@ "noImplicitReturns": true, "outDir": "dist", "allowJs": false, + "esModuleInterop": true, "noUnusedLocals":true, "strict": true, "declaration": true,