jsverse / transloco-keys-manager

🦄 The Key to a Better Translation Experience

Home Page:https://github.com/jsverse/transloco/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

normalizedGlob does not find the path to the package nested in the directory

JSProto opened this issue · comments

commented

I have a monorepository with the nx library.
packages of different projects are in separate directories.

libs/
   project1/
      mypackage
   project2/
       otherpackage

when I create a package through the nx console, its name in libs/project2/otherpackage/package.json looks like project2-otherpackage

{
  "name": "project2-otherpackage",
  "$schema": "../../../node_modules/nx/schemas/project-schema.json",
  "projectType": "library",

https://github.com/ngneat/transloco-keys-manager/blob/9affd8edebdf3520c9f499b73de88325d8ca7506/src/utils/resolve-project-base-path.ts#L48
because of this projectName - normalizedGlob does not find the path to the package nested in the directory

If you manually change the name to project2/otherpackage then everything works.

{
  "name": "project2/otherpackage",
  "$schema": "../../../node_modules/nx/schemas/project-schema.json",
  "projectType": "library",

can this be fixed?