fix(config-nx-scopes): add unique names to fixture projects#4622
fix(config-nx-scopes): add unique names to fixture projects#4622escapedcat merged 2 commits intomasterfrom
Conversation
…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.
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||
|
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. |
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.
There was a problem hiding this comment.
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 fixtureproject.jsonfiles with afixture-{fixtureDir}-{letter}naming convention. - Updated
@commitlint/config-nx-scopes/index.test.jsexpectations soscope-enumnow 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.
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
namefields to fixture project.json filesPrevent 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"]File Walkthrough
project.json
Add unique name to basic fixture a@commitlint/config-nx-scopes/fixtures/basic/nx/a/project.json
"name": "fixture-basic-a"field to project configurationproject.json
Add unique name to basic fixture b@commitlint/config-nx-scopes/fixtures/basic/nx/b/project.json
"name": "fixture-basic-b"field to project configurationproject.json
Add unique name to nx14 fixture c@commitlint/config-nx-scopes/fixtures/nx14/nx/c/project.json
"name": "fixture-nx14-c"field to project configurationproject.json
Add unique name to nx14 fixture d@commitlint/config-nx-scopes/fixtures/nx14/nx/d/project.json
"name": "fixture-nx14-d"field to project configurationproject.json
Add unique name to nx15 fixture e@commitlint/config-nx-scopes/fixtures/nx15/nx/e/project.json
"name": "fixture-nx15-e"field to project configurationproject.json
Add unique name to nx15 fixture f@commitlint/config-nx-scopes/fixtures/nx15/nx/f/project.json
"name": "fixture-nx15-f"field to project configurationproject.json
Add unique name to nx17 fixture g@commitlint/config-nx-scopes/fixtures/nx17/nx/g/project.json
"name": "fixture-nx17-g"field to project configurationproject.json
Add unique name to nx17 fixture h@commitlint/config-nx-scopes/fixtures/nx17/nx/h/project.json
"name": "fixture-nx17-h"field to project configuration