-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tsimp does not work with TypeScript v5.6.2 #29
Comments
v5.6.x is not compatible with tsimp. tapjs/tsimp#29
It looks to me like this was broken with microsoft/TypeScript#58825 which modified the implementation of the I think the solution is just to pass
I'll try to put up a PR and see if the maintainers here agree |
Thank you @mattdean-digicatapult. Until the PR get merged, I'm patching locally using the following diff --git a/dist/esm/service/resolve-type-reference-directive-references.js b/dist/esm/service/resolve-type-reference-directive-references.js
index d285ff041190ba2cf2958b00831c089e175fd788..9f33eebec9a498afd0455331ba7aa10d7aa0de89 100644
--- a/dist/esm/service/resolve-type-reference-directive-references.js
+++ b/dist/esm/service/resolve-type-reference-directive-references.js
@@ -21,7 +21,7 @@ export const getResolveTypeReferenceDirectiveReferences = (host, moduleResolutio
const loader = createLoader(containingFile, redirectedReference, options, host, resolutionCache);
for (const entry of entries) {
const name = loader.nameAndMode.getName(entry);
- const mode = loader.nameAndMode.getMode(entry, containingSourceFile);
+ const mode = loader.nameAndMode.getMode(entry, containingSourceFile, options);
const key = createModeAwareCacheKey(name, mode);
let result = rtrdrInternalCache.get(key);
if (!result) { |
same issue |
fwiw, this bug makes the node test runner appear to pass the tests when they should fail. // fail.ts
import { test } from 'node:test'
import { strict as assert } from 'node:assert'
test('should fail', t => {
assert.fail('should fail')
}) running the following command # Node.js v22.9.0
node --import=tsimp/import --test fail.ts outputs ✔ fail.ts (1365.779513ms)
ℹ tests 1
ℹ suites 0
ℹ pass 1
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 1379.271959 EDIT: it appears to fail silently on all usages, not just in the test runner. |
Hi, @isaacs, Can you take a look at this issue? This issue has prevented me from upgrading TypeScript. |
Error messages in
.tsimp/daemon/log
:It works with older TypeScript compilers, so it might be a regression in TypeScript.
The text was updated successfully, but these errors were encountered: