You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We hope to understand better the bugs claimed by @leosvelperez so we can design a solution to pivot if necessary.
Are there a couple of areas of code we can use as examples that will better inform us? Only one place in the repo seems to use the name property from project.json: the README.md. Every other use case we can see uses directory pathing, which doesn't inform us that they need to be aligned with the project name.
if (
options.newProjectName &&
options.newProjectName.includes('/') &&
!options.newProjectName.startsWith('@')
) {
throw new Error(
`You can't specify a new project name with a directory path (${options.newProjectName}). ` +
`Please provide a valid name without path segments and the full destination with the "--destination" option.`
);
}
In 18, with this command:
nx g mv --projectName=packages/boots-sdk --destination=packages/cats-sdk --newProjectName=cats-sdk
We notice that package.json is updated from "name": "packages/boots-sdk" to include our workspace scope @xx/cats-sdk, but also removes prefix packages/.
We notice that "name": "packages/boots-sdk" is updated to "name": "cats-sdk" in project.json
One of our alias's in tsconfig.json didn't change as expected:
As you've discovered, you can use scoped package names as your Nx project names. This would match more closely to your package names (in their package.json).
To achieve what you want, you can provide the --importPath option:
nx g mv --projectName=packages/boots-sdk --destination=packages/cats-sdk --newProjectName=@xp/cats-sdk --importPath=@xp/cats-sdk/types
Hi, our team is currently using directory pathing for our project names. This change may either create or expose a massive problem in our mono-repo.
Originally posted by @github-actions[bot] in #20768 (comment)
We hope to understand better the bugs claimed by @leosvelperez so we can design a solution to pivot if necessary.
Are there a couple of areas of code we can use as examples that will better inform us? Only one place in the repo seems to use the name property from
project.json
: theREADME.md
. Every other use case we can see uses directory pathing, which doesn't inform us that they need to be aligned with the project name.In 18, with this command:
package.json
is updated from"name": "packages/boots-sdk"
to include our workspace scope@xx/cats-sdk
, but also removes prefixpackages/
."name": "packages/boots-sdk"
is updated to"name": "cats-sdk"
inproject.json
tsconfig.json
didn't change as expected:changed to
In 17.1.3, with the same command:
package.json
maintains updated with our workspace scope@xx/cats-sdk
."name": "packages/boots-sdk"
is updated to"name": "packages/cats-sdk"
and directory paths are updated as expected.tsconfig
and alias's maintainpackages/
prefix.Your work and help is appreciated.
The text was updated successfully, but these errors were encountered: