Skip to content

migrate not working for big project #476

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

Open
vladkasianenko opened this issue Jul 9, 2021 · 1 comment
Open

migrate not working for big project #476

vladkasianenko opened this issue Jul 9, 2021 · 1 comment
Labels
enhancement New feature or request PRs welcome

Comments

@vladkasianenko
Copy link

vladkasianenko commented Jul 9, 2021

Current behavior

Angular 12 with @ngx-translate. After running ng g @ngneat/transloco:migrate I selected NgxTranslate and provided path to the app. All files process, however, TranslateService only changed in the constructor, no method ovverrides and in the .spec.ts files no import updates.
image
image
image

Complex pipe use:
image

Expected behavior

  • .spec.ts imports are updated as well
  • service methods ovveriden just like it stated in the documentation
  • deps updated as well
  • complex pipe use

Transloco config

After migration, there's no any loaders or something.
image

Environment

- Transloco version: 2.22.0
- Angular version: 12.0.5

For Tooling issues:


- Node version: 16.4.0
- Platform:  Windows

As a part of resolution I needed to replace all .instant, .get and so on manually, then added TranslocoRootModule.

@shaharkazaz
Copy link
Collaborator

@vladkasianenko I appreciate the detailed issue.
The migration command is limited in what it can do and should reduce the time you spend in the migration but as noted in the docs you might need manual changes as well (which as I understand were quite a few in your case).

From what I'm seeing you have a bit more complex use-cases in both the template (nested pipes) and the component (using the translation service indirectly via a provider).

Since you have the repo and the experience with these issues I encourage you to improve the migration command and open a PR for it 😄

@shaharkazaz shaharkazaz added enhancement New feature or request PRs welcome labels Jul 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request PRs welcome
Projects
None yet
Development

No branches or pull requests

2 participants