cap-js / cds-typer

CDS type generator for JavaScript
Apache License 2.0
29 stars 10 forks source link

[QUESTION] new cds-typer version dependent on @sap/cds 8? #322

Closed FlorianFechterTCon closed 2 months ago

FlorianFechterTCon commented 2 months ago

Question

Hey, we run into some problems during our build process yesterday. The new version (that was released yesterday) changed the dependency for @sap/cds into a dev/peerDependency for version "@sap/cds": ">=8". During our deployment pipeline as well as locally, we ran into the same error message: image But when installing the previous version "0.25.0", it works without any issue: image So we have two questions:

Thank you guys for supporting the tool.

Best regards, Florian

daogrady commented 2 months ago

Hi Florian,

thanks for approaching us with this question! The dependency had to be introduced to support generating type definitions for services going forward, so this can't really be made optional. If I am understanding correctly, the issue is the fixed version 8 of cds, so I assume your project is currently still using cds7?

Best, Daniel

FlorianFechterTCon commented 2 months ago

Hey Daniel, you're right, we're still working with cds7 within our project. So our current solution is, that we'll stick to the last version "0.25.0" for now. But still, I assume that there would occur a different error. My colleagues mentioned that they had the same issue last time a peerDependency was introduces. Not sure if the npx caching mechanism got confused, because locally I could fix the issue with "rm -rf ~/.npm/_npx" (clearing the npx cache). I was just curious if you ran into a similar issue.

Thank you for your time. Best regards, Florian

daogrady commented 2 months ago

Hi Florian,

Is there any feature contained within cds-typer@0.26.0 you particularly needed for your project? If not, staying on 0.25.0 for as long as you stick with cds7 is probably the right option for you. Naturally, I have to encourage you to migrate your project to cds8 asap (although you are probably already aware and hopefully have it on your project's roadmap). 🙂

Best, Daniel

FlorianFechterTCon commented 2 months ago

Hey Daniel,

I don't think we need any of the new features right now and we have it on our roadmap. 😅

Thanks again for your support.👍

Best regards, Florian