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
Upgrading from v25.4.0 to v25.5.0 breaks vue imports #1604
Comments
It's probably related to one of the modules that ts-jest did update also ( |
hi, does it happen to jest 25 ? |
@ahnpnl yes, it is. Just tried to install jest 25.5.4 and ts-jest 25.5.0. |
do you have a repo that I can debug ? That would be very helpful |
I've just started to have issues with typescript support in ts-jest also - I think it's related to a patch update. Here's the error I'm getting after rebuilding my lockfile - circleci And here's the lockfile diff before and after the error - @ahnpnl if you need a reproduction, feel free to clone this repo The following should demonstrate the issue. git clone https://github.com/FormidableLabs/urql-devtools-exchange.git
cd urql-devtools-exchange
# This will work fine
yarn --frozenLockfile
yarn test
# This will fail
rm yarn.lock
yarn
yarn test |
hi @andyrichardson , the diagnostics threw in your CI was correct. Your IDE will suggest something like this Because |
@ahnpnl that wouldn't explain why this was working prior to rebuilding the lockfile (check the build report for master). Declaration merging is being used on the project (try running |
do you use custom typing files for that declaration merging ? |
I'm not too sure what you mean by custom typing files - I'm just using declaration merging (this is the file) If you think this is unrelated, I'm happy to create a new issue - I just think it's a bit of a coincidence that both of us have suddenly got our tests failing just by rebuilding the lockfile. Edit: Looks like my particular issue was related to jest being updated on lockfile rebuild. Pinning jest doesn't prevent derivative dependencies (e.g. @jest/console, @jest/core) from updating to 25.5.0. |
ok, would you please check |
@ahnpnl I have tried to make new repo with this bug, but I can't make it work. Only my old repository is working where I have my old |
We also got issues related to this. It did not only affect our Vue frontend, but also our backend, which depend on |
@andrevmatos have you tried migration steps in @Ky6uk indeed your repo throws error with |
@ahnpnl I think babel config will need for further steps of compilation. The first step is just importing module with UPD: Yes, adding a babel config doesn't change anything. |
Just tried. I had to specify |
@andrevmatos yes because 25.5.0 contains a boost in performance, which requires any custom typing files need to be defined in Related to Vue, this will need to investigate more. At the moment Do you guys have a small repo for Vue with |
ok @Ky6uk I know how to fix your issue:
Check answer in SO here https://stackoverflow.com/questions/42002394/importing-vue-components-in-typescript-file
|
@ahnpnl I've updated the repo. Now it's with tsconfig and with shim also. But the error still exists. I've just forgotten to add those files. My working repo is private and has a lot of stuff, so I tried to make a minimal reproducible repository and can miss something. |
even your repo after adding |
your |
this is the
|
@andrevmatos probably your issue with Vue is related to that |
Isn't this a breaking change no a minor? This broke my tests in my next js project, for similar reasons as the above (declaration merging). imports of static files like svgs failed: as did extended next types, like accessing the |
Okay, I found declaration file with |
@ahnpnl It looks inconvenient to find every declaration and add it to the tsconfig.json. Is it any problem with previous behavior? Can it be enabled by adding a flag or option? |
@samuelfullerthomas the change has been mentioned in @Ky6uk maybe the fix can be: revert the changes to use only |
Alright, it seems the problem has been fixed by adding all declarations to the |
I will make an alpha version which includes the solution suggested above. I think that will reduce the need of defining each typing files in |
Note that even set |
Yes, adding shim plus a bunch of plugins and mixins declaration files to |
Ye I think safer to revert that change and add documentation regarding performance boost. |
We have more than 28 type files. It's not possible to use glob patterns right? This seems tedious to maintain. |
|
hi everyone, apologize for the inconvenience caused by the breaking change introduce in 25.5.0. I have published 25.5.1-alpha.0 under You can try it by running |
Upgrading from |
My custom types are found again. 25.5.1-alpha.0 works for me. Thanks for your work. :) |
I will leave alpha version for others to test for a while (1 or 2 days). If the fix works for all, 25.5.1 will be published shortly after closing this issue. |
Upgrading from 25.5.0 to 25.5.1-alpha.0 fixes for me as well the issue with |
Upgrading from |
Close via #1606 There will be a slight delay for 25.5.1. Stay tune |
25.5.1 is out |
π Bug Report
I have tried to upgrade
ts-jest
fromv25.4.0
tov25.5.0
today, but almost all tests for Vue components have been broken after that.Debug log:
content of ts-jest.log :
envinfo
The text was updated successfully, but these errors were encountered: