Skip to content

fix(config-nx-scopes): add unique names to fixture projects#4622

Merged
escapedcat merged 2 commits intomasterfrom
fix/nx-fixtures-issues
Feb 2, 2026
Merged

fix(config-nx-scopes): add unique names to fixture projects#4622
escapedcat merged 2 commits intomasterfrom
fix/nx-fixtures-issues

Conversation

@escapedcat
Copy link
Member

@escapedcat escapedcat commented Feb 2, 2026

User description

to prevent NX conflicts

NX requires unique project names across the workspace. The test fixtures had generic names (a, b, c, etc.) which caused MultipleProjectsWithSameNameError during lerna publish when NX builds the project graph.

Adds explicit 'name' field to each fixture project.json with unique identifiers based on the fixture directory (fixture-basic-a, fixture-nx14-c, etc).

This prevents publish failures while maintaining test fixture functionality.


PR Type

Bug fix


Description

  • Add unique name fields to fixture project.json files

  • Prevent NX MultipleProjectsWithSameNameError during lerna publish

  • Use fixture-directory-letter naming convention for all projects


Diagram Walkthrough

flowchart LR
  A["Fixture project.json files<br/>without name field"] -- "Add unique name field<br/>fixture-{type}-{letter}" --> B["Projects with unique<br/>identifiers"]
  B -- "Prevents" --> C["NX project graph<br/>conflicts"]
Loading

File Walkthrough

Relevant files
Bug fix
project.json
Add unique name to basic fixture a                                             

@commitlint/config-nx-scopes/fixtures/basic/nx/a/project.json

  • Add "name": "fixture-basic-a" field to project configuration
+1/-0     
project.json
Add unique name to basic fixture b                                             

@commitlint/config-nx-scopes/fixtures/basic/nx/b/project.json

  • Add "name": "fixture-basic-b" field to project configuration
+1/-0     
project.json
Add unique name to nx14 fixture c                                               

@commitlint/config-nx-scopes/fixtures/nx14/nx/c/project.json

  • Add "name": "fixture-nx14-c" field to project configuration
+1/-0     
project.json
Add unique name to nx14 fixture d                                               

@commitlint/config-nx-scopes/fixtures/nx14/nx/d/project.json

  • Add "name": "fixture-nx14-d" field to project configuration
+1/-0     
project.json
Add unique name to nx15 fixture e                                               

@commitlint/config-nx-scopes/fixtures/nx15/nx/e/project.json

  • Add "name": "fixture-nx15-e" field to project configuration
+1/-0     
project.json
Add unique name to nx15 fixture f                                               

@commitlint/config-nx-scopes/fixtures/nx15/nx/f/project.json

  • Add "name": "fixture-nx15-f" field to project configuration
+1/-0     
project.json
Add unique name to nx17 fixture g                                               

@commitlint/config-nx-scopes/fixtures/nx17/nx/g/project.json

  • Add "name": "fixture-nx17-g" field to project configuration
+1/-0     
project.json
Add unique name to nx17 fixture h                                               

@commitlint/config-nx-scopes/fixtures/nx17/nx/h/project.json

  • Add "name": "fixture-nx17-h" field to project configuration
+1/-0     

…t NX conflicts

NX requires unique project names across the workspace. The test fixtures
had generic names (a, b, c, etc.) which caused MultipleProjectsWithSameNameError
during lerna publish when NX builds the project graph.

Adds explicit 'name' field to each fixture project.json with unique
identifiers based on the fixture directory (fixture-basic-a, fixture-nx14-c, etc).

This prevents publish failures while maintaining test fixture functionality.
@qodo-code-review
Copy link

qodo-code-review bot commented Feb 2, 2026

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

  • Update
Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@codesandbox-ci
Copy link

codesandbox-ci bot commented Feb 2, 2026

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@qodo-code-review
Copy link

qodo-code-review bot commented Feb 2, 2026

PR Code Suggestions ✨

No code suggestions found for the PR.

…rojects

Update test assertions to match the new unique project names
(fixture-basic-a, fixture-nx14-c, etc.) that were added to resolve
NX duplicate project name conflicts.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates Nx fixture projects to use unique, explicit project names and adjusts tests to assert the new names, preventing Nx project-graph conflicts during lerna publish.

Changes:

  • Added "name" fields to all relevant Nx fixture project.json files with a fixture-{fixtureDir}-{letter} naming convention.
  • Updated @commitlint/config-nx-scopes/index.test.js expectations so scope-enum now returns the new fixture project names.
  • Ensured consistency of names across Nx versions (basic, Nx 14, 15, and 17) used by the tests.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
@commitlint/config-nx-scopes/index.test.js Adjusts expected scope-enum values to match the new unique fixture project names for all Nx fixture workspaces.
@commitlint/config-nx-scopes/fixtures/basic/nx/a/project.json Adds "name": "fixture-basic-a" so the basic fixture a has a unique Nx project name.
@commitlint/config-nx-scopes/fixtures/basic/nx/b/project.json Adds "name": "fixture-basic-b" so the basic fixture b has a unique Nx project name.
@commitlint/config-nx-scopes/fixtures/nx14/nx/c/project.json Adds "name": "fixture-nx14-c" to uniquely identify the Nx 14 fixture c.
@commitlint/config-nx-scopes/fixtures/nx14/nx/d/project.json Adds "name": "fixture-nx14-d" to uniquely identify the Nx 14 fixture d.
@commitlint/config-nx-scopes/fixtures/nx15/nx/e/project.json Adds "name": "fixture-nx15-e" to uniquely identify the Nx 15 fixture e.
@commitlint/config-nx-scopes/fixtures/nx15/nx/f/project.json Adds "name": "fixture-nx15-f" to uniquely identify the Nx 15 fixture f.
@commitlint/config-nx-scopes/fixtures/nx17/nx/g/project.json Adds "name": "fixture-nx17-g" to uniquely identify the Nx 17 fixture g.
@commitlint/config-nx-scopes/fixtures/nx17/nx/h/project.json Adds "name": "fixture-nx17-h" to uniquely identify the Nx 17 fixture h.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@escapedcat escapedcat merged commit 5635cf0 into master Feb 2, 2026
29 checks passed
@escapedcat escapedcat deleted the fix/nx-fixtures-issues branch February 2, 2026 12:30
This was referenced Feb 19, 2026
This was referenced Feb 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants