Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

removing typescript as a peerDependency from schema #3559

Open
1 of 2 tasks
Loki-Afro opened this issue Jan 13, 2025 · 0 comments
Open
1 of 2 tasks

removing typescript as a peerDependency from schema #3559

Loki-Afro opened this issue Jan 13, 2025 · 0 comments

Comments

@Loki-Afro
Copy link

Steps to reproduce

I appreciate the effort in PR #3287, but I don't think this is the best way to handle the issue, and I'd like to explain why. While I'm not an npm dependency expert, this approach introduces significant concerns, primarily around having TypeScript as a non-dev dependency, which feels fundamentally incorrect.

Including TypeScript as a non-dev dependency means it will be installed in production environments. This is unnecessary and problematic for several reasons:

  • TypeScript Shouldn't Be Part of Production Builds: Frontend frameworks like Angular rely on TypeScript for development, but these projects typically go through a build process. This process generates production-ready JavaScript (often bundled, tree-shaken, and minified) that can be deployed. Dependencies like TypeScript are stripped out during this phase and don't exist in the final production build.
  • For a Node.js server application, there is no analogous "build step" that compiles TypeScript into a lean, production-ready package without including TypeScript itself as a dependency. This means TypeScript will remain in the production environment, which is not ideal.

if by any means i misunderstood anything from that node js universe on how to build apps, let me know

  • Tell us what broke. The more detailed the better.
  • If you can, please create a simple example that reproduces the issue and link to a gist, jrepo, etc. This makes it much easier for us to debug and issues that have a reproducible example will get higher priority.

Expected behavior

Tell us what should happen
typescript not to be installed as peerDependency

Actual behavior

typescript is being installed as peerDependency

System configuration

Tell us about the applicable parts of your setup.

Module versions (especially the part that's not working):
v5.0.10, since #3287
NodeJS version:
22.11.0

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant