Skip to content

Commit a4b62cd

Browse files
authored
Update TS versions; removing 4.8, shipping 5.6, supporting 5.8 (#1100)
1 parent 3ee924c commit a4b62cd

File tree

6 files changed

+33
-31
lines changed

6 files changed

+33
-31
lines changed

.changeset/sweet-crews-impress.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@definitelytyped/typescript-packages": patch
3+
"@definitelytyped/typescript-versions": patch
4+
---
5+
6+
Update TS versions; removing 4.8, shipping 5.6, supporting 5.8

packages/publisher/test/generate-packages.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ testo({
169169
"@types/express": "*"
170170
},
171171
"typesPublisherContentHash": "53300522250468c4161b10d962cac2d9d8f2cfee1b3dfef4b749a7c3ec839275",
172-
"typeScriptVersion": "4.8"
172+
"typeScriptVersion": "4.9"
173173
}`);
174174
},
175175
basicNotNeededPackageJson() {

packages/typescript-packages/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
},
2323
"dependencies": {
2424
"@definitelytyped/typescript-versions": "workspace:*",
25-
"typescript-4.8": "npm:typescript@~4.8.0-0",
2625
"typescript-4.9": "npm:typescript@~4.9.0-0",
2726
"typescript-5.0": "npm:typescript@~5.0.0-0",
2827
"typescript-5.1": "npm:typescript@~5.1.0-0",
@@ -31,6 +30,7 @@
3130
"typescript-5.4": "npm:typescript@~5.4.0-0",
3231
"typescript-5.5": "npm:typescript@~5.5.0-0",
3332
"typescript-5.6": "npm:typescript@~5.6.0-0",
34-
"typescript-5.7": "npm:typescript@~5.7.0-0"
33+
"typescript-5.7": "npm:typescript@~5.7.0-0",
34+
"typescript-5.8": "npm:typescript@~5.8.0-0"
3535
}
3636
}

packages/typescript-versions/src/index.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ export type AllTypeScriptVersion = UnsupportedTypeScriptVersion | TypeScriptVers
4141

4242
export namespace TypeScriptVersion {
4343
/** Add to this list when a version actually ships. */
44-
export const shipped = ["4.8", "4.9", "5.0", "5.1", "5.2", "5.3", "5.4", "5.5"] as const;
44+
export const shipped = ["4.9", "5.0", "5.1", "5.2", "5.3", "5.4", "5.5", "5.6"] as const;
4545
/** Add to this list when a version is available as typescript@next */
46-
export const supported = [...shipped, "5.6", "5.7"] as const;
46+
export const supported = [...shipped, "5.7", "5.8"] as const;
4747
/** Add to this list when it will no longer be supported on Definitely Typed */
4848
export const unsupported = [
4949
"2.0",
@@ -74,6 +74,7 @@ export namespace TypeScriptVersion {
7474
"4.5",
7575
"4.6",
7676
"4.7",
77+
"4.8",
7778
] as const;
7879
export const all: readonly AllTypeScriptVersion[] = [...unsupported, ...supported];
7980
export const lowest = supported[0];

packages/typescript-versions/test/index.test.ts

+11-10
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ describe("all", () => {
1818

1919
describe("isSupported", () => {
2020
it("works", () => {
21-
expect(TypeScriptVersion.isSupported("5.1")).toBeTruthy();
21+
expect(TypeScriptVersion.isSupported("5.6")).toBeTruthy();
2222
});
23-
it("supports 4.8", () => {
24-
expect(TypeScriptVersion.isSupported("4.8")).toBeTruthy();
23+
it("supports 4.9", () => {
24+
expect(TypeScriptVersion.isSupported("4.9")).toBeTruthy();
2525
});
26-
it("does not support 4.7", () => {
27-
expect(!TypeScriptVersion.isSupported("4.7")).toBeTruthy();
26+
it("does not support 4.8", () => {
27+
expect(!TypeScriptVersion.isSupported("4.8")).toBeTruthy();
2828
});
2929
});
3030

@@ -42,10 +42,10 @@ describe("isTypeScriptVersion", () => {
4242

4343
describe("range", () => {
4444
it("works", () => {
45-
expect(TypeScriptVersion.range("4.9")).toEqual(["4.9", "5.0", "5.1", "5.2", "5.3", "5.4", "5.5", "5.6", "5.7"]);
45+
expect(TypeScriptVersion.range("5.0")).toEqual(["5.0", "5.1", "5.2", "5.3", "5.4", "5.5", "5.6", "5.7", "5.8"]);
4646
});
47-
it("includes 4.8 onwards", () => {
48-
expect(TypeScriptVersion.range("4.8")).toEqual(TypeScriptVersion.supported);
47+
it("includes 4.9 onwards", () => {
48+
expect(TypeScriptVersion.range("4.9")).toEqual(TypeScriptVersion.supported);
4949
});
5050
});
5151

@@ -60,11 +60,12 @@ describe("tagsToUpdate", () => {
6060
"ts5.5",
6161
"ts5.6",
6262
"ts5.7",
63+
"ts5.8",
6364
"latest",
6465
]);
6566
});
66-
it("allows 4.8 onwards", () => {
67-
expect(TypeScriptVersion.tagsToUpdate("4.8")).toEqual(
67+
it("allows 4.9 onwards", () => {
68+
expect(TypeScriptVersion.tagsToUpdate("4.9")).toEqual(
6869
TypeScriptVersion.supported.map((s) => "ts" + s).concat("latest"),
6970
);
7071
});

pnpm-lock.yaml

+10-16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)