mirror of
https://github.com/chenasraf/DefinitelyTyped-tools.git
synced 2026-05-18 01:49:03 +00:00
Bring back 4.1 temporarily (#568)
* Bring back 4.1 temporarily * Update test * Update test
This commit is contained in:
@@ -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")
|
||||
);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -143,7 +143,7 @@ testo({
|
||||
"balzac": "~3"
|
||||
},
|
||||
"typesPublisherContentHash": "11",
|
||||
"typeScriptVersion": "4.2"
|
||||
"typeScriptVersion": "4.1"
|
||||
}`);
|
||||
},
|
||||
basicNotNeededPackageJson() {
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user