toonvanstrijp / nestjs-i18n

The i18n module for nestjs.
https://nestjs-i18n.com
Other
626 stars 101 forks source link

Feature/multiple loaders and cli #547

Closed vsamofal closed 2 months ago

vsamofal commented 11 months ago

Description

I implemented 3 features, one small, and two that actually broke existing functionality.

  1. I added the ability to parse a response formatted, so everyone will be able to customize it if needed.
  2. I implemented a cli to generate types and watch for generation, pointing to multiple folders. (this one doesn't support custom loaders yet, but it's possible to implement it as well if someone needs it). Now only json and yaml supported
  3. also, I added the ability to specify multiple loaders. for me it is useful with mono repo, or when some library provides default translations, so I can load it. My specific use case is to package validation errors and distribute them across the organization
  4. also fixed all eslint and prettier issues

I also need to update the documentation if these changes are ok to do, also it's a breaking change probably, version 11 makes more sense.

I don't expect this pr to be merged, but more to have a conversation about all of these changes.

Thanks

Linked Issues

Additional context

the easiest way to test a client is to

npm install @saas-buildkit/nestjs-i18n nestjs-i18n -h

coveralls commented 11 months ago

Coverage Status

coverage: 87.259% (-3.6%) from 90.828% when pulling 38dffc3defcb65b8b1edeb5b8e867c5b41ec13a8 on saas-buildkit:feature/multiple_loaders_and_cli into 2eb5f4e6bba6a90c415fff6061d7396150e7d0e9 on toonvanstrijp:main.

vsamofal commented 11 months ago

I did fix all issues with pipelines.

@toonvanstrijp let me know when you can take a look and approve the work, so I can do the documentation part, and because of the breaking change it probably will be 11.0.0?

vsamofal commented 9 months ago

@rubiin @toonvanstrijp Hi guys, when you have time can you take a look

rubiin commented 9 months ago

Will be cherry picking some commits that are no breaking

thiagotognoli commented 9 months ago

@rubiin @toonvanstrijp Hi guys, when you have time can you take a look

please approve this pr, we need these changes

rubiin commented 3 months ago

Lets break the changes into different PR . Would be easier to review and rollout considering the breaking changes.

rubiin commented 2 months ago

closed in favor of https://github.com/toonvanstrijp/nestjs-i18n/pull/628