Skip to content

Commit f0cd4e3

Browse files
committed
chore!: remove typescript 3 support
1 parent 7de0abf commit f0cd4e3

File tree

9 files changed

+11
-200
lines changed

9 files changed

+11
-200
lines changed

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@
6666
"@types/node": "^22.17.1",
6767
"@types/ts-expose-internals": "npm:[email protected]",
6868
"@types/ts-node": "npm:ts-node@^10.9.2",
69-
"@types/typescript-3": "npm:[email protected]",
70-
"@types/typescript-4.7": "npm:[email protected]",
69+
"@types/typescript-4.7": "npm:[email protected]",
7170
"changelogen": "^0.6.2",
7271
"eslint": "9.x",
7372
"globals": "^15.15.0",
@@ -78,7 +77,7 @@
7877
"typescript-eslint": "^8.39.0"
7978
},
8079
"peerDependencies": {
81-
"typescript": ">=3.6.5"
80+
"typescript": ">=4"
8281
},
8382
"dependencies": {
8483
"minimatch": "^9.0.5"

src/harmony/harmony-factory.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import TS from "typescript";
22
import { TsTransformPathsContext } from "../types";
3-
import { TsFourSeven, TsThreeEight } from "./versions";
3+
import { TsFourSeven } from "./versions";
44

55
/* ****************************************************************************************************************** */
66
// region: Types
@@ -18,9 +18,7 @@ export interface HarmonyFactory extends TS.NodeFactory {}
1818
export function createHarmonyFactory(context: TsTransformPathsContext): HarmonyFactory {
1919
return new Proxy(context.tsFactory ?? context.tsInstance, {
2020
get(target, prop) {
21-
if (TsThreeEight.predicate(context)) {
22-
return TsThreeEight.handler(context, prop);
23-
} else if (TsFourSeven.predicate(context)) {
21+
if (TsFourSeven.predicate(context)) {
2422
return TsFourSeven.handler(context, prop);
2523
} else {
2624
// @ts-expect-error TS(7053) FIXME: Element implicitly has an 'any' type because expression of type 'string | symbol' can't be used to index type 'typeof import("typescript") | NodeFactory'.

src/harmony/versions/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
export * as TsThreeEight from "./three-eight";
21
export * as TsFourSeven from "./four-seven";

src/harmony/versions/three-eight.ts

Lines changed: 0 additions & 158 deletions
This file was deleted.

test/config.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
import ts from "typescript";
2-
import tsThree from "typescript-3";
32
import tsFourSeven from "typescript-4.7";
43
import tsFiveFive from "typescript-5.5";
54
import tsFiveSix from "typescript-5.6";
65
import path from "node:path";
76

87
export const tsModules = <const>[
9-
["3.6.5", tsThree, "typescript-3"],
108
["4.7.4", tsFourSeven, "typescript-4.7"],
119
["5.5.4", tsFiveFive, "typescript-5.5"],
1210
["5.6.3", tsFiveSix, "typescript-5.6"],

test/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
"tsp1": "npm:ts-patch@1.*.*",
2323
"tsp2": "npm:ts-patch@2.*.*",
2424
"typescript": "^5.7.2",
25-
"typescript-3": "npm:[email protected]",
2625
"typescript-4.7": "npm:[email protected]",
2726
"typescript-5.5": "npm:[email protected]",
2827
"typescript-5.6": "npm:[email protected]",

test/prepare.mjs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { symlink } from "node:fs/promises";
44
import { dirname, resolve } from "node:path";
55
import { fileURLToPath } from "node:url";
66
import { patch } from "ts-patch";
7-
import { patch as patch1 } from "tsp1";
87
import { patch as patch2 } from "tsp2";
98

109
const __dirname = dirname(fileURLToPath(import.meta.url)); // https://stackoverflow.com/questions/46745014/alternative-for-dirname-in-node-js-when-using-es6-modules
@@ -28,7 +27,6 @@ function patchTsModules() {
2827
tspatch(["tsc.js", "typescript.js"], { basedir, dir: basedir });
2928
}
3029

31-
patchTypescript("typescript-3", patch1);
3230
patchTypescript("typescript-4.7", patch2);
3331
patchTypescript("typescript-5.5", patch);
3432
patchTypescript("typescript-5.6", patch);

test/yarn.lock

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8095,7 +8095,6 @@ __metadata:
80958095
tsp1: "npm:ts-patch@1.*.*"
80968096
tsp2: "npm:ts-patch@2.*.*"
80978097
typescript: "npm:^5.7.2"
8098-
typescript-3: "npm:[email protected]"
80998098
typescript-4.7: "npm:[email protected]"
81008099
typescript-5.5: "npm:[email protected]"
81018100
typescript-5.6: "npm:[email protected]"
@@ -9237,16 +9236,6 @@ __metadata:
92379236
languageName: node
92389237
linkType: hard
92399238

9240-
"typescript-3@npm:[email protected]":
9241-
version: 3.6.5
9242-
resolution: "typescript@npm:3.6.5"
9243-
bin:
9244-
tsc: bin/tsc
9245-
tsserver: bin/tsserver
9246-
checksum: 10c0/b6f0d5d2e2325b28460b8cf3a4a1237d79aec9951ad727014d4ca570327cc5947decec5d262044979cc0a9ab63746b58e6d8438d73d33ce8415e5369d0490dff
9247-
languageName: node
9248-
linkType: hard
9249-
92509239
"typescript-4.7@npm:[email protected]":
92519240
version: 4.7.4
92529241
resolution: "typescript@npm:4.7.4"
@@ -9283,7 +9272,7 @@ __metadata:
92839272
dependencies:
92849273
minimatch: "npm:^9.0.5"
92859274
peerDependencies:
9286-
typescript: ">=3.6.5"
9275+
typescript: ">=4"
92879276
languageName: node
92889277
linkType: soft
92899278

yarn.lock

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -366,23 +366,13 @@ __metadata:
366366
languageName: node
367367
linkType: hard
368368

369-
"@types/typescript-3@npm:typescript@3.x":
370-
version: 3.9.10
371-
resolution: "typescript@npm:3.9.10"
369+
"@types/typescript-4.7@npm:typescript@4.7.x":
370+
version: 4.7.4
371+
resolution: "typescript@npm:4.7.4"
372372
bin:
373373
tsc: bin/tsc
374374
tsserver: bin/tsserver
375-
checksum: 10c0/863cc06070fa18a0f9c6a83265fb4922a8b51bf6f2c6760fb0b73865305ce617ea4bc6477381f9f4b7c3a8cb4a455b054f5469e6e41307733fe6a2bd9aae82f8
376-
languageName: node
377-
linkType: hard
378-
379-
"@types/typescript-4.7@npm:[email protected]":
380-
version: 4.9.5
381-
resolution: "typescript@npm:4.9.5"
382-
bin:
383-
tsc: bin/tsc
384-
tsserver: bin/tsserver
385-
checksum: 10c0/5f6cad2e728a8a063521328e612d7876e12f0d8a8390d3b3aaa452a6a65e24e9ac8ea22beb72a924fd96ea0a49ea63bb4e251fb922b12eedfb7f7a26475e5c56
375+
checksum: 10c0/8c1c4007b6ce5b24c49f0e89173ab9e82687cc6ae54418d1140bb63b82d6598d085ac0f993fe3d3d1fbf87a2c76f1f81d394dc76315bc72c7a9f8561c5d8d205
386376
languageName: node
387377
linkType: hard
388378

@@ -2766,8 +2756,7 @@ __metadata:
27662756
"@types/node": "npm:^22.17.1"
27672757
"@types/ts-expose-internals": "npm:[email protected]"
27682758
"@types/ts-node": "npm:ts-node@^10.9.2"
2769-
"@types/typescript-3": "npm:[email protected]"
2770-
"@types/typescript-4.7": "npm:[email protected]"
2759+
"@types/typescript-4.7": "npm:[email protected]"
27712760
changelogen: "npm:^0.6.2"
27722761
eslint: "npm:9.x"
27732762
globals: "npm:^15.15.0"
@@ -2778,7 +2767,7 @@ __metadata:
27782767
typescript: "npm:^5.9.2"
27792768
typescript-eslint: "npm:^8.39.0"
27802769
peerDependencies:
2781-
typescript: ">=3.6.5"
2770+
typescript: ">=4"
27822771
languageName: unknown
27832772
linkType: soft
27842773

0 commit comments

Comments
 (0)