-
Notifications
You must be signed in to change notification settings - Fork 94
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 4.5.1: Global namespace type declarations are removed #419
Comments
…icElements namespace declarations In the last dependency update (#818), `vite-plugin-dts` was upgraded from 4.5.0 to 4.5.3. After that, our JSX.IntrinsicElements declarations (e.g. this one: https://github.com/GenSpectrum/dashboard-components/blob/0c7d6cab120e59295db70495b4467b4c1e463dae/components/src/web-components/gs-app.ts#L110-L117) were not included in the built output anymore (in `dist/components.d.ts`). Thus, the typecheck in the dashboards failed, claiming that e.g. `gs-app` is not a valid JSX component name. 4.5.0 is the last version that works. qmhc/vite-plugin-dts#419 seems to be the exact same issue.
…icElements namespace declarations In the last dependency update (#818), `vite-plugin-dts` was upgraded from 4.5.0 to 4.5.3. After that, our JSX.IntrinsicElements declarations (e.g. this one: https://github.com/GenSpectrum/dashboard-components/blob/0c7d6cab120e59295db70495b4467b4c1e463dae/components/src/web-components/gs-app.ts#L110-L117) were not included in the built output anymore (in `dist/components.d.ts`). Thus, the typecheck in the dashboards failed, claiming that e.g. `gs-app` is not a valid JSX component name. 4.5.0 is the last version that works. qmhc/vite-plugin-dts#419 seems to be the exact same issue.
I saw the same issue. Downgrading to 4.5.0 "solved" it: GenSpectrum/dashboard-components#828 It would be great if you could make sure that global namespace declarations make it the |
…icElements namespace declarations (#828) In the last dependency update (#818), `vite-plugin-dts` was upgraded from 4.5.0 to 4.5.3. After that, our JSX.IntrinsicElements declarations (e.g. this one: https://github.com/GenSpectrum/dashboard-components/blob/0c7d6cab120e59295db70495b4467b4c1e463dae/components/src/web-components/gs-app.ts#L110-L117) were not included in the built output anymore (in `dist/components.d.ts`). Thus, the typecheck in the dashboards failed, claiming that e.g. `gs-app` is not a valid JSX component name. 4.5.0 is the last version that works. qmhc/vite-plugin-dts#419 seems to be the exact same issue.
Same here, I too have had to pin to 4.50 |
Would you try to use the latest version(4.5.3) current? |
@qmhc I just tested four package versions with these
So, as I noted in issue description, the regression happened in |
Use case
We provide Jest custom matchers with our package and provide TypeScript type definitions too. As I know the only way to extend Jest matchers is to extend global
jest
namespace like this:This approach is officially documented in Jest documentation:
The problem
Before
4.5.1
release the plugin included such declarations in generated declaration code "as is", after4.5.1
release these declarations just dropped.Not sure, but this commit in 4.5.1 release might be the source of this problem.
I am not familiar with StackBlitz and it's a bit hard for me to create a complete reproduction link for this. I think the reproduction should be quite easy, just include the code above into any TypeScript flle.
Reproduction
n/a
Steps to reproduce
No response
System Info
Validations
The text was updated successfully, but these errors were encountered: