From eb4b9e5503f44ec57f21871a1bbaa64d5bcd6d38 Mon Sep 17 00:00:00 2001 From: Alex Wang Date: Fri, 27 Oct 2023 14:20:15 +0800 Subject: [PATCH] feat: remove feature flag for 1.3 schema --- .../fx-core/src/component/configManager/validator.ts | 5 ++--- .../tests/component/configManager/validator.test.ts | 10 ++-------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/packages/fx-core/src/component/configManager/validator.ts b/packages/fx-core/src/component/configManager/validator.ts index 193cfc0e5d..11503a0b0b 100644 --- a/packages/fx-core/src/component/configManager/validator.ts +++ b/packages/fx-core/src/component/configManager/validator.ts @@ -5,10 +5,9 @@ import Ajv, { ValidateFunction } from "ajv"; import fs from "fs-extra"; import path from "path"; import { getResourceFolder } from "../../folder"; -import { isTestToolEnabled } from "../../common/featureFlags"; type Version = string; -const supportedVersions = ["1.0.0", "1.1.0", "v1.2"]; +const supportedVersions = ["1.0.0", "1.1.0", "v1.2", "v1.3"]; export class Validator { impl: Map; @@ -36,7 +35,7 @@ export class Validator { } supportedVersions(): string[] { - return [...supportedVersions, ...(isTestToolEnabled() ? ["v1.3"] : [])]; + return supportedVersions; } private latestSupportedVersion(): string { diff --git a/packages/fx-core/tests/component/configManager/validator.test.ts b/packages/fx-core/tests/component/configManager/validator.test.ts index b82cd54d06..88ce65f72d 100644 --- a/packages/fx-core/tests/component/configManager/validator.test.ts +++ b/packages/fx-core/tests/component/configManager/validator.test.ts @@ -9,8 +9,6 @@ import chai from "chai"; import { describe, it } from "mocha"; import { Validator } from "../../../src/component/configManager/validator"; import * as sinon from "sinon"; -import * as featureFlags from "../../../src/common/featureFlags"; - describe("yaml validator", () => { const validator = new Validator(); afterEach(() => { @@ -26,11 +24,7 @@ describe("yaml validator", () => { .expect(validator.supportedVersions()) .contains("1.0.0") .and.contains("1.1.0") - .and.contains("v1.2"); - }); - - it("should support v1.3 for test tool", () => { - sinon.stub(featureFlags, "isTestToolEnabled").resolves(true); - chai.expect(validator.supportedVersions()).contain("v1.3"); + .and.contains("v1.2") + .and.contains("v1.3"); }); });