mirror of
https://github.com/chenasraf/DefinitelyTyped-tools.git
synced 2026-05-18 01:49:03 +00:00
chore: remove ts3.6 support (#296)
* chore: remove ts3.6 support * add Typescript 4.5 Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
This commit is contained in:
@@ -40,7 +40,7 @@ describe("parse", () => {
|
||||
libraryName: "foo",
|
||||
libraryMajorVersion: 1,
|
||||
libraryMinorVersion: 2,
|
||||
typeScriptVersion: "3.6",
|
||||
typeScriptVersion: "3.7",
|
||||
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: "3.6",
|
||||
typeScriptVersion: "3.7",
|
||||
nonNpm: false,
|
||||
projects: ["https://github.com/foo/foo", "https://foo.com"],
|
||||
contributors: [
|
||||
@@ -147,11 +147,11 @@ describe("isSupported", () => {
|
||||
it("works", () => {
|
||||
expect(TypeScriptVersion.isSupported("4.1")).toBeTruthy();
|
||||
});
|
||||
it("supports 3.6", () => {
|
||||
expect(TypeScriptVersion.isSupported("3.6")).toBeTruthy();
|
||||
it("supports 3.7", () => {
|
||||
expect(TypeScriptVersion.isSupported("3.7")).toBeTruthy();
|
||||
});
|
||||
it("does not support 3.5", () => {
|
||||
expect(!TypeScriptVersion.isSupported("3.5")).toBeTruthy();
|
||||
it("does not support 3.6", () => {
|
||||
expect(!TypeScriptVersion.isSupported("3.6")).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -169,10 +169,10 @@ describe("isTypeScriptVersion", () => {
|
||||
|
||||
describe("range", () => {
|
||||
it("works", () => {
|
||||
expect(TypeScriptVersion.range("3.7")).toEqual(["3.7", "3.8", "3.9", "4.0", "4.1", "4.2", "4.3", "4.4"]);
|
||||
expect(TypeScriptVersion.range("4.0")).toEqual(["4.0", "4.1", "4.2", "4.3", "4.4", "4.5"]);
|
||||
});
|
||||
it("includes 3.6 onwards", () => {
|
||||
expect(TypeScriptVersion.range("3.6")).toEqual(TypeScriptVersion.supported);
|
||||
it("includes 3.7 onwards", () => {
|
||||
expect(TypeScriptVersion.range("3.7")).toEqual(TypeScriptVersion.supported);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -185,11 +185,12 @@ describe("tagsToUpdate", () => {
|
||||
"ts4.2",
|
||||
"ts4.3",
|
||||
"ts4.4",
|
||||
"ts4.5",
|
||||
"latest"
|
||||
]);
|
||||
});
|
||||
it("allows 3.6 onwards", () => {
|
||||
expect(TypeScriptVersion.tagsToUpdate("3.6")).toEqual(
|
||||
it("allows 3.7 onwards", () => {
|
||||
expect(TypeScriptVersion.tagsToUpdate("3.7")).toEqual(
|
||||
TypeScriptVersion.supported.map(s => "ts" + s).concat("latest")
|
||||
);
|
||||
});
|
||||
@@ -207,10 +208,10 @@ describe("makeTypesVersionsForPackageJson", () => {
|
||||
});
|
||||
});
|
||||
it("orders versions old to new with old-to-new input", () => {
|
||||
expect(JSON.stringify(makeTypesVersionsForPackageJson(["3.6", "3.9", "4.0"]), undefined, 4)).toEqual(`{
|
||||
"<=3.6": {
|
||||
expect(JSON.stringify(makeTypesVersionsForPackageJson(["3.7", "3.9", "4.0"]), undefined, 4)).toEqual(`{
|
||||
"<=3.7": {
|
||||
"*": [
|
||||
"ts3.6/*"
|
||||
"ts3.7/*"
|
||||
]
|
||||
},
|
||||
"<=3.9": {
|
||||
@@ -226,10 +227,10 @@ describe("makeTypesVersionsForPackageJson", () => {
|
||||
}`);
|
||||
});
|
||||
it("orders versions old to new with new-to-old input", () => {
|
||||
expect(JSON.stringify(makeTypesVersionsForPackageJson(["4.0", "3.9", "3.6"]), undefined, 4)).toEqual(`{
|
||||
"<=3.6": {
|
||||
expect(JSON.stringify(makeTypesVersionsForPackageJson(["4.0", "3.9", "3.7"]), undefined, 4)).toEqual(`{
|
||||
"<=3.7": {
|
||||
"*": [
|
||||
"ts3.6/*"
|
||||
"ts3.7/*"
|
||||
]
|
||||
},
|
||||
"<=3.9": {
|
||||
|
||||
@@ -133,7 +133,7 @@ testo({
|
||||
"balzac": "~3"
|
||||
},
|
||||
"typesPublisherContentHash": "11",
|
||||
"typeScriptVersion": "3.6"
|
||||
"typeScriptVersion": "3.7"
|
||||
}`);
|
||||
},
|
||||
githubPackageJsonName() {
|
||||
|
||||
@@ -42,20 +42,21 @@ export type UnsupportedTypeScriptVersion =
|
||||
| "3.2"
|
||||
| "3.3"
|
||||
| "3.4"
|
||||
| "3.5";
|
||||
| "3.5"
|
||||
| "3.6";
|
||||
/**
|
||||
* Parseable and supported TypeScript versions.
|
||||
* Only add to this list if we will support this version on DefinitelyTyped.
|
||||
*/
|
||||
export type TypeScriptVersion = "3.6" | "3.7" | "3.8" | "3.9" | "4.0" | "4.1" | "4.2" | "4.3" | "4.4";
|
||||
export type TypeScriptVersion = "3.7" | "3.8" | "3.9" | "4.0" | "4.1" | "4.2" | "4.3" | "4.4" | "4.5";
|
||||
|
||||
export type AllTypeScriptVersion = UnsupportedTypeScriptVersion | TypeScriptVersion;
|
||||
|
||||
export namespace TypeScriptVersion {
|
||||
/** Add to this list when a version actual ships. */
|
||||
export const shipped: readonly TypeScriptVersion[] = ["3.6", "3.7", "3.8", "3.9", "4.0", "4.1", "4.2", "4.3"];
|
||||
export const shipped: readonly TypeScriptVersion[] = [ "3.7", "3.8", "3.9", "4.0", "4.1", "4.2", "4.3"];
|
||||
/** Add to this list when a version is available as typescript@next */
|
||||
export const supported: readonly TypeScriptVersion[] = [...shipped, "4.4"];
|
||||
export const supported: readonly TypeScriptVersion[] = [...shipped, "4.4", "4.5"];
|
||||
/** Add to this list when it will no longer be supported on Definitely Typed */
|
||||
export const unsupported: readonly UnsupportedTypeScriptVersion[] = [
|
||||
"2.0",
|
||||
@@ -73,7 +74,8 @@ export namespace TypeScriptVersion {
|
||||
"3.2",
|
||||
"3.3",
|
||||
"3.4",
|
||||
"3.5"
|
||||
"3.5",
|
||||
"3.6"
|
||||
];
|
||||
export const all: readonly AllTypeScriptVersion[] = [...unsupported, ...supported];
|
||||
export const lowest = supported[0];
|
||||
|
||||
Reference in New Issue
Block a user