Skip to content

Commit 6e40838

Browse files
committed
Fix LeDDGroup#266: restore in TS 5.6.
Failed to compile `transform-typescript-paths` due to many TypeScript compilation errors. Therefore, don't know whether this PR is valid or not. Hope your strict your review @nonara. Instead, tested on my project manually editing the JS file in the `node_modules/typescript-transform-paths` directory.
1 parent 60c6258 commit 6e40838

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"@types/eslint": "^9",
6767
"@types/minimatch": "^5.1.2",
6868
"@types/node": "^22.5.2",
69-
"@types/ts-expose-internals": "npm:ts-expose-internals@4.9.5",
69+
"@types/ts-expose-internals": "npm:ts-expose-internals@5.6.2",
7070
"@types/ts-node": "npm:ts-node@^10.9.2",
7171
"@types/typescript-3": "npm:[email protected]",
7272
"@types/typescript-4.7": "npm:[email protected]",
@@ -76,7 +76,7 @@
7676
"prettier": "^3.3.3",
7777
"prettier-plugin-jsdoc": "^1.3.0",
7878
"ts-patch": "^3.2.1",
79-
"typescript": "^5.5.4",
79+
"typescript": "^5.6.2",
8080
"typescript-eslint": "^8.3.0"
8181
},
8282
"peerDependencies": {

src/transformer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,9 @@ export default function transformer(
135135
...tsTransformPathsContext,
136136
sourceFile,
137137
isDeclarationFile: sourceFile.isDeclarationFile,
138-
originalSourceFile: (<typeof ts>tsInstance).getOriginalSourceFile(sourceFile),
138+
originalSourceFile: tsInstance.getSourceFileOfNode(sourceFile),
139139
getVisitor() {
140-
return nodeVisitor.bind(this);
140+
return nodeVisitor.bind(this) as (node: ts.Node) => ts.VisitResult<ts.Node>;
141141
},
142142
factory: createHarmonyFactory(tsTransformPathsContext),
143143
};

yarn.lock

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,10 @@ __metadata:
296296
languageName: node
297297
linkType: hard
298298

299-
"@types/ts-expose-internals@npm:ts-expose-internals@4.9.5":
300-
version: 4.9.5
301-
resolution: "ts-expose-internals@npm:4.9.5"
302-
checksum: 10c0/3f5b24f30c1f31a982f2a93b72de18c70da3e4c26d90afdc9428d00c7eef42d91beac7a0fa564f8af815c044ae26ca6da4d9e3aea21a2f479511397ead4d0c8e
299+
"@types/ts-expose-internals@npm:ts-expose-internals@5.6.2":
300+
version: 5.6.2
301+
resolution: "ts-expose-internals@npm:5.6.2"
302+
checksum: 10c0/2f53e67b7554cc9003879734e24b536459ade19927c510f8f4835e10b7ef563948da91a8f8dc4a78498e97dbc430f022c6875dca66ab5bafd953d52f03c4977f
303303
languageName: node
304304
linkType: hard
305305

@@ -2993,7 +2993,7 @@ __metadata:
29932993
"@types/eslint": "npm:^9"
29942994
"@types/minimatch": "npm:^5.1.2"
29952995
"@types/node": "npm:^22.5.2"
2996-
"@types/ts-expose-internals": "npm:ts-expose-internals@4.9.5"
2996+
"@types/ts-expose-internals": "npm:ts-expose-internals@5.6.2"
29972997
"@types/ts-node": "npm:ts-node@^10.9.2"
29982998
"@types/typescript-3": "npm:[email protected]"
29992999
"@types/typescript-4.7": "npm:[email protected]"
@@ -3004,30 +3004,30 @@ __metadata:
30043004
prettier: "npm:^3.3.3"
30053005
prettier-plugin-jsdoc: "npm:^1.3.0"
30063006
ts-patch: "npm:^3.2.1"
3007-
typescript: "npm:^5.5.4"
3007+
typescript: "npm:^5.6.2"
30083008
typescript-eslint: "npm:^8.3.0"
30093009
peerDependencies:
30103010
typescript: ">=3.6.5"
30113011
languageName: unknown
30123012
linkType: soft
30133013

3014-
"typescript@npm:^5.5.4":
3015-
version: 5.5.4
3016-
resolution: "typescript@npm:5.5.4"
3014+
"typescript@npm:^5.6.2":
3015+
version: 5.6.2
3016+
resolution: "typescript@npm:5.6.2"
30173017
bin:
30183018
tsc: bin/tsc
30193019
tsserver: bin/tsserver
3020-
checksum: 10c0/422be60f89e661eab29ac488c974b6cc0a660fb2228003b297c3d10c32c90f3bcffc1009b43876a082515a3c376b1eefcce823d6e78982e6878408b9a923199c
3020+
checksum: 10c0/3ed8297a8c7c56b7fec282532503d1ac795239d06e7c4966b42d4330c6cf433a170b53bcf93a130a7f14ccc5235de5560df4f1045eb7f3550b46ebed16d3c5e5
30213021
languageName: node
30223022
linkType: hard
30233023

3024-
"typescript@patch:typescript@npm%3A^5.5.4#optional!builtin<compat/typescript>":
3025-
version: 5.5.4
3026-
resolution: "typescript@patch:typescript@npm%3A5.5.4#optional!builtin<compat/typescript>::version=5.5.4&hash=379a07"
3024+
"typescript@patch:typescript@npm%3A^5.6.2#optional!builtin<compat/typescript>":
3025+
version: 5.6.2
3026+
resolution: "typescript@patch:typescript@npm%3A5.6.2#optional!builtin<compat/typescript>::version=5.6.2&hash=74658d"
30273027
bin:
30283028
tsc: bin/tsc
30293029
tsserver: bin/tsserver
3030-
checksum: 10c0/73409d7b9196a5a1217b3aaad929bf76294d3ce7d6e9766dd880ece296ee91cf7d7db6b16c6c6c630ee5096eccde726c0ef17c7dfa52b01a243e57ae1f09ef07
3030+
checksum: 10c0/e6c1662e4852e22fe4bbdca471dca3e3edc74f6f1df043135c44a18a7902037023ccb0abdfb754595ca9028df8920f2f8492c00fc3cbb4309079aae8b7de71cd
30313031
languageName: node
30323032
linkType: hard
30333033

0 commit comments

Comments
 (0)