From 63b2a1ec11cc59bc50f0bb5e117c0ba2b428b1ba Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Tue, 22 Nov 2022 15:42:48 -0800 Subject: [PATCH 1/3] Bring back 4.1 temporarily --- packages/publisher/src/generate-packages.ts | 2 +- packages/typescript-versions/src/index.ts | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/publisher/src/generate-packages.ts b/packages/publisher/src/generate-packages.ts index 0a3c3fb769..f33d45fa25 100644 --- a/packages/publisher/src/generate-packages.ts +++ b/packages/publisher/src/generate-packages.ts @@ -61,11 +61,11 @@ export default async function generatePackages( await emptyDir(outputDirPath); for (const { pkg, version } of changedPackages.changedTypings) { + log(` * ${pkg.desc}`); await generateTypingPackage(pkg, allPackages, version, dt); if (tgz) { await writeTgz(outputDirectory(pkg), `${outputDirectory(pkg)}.tgz`); } - log(` * ${pkg.desc}`); } log("## Generating deprecated packages"); for (const pkg of changedPackages.changedNotNeededPackages) { diff --git a/packages/typescript-versions/src/index.ts b/packages/typescript-versions/src/index.ts index dd4134da28..ada2beb2d4 100644 --- a/packages/typescript-versions/src/index.ts +++ b/packages/typescript-versions/src/index.ts @@ -50,18 +50,17 @@ export type UnsupportedTypeScriptVersion = | "3.8" | "3.9" | "4.0" - | "4.1"; /** * Parseable and supported TypeScript versions. * Only add to this list if we will support this version on Definitely Typed. */ -export type TypeScriptVersion = "4.2" | "4.3" | "4.4" | "4.5" | "4.6" | "4.7" | "4.8" | "4.9" | "5.0"; +export type TypeScriptVersion = "4.1" | "4.2" | "4.3" | "4.4" | "4.5" | "4.6" | "4.7" | "4.8" | "4.9" | "5.0"; export type AllTypeScriptVersion = UnsupportedTypeScriptVersion | TypeScriptVersion; export namespace TypeScriptVersion { /** Add to this list when a version actually ships. */ - export const shipped: readonly TypeScriptVersion[] = ["4.2", "4.3", "4.4", "4.5", "4.6", "4.7", "4.8", "4.9"]; + export const shipped: readonly TypeScriptVersion[] = ["4.1", "4.2", "4.3", "4.4", "4.5", "4.6", "4.7", "4.8", "4.9"]; /** Add to this list when a version is available as typescript@next */ export const supported: readonly TypeScriptVersion[] = [...shipped, "5.0"]; /** Add to this list when it will no longer be supported on Definitely Typed */ @@ -87,7 +86,6 @@ export namespace TypeScriptVersion { "3.8", "3.9", "4.0", - "4.1", ]; export const all: readonly AllTypeScriptVersion[] = [...unsupported, ...supported]; export const lowest = supported[0]; From 9839b7e621fc455a0c5256d226238ef724a029bf Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Tue, 22 Nov 2022 15:54:27 -0800 Subject: [PATCH 2/3] Update test --- packages/header-parser/test/index.test.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/header-parser/test/index.test.ts b/packages/header-parser/test/index.test.ts index 5e863958d1..2d1f6cfa02 100644 --- a/packages/header-parser/test/index.test.ts +++ b/packages/header-parser/test/index.test.ts @@ -40,7 +40,7 @@ describe("parse", () => { libraryName: "foo", libraryMajorVersion: 1, libraryMinorVersion: 2, - typeScriptVersion: "4.2", + typeScriptVersion: "4.1", nonNpm: false, projects: ["https://github.com/foo/foo", "https://foo.com"], contributors: [ @@ -65,7 +65,7 @@ describe("parse", () => { libraryName: "foo", libraryMajorVersion: 1, libraryMinorVersion: 2, - typeScriptVersion: "4.2", + typeScriptVersion: "4.1", nonNpm: false, projects: ["https://github.com/foo/foo", "https://foo.com"], contributors: [ @@ -150,7 +150,7 @@ describe("isSupported", () => { it("supports 4.2", () => { expect(TypeScriptVersion.isSupported("4.2")).toBeTruthy(); }); - it("does not support 4.1", () => { + it.skip("does not support 4.1", () => { expect(!TypeScriptVersion.isSupported("4.1")).toBeTruthy(); }); }); @@ -169,9 +169,9 @@ describe("isTypeScriptVersion", () => { describe("range", () => { it("works", () => { - expect(TypeScriptVersion.range("4.2")).toEqual(["4.2", "4.3", "4.4", "4.5", "4.6", "4.7", "4.8", "4.9", "5.0"]); + expect(TypeScriptVersion.range("4.1")).toEqual(["4.1", "4.2", "4.3", "4.4", "4.5", "4.6", "4.7", "4.8", "4.9", "5.0"]); }); - it("includes 4.2 onwards", () => { + it.skip("includes 4.2 onwards", () => { expect(TypeScriptVersion.range("4.2")).toEqual(TypeScriptVersion.supported); }); }); @@ -191,7 +191,7 @@ describe("tagsToUpdate", () => { "latest", ]); }); - it("allows 4.2 onwards", () => { + it.skip("allows 4.2 onwards", () => { expect(TypeScriptVersion.tagsToUpdate("4.2")).toEqual( TypeScriptVersion.supported.map((s) => "ts" + s).concat("latest") ); From 687cba8ca842186ee747ec1df7fe5ad0cd9087a5 Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Tue, 22 Nov 2022 15:59:10 -0800 Subject: [PATCH 3/3] Update test --- packages/publisher/test/generate-packages.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/publisher/test/generate-packages.test.ts b/packages/publisher/test/generate-packages.test.ts index 36f7092213..08788e8278 100644 --- a/packages/publisher/test/generate-packages.test.ts +++ b/packages/publisher/test/generate-packages.test.ts @@ -143,7 +143,7 @@ testo({ "balzac": "~3" }, "typesPublisherContentHash": "11", - "typeScriptVersion": "4.2" + "typeScriptVersion": "4.1" }`); }, basicNotNeededPackageJson() {