diff --git a/src/featureManager.ts b/src/featureManager.ts index bce1325..402510f 100644 --- a/src/featureManager.ts +++ b/src/featureManager.ts @@ -1,11 +1,11 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { TimeWindowFilter } from "./filter/TimeWindowFilter"; -import { IFeatureFilter } from "./filter/FeatureFilter"; -import { RequirementType } from "./model"; -import { IFeatureFlagProvider } from "./featureProvider"; -import { TargetingFilter } from "./filter/TargetingFilter"; +import { TimeWindowFilter } from "./filter/TimeWindowFilter.js"; +import { IFeatureFilter } from "./filter/FeatureFilter.js"; +import { RequirementType } from "./model.js"; +import { IFeatureFlagProvider } from "./featureProvider.js"; +import { TargetingFilter } from "./filter/TargetingFilter.js"; export class FeatureManager { #provider: IFeatureFlagProvider; diff --git a/src/featureProvider.ts b/src/featureProvider.ts index 779b913..9b63876 100644 --- a/src/featureProvider.ts +++ b/src/featureProvider.ts @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { IGettable } from "./gettable"; -import { FeatureFlag, FeatureManagementConfiguration, FEATURE_MANAGEMENT_KEY, FEATURE_FLAGS_KEY } from "./model"; +import { IGettable } from "./gettable.js"; +import { FeatureFlag, FeatureManagementConfiguration, FEATURE_MANAGEMENT_KEY, FEATURE_FLAGS_KEY } from "./model.js"; export interface IFeatureFlagProvider { /** diff --git a/src/filter/TargetingFilter.ts b/src/filter/TargetingFilter.ts index 2e1e2fe..3c0d9ca 100644 --- a/src/filter/TargetingFilter.ts +++ b/src/filter/TargetingFilter.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { IFeatureFilter } from "./FeatureFilter"; +import { IFeatureFilter } from "./FeatureFilter.js"; import { createHash } from "crypto"; type TargetingFilterParameters = { diff --git a/src/filter/TimeWindowFilter.ts b/src/filter/TimeWindowFilter.ts index 92d1f24..e1442c8 100644 --- a/src/filter/TimeWindowFilter.ts +++ b/src/filter/TimeWindowFilter.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -import { IFeatureFilter } from "./FeatureFilter"; +import { IFeatureFilter } from "./FeatureFilter.js"; // [Start, End) type TimeWindowParameters = { diff --git a/src/index.ts b/src/index.ts index 509b92e..7e99672 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -export { FeatureManager } from "./featureManager"; -export { ConfigurationMapFeatureFlagProvider, ConfigurationObjectFeatureFlagProvider, IFeatureFlagProvider } from "./featureProvider"; -export { IFeatureFilter } from "./filter/FeatureFilter"; +export { FeatureManager } from "./featureManager.js"; +export { ConfigurationMapFeatureFlagProvider, ConfigurationObjectFeatureFlagProvider, IFeatureFlagProvider } from "./featureProvider.js"; +export { IFeatureFilter } from "./filter/FeatureFilter.js"; diff --git a/test/exportedApi.ts b/test/exportedApi.ts index f447b46..848ae85 100644 --- a/test/exportedApi.ts +++ b/test/exportedApi.ts @@ -1,4 +1,4 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT license. -export * from "../src"; +export * from "../src/index.js"; diff --git a/test/featureManager.test.ts b/test/featureManager.test.ts index 2fd9699..9c1cc42 100644 --- a/test/featureManager.test.ts +++ b/test/featureManager.test.ts @@ -6,7 +6,7 @@ import * as chaiAsPromised from "chai-as-promised"; chai.use(chaiAsPromised); const expect = chai.expect; -import { FeatureManager, ConfigurationObjectFeatureFlagProvider, ConfigurationMapFeatureFlagProvider } from "./exportedApi"; +import { FeatureManager, ConfigurationObjectFeatureFlagProvider, ConfigurationMapFeatureFlagProvider } from "./exportedApi.js"; describe("feature manager", () => { it("should load from json string", () => { diff --git a/test/noFilters.test.ts b/test/noFilters.test.ts index a303748..2963b86 100644 --- a/test/noFilters.test.ts +++ b/test/noFilters.test.ts @@ -6,7 +6,7 @@ import * as chaiAsPromised from "chai-as-promised"; chai.use(chaiAsPromised); const expect = chai.expect; -import { FeatureManager, ConfigurationObjectFeatureFlagProvider } from "./exportedApi"; +import { FeatureManager, ConfigurationObjectFeatureFlagProvider } from "./exportedApi.js"; const featureFlagsDataObject = { "feature_management": { diff --git a/test/targetingFilter.test.ts b/test/targetingFilter.test.ts index 6d4fb15..40e9b09 100644 --- a/test/targetingFilter.test.ts +++ b/test/targetingFilter.test.ts @@ -6,7 +6,7 @@ import * as chaiAsPromised from "chai-as-promised"; chai.use(chaiAsPromised); const expect = chai.expect; -import { FeatureManager, ConfigurationMapFeatureFlagProvider } from "./exportedApi"; +import { FeatureManager, ConfigurationMapFeatureFlagProvider } from "./exportedApi.js"; const complexTargetingFeature = { "id": "ComplexTargeting",