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

fix(angular): normalize name when forced to build selector #29417

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

Coly010
Copy link
Contributor

@Coly010 Coly010 commented Dec 19, 2024

Current Behavior

When passing a project name with a / in it to the library generator, this name passes through to the component generator.
The component generator may then attempt to build a selector from this name, however, it does not normalize the /.

Expected Behavior

Ensure the / is normalized from the name when building the selector

Related Issue(s)

Fixes #29229

@Coly010 Coly010 requested a review from a team as a code owner December 19, 2024 10:53
@Coly010 Coly010 requested a review from jaysoo December 19, 2024 10:53
@Coly010 Coly010 self-assigned this Dec 19, 2024
Copy link

vercel bot commented Dec 19, 2024

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

1 Skipped Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Dec 19, 2024 2:26pm

Copy link

nx-cloud bot commented Dec 19, 2024

View your CI Pipeline Execution ↗ for commit feedd6c.

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 26m 3s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 1m 7s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded <1s View ↗
nx-cloud record -- nx format:check --base=bdc76... ✅ Succeeded 19s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 18s View ↗
nx documentation --no-dte ✅ Succeeded 44s View ↗

☁️ Nx Cloud last updated this comment at 2024-12-19 14:55:00 UTC

@Coly010 Coly010 force-pushed the angular/library-generation branch from 50ad4ea to 97dcc4c Compare December 19, 2024 14:15
@Coly010 Coly010 requested a review from a team as a code owner December 19, 2024 14:15
@Coly010 Coly010 requested a review from AgentEnder December 19, 2024 14:15
@Coly010 Coly010 force-pushed the angular/library-generation branch from 97dcc4c to 1a02ba9 Compare December 19, 2024 14:18
@Coly010 Coly010 force-pushed the angular/library-generation branch from 1a02ba9 to feedd6c Compare December 19, 2024 14:23
@Coly010 Coly010 merged commit 77ba049 into master Dec 19, 2024
6 checks passed
@Coly010 Coly010 deleted the angular/library-generation branch December 19, 2024 15:00
ndcunningham pushed a commit that referenced this pull request Dec 20, 2024
## Current Behavior
When passing a project name with a `/` in it to the library generator,
this name passes through to the `component` generator.
The `component` generator may then attempt to build a selector from this
name, however, it does not normalize the `/`.

## Expected Behavior
Ensure the `/` is normalized from the name when building the selector

## Related Issue(s)

Fixes #29229
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generating @nx/angular:library with the name parameter fails with an error - The selector is invalid.
2 participants