Skip to content
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

Reduce number of dependencies #241

Closed
benmccann opened this issue Oct 11, 2024 · 6 comments
Closed

Reduce number of dependencies #241

benmccann opened this issue Oct 11, 2024 · 6 comments
Labels

Comments

@benmccann
Copy link

benmccann commented Oct 11, 2024

https://npmgraph.js.org/?q=@inlang/paraglide-sveltekit has 145 dependencies and ends up installing solid.js and webpack dependencies into your SvelteKit project.
Unpacked Size (module + dependencies): 106 MB

Upgrading @inlang/paraglide-unplugin to the latest unplugin will remove a chunk of dependencies

Upgrading @lix-js/client to the latest oktokit would help a lot as well

Could you make Typescript a dev dependency of @lix-js/fs?

axios could be replaced with fetch in posthog-node

@robert-puttshack
Copy link

Good work here @benmccann. +1

Copy link
Member

Is this critical at the moment?

We are in the middle of a rewrite of the lix and inlang SDKs. See this blog post for more info. Progress happens in the lix-integration branch. Both re-writes will:

  • reduce the number of external dependencies
  • scaffold more dependencies into the SDKs
    • e.g. having @inlang/paraglide-unplugin as package was over kill. bundler plugins will be "bundled" in paraglide js directly.

Furthermore, Paraglide JS 2.0 will also reduce the number of dependencies.

We want to put all resources into completing the SDK re-writes. Hence, highly appreciated if you can bear the dependency bloat for 2 more months.

@benmccann
Copy link
Author

benmccann commented Oct 11, 2024

Thank you for the update! Yes, waiting for 2.0 is fine.

I think these suggestions could apply to the lix-integration branch as well, but I'm happy to focus efforts there rather than main

@benmccann
Copy link
Author

Will you be merging main into lix-integration or vice versa? I'm happy to send some PRs to clean up a few of the low hanging fruit, but I'm not sure which branch is better to target? Or is it just distraction at the moment and better to hold off for the time being?

@samuelstroschein
Copy link
Member

samuelstroschein commented Oct 11, 2024

Better to hold off atm.

  • @lix-js/fs will be deleted
  • @lix-js/client will be deleted
  • paraglide-unplugin will be deprecated in favor bundling within paraglide-js

PS Thanks for your understanding

@samuelstroschein
Copy link
Member

Massive reduction in transient dependencies in Paraglide JS 2.0. The rewrite of lix and the inlang SDK to SQLite worked wonders. https://npmgraph.js.org/?q=@inlang/[email protected]

  • prettier plugin jsdoc will likely be removed as part of emit typescript flag #299
  • inlang/sdk could remove the sentry browser dependency but I'll wait on the amount of error reports we get (how useful sentry is)

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

No branches or pull requests

3 participants