transloco: Bug(migrate): No files match pattern during migration

Is there an existing issue for this?

  • I have searched the existing issues

Which Transloco package(s) are the source of the bug?

transloco

Is this a regression?

Yes

Current behavior

Trying to migrate a project from ngx-translate, I get No files match the pattern for all file patterns even the files exist in the specified path.

Migrating HTML files 📜
√ Step 1/2: Migrating directives
⚠️ No files match the pattern: C:\Users\PC1\SomePath\MyApp\src\app\**\*.html
√ Step 2/2: Migrating pipes
⚠️ No files match the pattern: C:\Users\PC1\SomePath\MyApp\src\app\**\*.html
⚠️ No files match the pattern: C:\Users\PC1\SomePath\MyApp\src\app\**\*.html

Migrating TS files 📜
√ Step 1/5: Migrating modules
⚠️ No files match the pattern: C:\Users\PC1\SomePath\MyApp\src\app\**\*.ts
⚠️ No files match the pattern: C:\Users\PC1\SomePath\MyApp\src\app\**\*.ts
⚠️ No files match the pattern: C:\Users\PC1\SomePath\MyApp\src\app\**\*.ts
√ Step 2/5: Migrating service imports
⚠️ No files match the pattern: C:\Users\PC1\SomePath\MyApp\src\app\**\*.ts
⚠️ No files match the pattern: C:\Users\PC1\SomePath\MyApp\src\app\**\*.ts
⚠️ No files match the pattern: C:\Users\PC1\SomePath\MyApp\src\app\**\*.ts
√ Step 3/5: Migrating constructor injections
⚠️ No files match the pattern: C:\Users\PC1\SomePath\MyApp\src\app\**\*.ts
√ Step 4/5: Migrating service usage
⚠️ No files match the pattern: C:\Users\PC1\SomePath\MyApp\src\app\**\*.ts
√ Step 5/5: Migrating specs
⚠️ No files match the pattern: C:\Users\PC1\SomePath\MyApp\src\app\**\*spec.ts

Expected behavior

Migration should successfully migrate the files.

Please provide a link to a minimal reproduction of the bug, if you won’t provide a link the issue won’t be handled.

https://codesandbox.io/s/ngneat-transloco-kn52hs

Transloco Config

No response

Please provide the environment you discovered this bug in

Transloco: 5.0.7
Angular: 16
Node: 18
Package Manager: yarn v1
OS: Windows 10

Browser

No response

Additional context

No response

I would like to make a pull request for this bug

No

About this issue

  • Original URL
  • State: open
  • Created 10 months ago
  • Comments: 16 (9 by maintainers)

Most upvoted comments

@hakimio You can do it if you want to 👍

@hakimio I think the migration script is the only one using it, so once done you shouldn’t encounter it anymore

Ok, for now I can just pin replace-in-file version on my end:

"resolutions": {
  "replace-in-file": "6.3.5"
}

Ok, I can confirm that it works correctly with replace-in-file v6.3.5, but not with the latest v7.0.1. So it’s an issue with replace-in-file library.

Latest, 5.0.7.