Skip to content

Commit

Permalink
Revert "Bring back 4.1 temporarily (#568)" (#570)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewbranch committed Nov 28, 2022
1 parent 1d27d48 commit 6874189
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 22 deletions.
23 changes: 6 additions & 17 deletions packages/header-parser/test/index.test.ts
Expand Up @@ -40,7 +40,7 @@ describe("parse", () => {
libraryName: "foo",
libraryMajorVersion: 1,
libraryMinorVersion: 2,
typeScriptVersion: "4.1",
typeScriptVersion: "4.2",
nonNpm: false,
projects: ["https://github.com/foo/foo", "https://foo.com"],
contributors: [
Expand All @@ -65,7 +65,7 @@ describe("parse", () => {
libraryName: "foo",
libraryMajorVersion: 1,
libraryMinorVersion: 2,
typeScriptVersion: "4.1",
typeScriptVersion: "4.2",
nonNpm: false,
projects: ["https://github.com/foo/foo", "https://foo.com"],
contributors: [
Expand Down Expand Up @@ -150,7 +150,7 @@ describe("isSupported", () => {
it("supports 4.2", () => {
expect(TypeScriptVersion.isSupported("4.2")).toBeTruthy();
});
it.skip("does not support 4.1", () => {
it("does not support 4.1", () => {
expect(!TypeScriptVersion.isSupported("4.1")).toBeTruthy();
});
});
Expand All @@ -169,20 +169,9 @@ describe("isTypeScriptVersion", () => {

describe("range", () => {
it("works", () => {
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",
]);
expect(TypeScriptVersion.range("4.2")).toEqual(["4.2", "4.3", "4.4", "4.5", "4.6", "4.7", "4.8", "4.9", "5.0"]);
});
it.skip("includes 4.2 onwards", () => {
it("includes 4.2 onwards", () => {
expect(TypeScriptVersion.range("4.2")).toEqual(TypeScriptVersion.supported);
});
});
Expand All @@ -202,7 +191,7 @@ describe("tagsToUpdate", () => {
"latest",
]);
});
it.skip("allows 4.2 onwards", () => {
it("allows 4.2 onwards", () => {
expect(TypeScriptVersion.tagsToUpdate("4.2")).toEqual(
TypeScriptVersion.supported.map((s) => "ts" + s).concat("latest")
);
Expand Down
2 changes: 1 addition & 1 deletion packages/publisher/src/generate-packages.ts
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion packages/publisher/test/generate-packages.test.ts
Expand Up @@ -143,7 +143,7 @@ testo({
"balzac": "~3"
},
"typesPublisherContentHash": "11",
"typeScriptVersion": "4.1"
"typeScriptVersion": "4.2"
}`);
},
basicNotNeededPackageJson() {
Expand Down
8 changes: 5 additions & 3 deletions packages/typescript-versions/src/index.ts
Expand Up @@ -49,18 +49,19 @@ export type UnsupportedTypeScriptVersion =
| "3.7"
| "3.8"
| "3.9"
| "4.0";
| "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.1" | "4.2" | "4.3" | "4.4" | "4.5" | "4.6" | "4.7" | "4.8" | "4.9" | "5.0";
export type TypeScriptVersion = "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.1", "4.2", "4.3", "4.4", "4.5", "4.6", "4.7", "4.8", "4.9"];
export const shipped: readonly TypeScriptVersion[] = ["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 */
Expand All @@ -86,6 +87,7 @@ export namespace TypeScriptVersion {
"3.8",
"3.9",
"4.0",
"4.1",
];
export const all: readonly AllTypeScriptVersion[] = [...unsupported, ...supported];
export const lowest = supported[0];
Expand Down

0 comments on commit 6874189

Please sign in to comment.