pdfme / pdfme

A TypeScript based PDF generator library, made with React.
https://pdfme.com
MIT License
2.16k stars 192 forks source link

fix(common): Move typing dependencies to peer #477

Open sebimarkgraf opened 2 weeks ago

sebimarkgraf commented 2 weeks ago

This could be a fix for #474 and the other related issues.

This ignores the type import of antd and casts it to any if antd is not installed. Additionally, the antd dependency is downgraded to peer in common.

If ui is installed the direct dependency would lead to the correct typing being filled in.

vercel[bot] commented 2 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments | Name | Status | Preview | Comments | Updated (UTC) | | :--- | :----- | :------ | :------- | :------ | | **pdfme-playground** | ⬜️ Ignored ([Inspect](https://vercel.com/labelmake/pdfme-playground/HMBpYHqCpaaV3aKLux8xWuTNo4Va)) | [Visit Preview](https://pdfme-playground-git-fork-sebimarkgraf-fix-ant-48dcaa-labelmake.vercel.app) | | Apr 30, 2024 2:48pm | | **pdfme-playground-v4** | ⬜️ Ignored ([Inspect](https://vercel.com/labelmake/pdfme-playground-v4/2FpZeoRgK2NMpeMiPjvZhWUZ14kC)) | [Visit Preview](https://pdfme-playground-v4-git-fork-sebimarkgraf-fix-55cecf-labelmake.vercel.app) | | Apr 30, 2024 2:48pm |
sebimarkgraf commented 2 weeks ago

Something that could be interesting, is doing the same thing with form-render, but I am unsure if form-render is a real dependency

sebimarkgraf commented 2 weeks ago

The tests are passing with form-render as peer as well.

Should I do additional checks?

hand-dot commented 19 hours ago

Hey @sebimarkgraf !

Sorry for the delayed response. I plan to merge it if everything works fine on my end after verification.