Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Bring back 4.1 temporarily (#568)" #570

Merged
merged 1 commit into from Nov 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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