Skip to content
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

feat(repo): remove projectNameAndRoot nx.json option #19218

Merged
merged 1 commit into from Sep 21, 2023

Conversation

FrozenPandaz
Copy link
Collaborator

Current Behavior

When creating a new workspace, the behavior when generating projects changed to the new as-provided project name and root format.

There's a configuration option which disables the prompt.

Expected Behavior

When creating a new workspace, there are prompts just like for existing workspaces for the name and root of new projects.

There is no configuration to disable the prompt.

Related Issue(s)

Fixes #

@vercel
Copy link

vercel bot commented Sep 18, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 20, 2023 8:55pm

Comment on lines 170 to 171
const example = getExample(callingGenerator, formats);
logger.warn(deprecationWarning + '\n' + example);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should only be shown when result === 'derived', isn't it?

Comment on lines 15 to 17
delete nxJson?.workspaceLayout?.projectNameAndRootFormat;

if (Object.keys(nxJson?.workspaceLayout).length === 0) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we already checked nxJson.workspaceLayout is defined in line 11.

Suggested change
delete nxJson?.workspaceLayout?.projectNameAndRootFormat;
if (Object.keys(nxJson?.workspaceLayout).length === 0) {
delete nxJson.workspaceLayout.projectNameAndRootFormat;
if (Object.keys(nxJson.workspaceLayout).length === 0) {

Copy link
Member

@AgentEnder AgentEnder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good to me. Feel free to address Leo's nit first.

@FrozenPandaz FrozenPandaz merged commit 53a3277 into nrwl:master Sep 21, 2023
6 checks passed
jaysoo pushed a commit to jaysoo/nx that referenced this pull request Sep 21, 2023
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants