-
Notifications
You must be signed in to change notification settings - Fork 28
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
Regression in @sapui5/types of 1.122.1 with tsconfig for wdi5 #434
Comments
This is most likely another symptom of the issue described in #433. Due to an unexpected version mismatch, some files have not been renamed to 1.123 should fix the problem. Fixes for 1.121 and 1.122 are prepared, so in case a patch will be produced, the issue should be fixed there as well. But I can't say whether or when such patches will be created. |
Thank you for the quick response! I hadn't seen the closed issue. The workaround works perfectly for us already, but thank you for mentioning that as well :) |
(Edited the title to make it clear that the issue only occurs in the SAPUI5 types) |
Verified fixed with the 1.123.0 types |
Describe the bug
For
wdi5
-based testing, ui5's types can be used. As the runtime there is not the browser but node, different settings for typescript are used:type
"module"
inpackage.json
module
andmoduleResolution
Node16in
tsconfig.json`Up until version 1.122.0 of the types, this worked without problems -- you could import the ui5 types and use them in your wdi5 config, exactly as advertised. With version 1.122.1 of the types, this broke for some reason. Running
tsc --noEmit
on a more or less empty project with these settings gives lots of errors, mostly internal to the types, i.e.:node_modules/@sapui5/types/types/commons-1.122.0-esm-d.ts(3,16): error TS2664: Invalid module name in augmentation, module 'sap/ui/commons/library' cannot be found.
I'm not sure if this could be due to (new?) behavior of the types, where when only some parts of the ui5 distribution are updated to the .1 patch version and others stay at .0, the files are renamed and thus cause the problem with the stricter type resolution settings.
Expected behavior
Projects using
wdi5
with TypeScript and the ui5 types should pass a typecheck without problems.Additional context
For easier debugging, I've created a minimal repository that fails: https://github.com/LukasHeimann/ui5-types-wdi5-issue
It includes steps to reproduce the issue and shows that previous versions are not affected.
I've also included the log output of
tsc --noEmit
: https://github.com/LukasHeimann/ui5-types-wdi5-issue/blob/main/out.logThe text was updated successfully, but these errors were encountered: