Skip to content

Commit

Permalink
add .js extension (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiyuanliang-ms authored Aug 23, 2024
1 parent 122bb9b commit 8711f6a
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
10 changes: 5 additions & 5 deletions src/featureManager.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/featureProvider.ts
Original file line number Diff line number Diff line change
@@ -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 {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/filter/TargetingFilter.ts
Original file line number Diff line number Diff line change
@@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion src/filter/TimeWindowFilter.ts
Original file line number Diff line number Diff line change
@@ -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 = {
Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -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";
2 changes: 1 addition & 1 deletion test/exportedApi.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

export * from "../src";
export * from "../src/index.js";
2 changes: 1 addition & 1 deletion test/featureManager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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", () => {
Expand Down
2 changes: 1 addition & 1 deletion test/noFilters.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion test/targetingFilter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 8711f6a

Please sign in to comment.