Skip to content

feat(js): deprecate simpleName option in library generator #31673

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

Merged
merged 2 commits into from
Jun 21, 2025

Conversation

jaysoo
Copy link
Member

@jaysoo jaysoo commented Jun 20, 2025

The simpleName option is no longer useful as we've moved to using options "as provided" without transformation. Users should provide the exact name, directory, and import path they want to use.

Changes

  • Add x-deprecated to schema.json marking for removal in Nx 22
  • Add runtime warning when simpleName is used

🤖 Generated with Claude Code

Current Behavior

Users are confused with --simpleName with using --name AND --directory

Expected Behavior

We should tell users that only --name should be used.

Related Issue(s)

Fixes #29508

- Add x-deprecated to schema.json marking for removal in Nx 22
- Add runtime warning when simpleName is used
- Update description to recommend providing exact name instead

The simpleName option is no longer useful as we've moved to using
options "as provided" without transformation. Users should provide
the exact name, directory, and import path they want to use.

Fixes #29508

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@jaysoo jaysoo requested review from a team as code owners June 20, 2025 19:08
@jaysoo jaysoo requested review from Coly010 and FrozenPandaz June 20, 2025 19:08
Copy link

vercel bot commented Jun 20, 2025

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

Name Status Preview Updated (UTC)
nx-dev 🛑 Canceled (Inspect) Jun 20, 2025 8:27pm

Copy link

nx-cloud bot commented Jun 20, 2025

View your CI Pipeline Execution ↗ for commit a4a849d.

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 39m 40s View ↗
nx run-many -t check-imports check-commit check... ✅ Succeeded 18s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 4s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 3s View ↗
nx documentation ✅ Succeeded 2m 7s View ↗

☁️ Nx Cloud last updated this comment at 2025-06-20 20:48:59 UTC

@jaysoo jaysoo changed the title feat(angular): deprecate simpleName option in library generator feat(js): deprecate simpleName option in library generator Jun 20, 2025
@jaysoo jaysoo requested review from a team as code owners June 20, 2025 19:38
@jaysoo jaysoo force-pushed the feat/issue-29508-angular-deprecation branch from a98661d to 3357ba4 Compare June 20, 2025 19:51
Copy link
Contributor

claude bot commented Jun 20, 2025

✅ Clarified --name option in deprecation warnings

I've updated the deprecation warning messages in all library generators to clearly mention the --name option.

Todo List:

  • Read current deprecation warnings in all generator files
  • Update Angular library generator warning message
  • Update JS library generator warning message
  • Update Nest library generator warning message
  • Update React library generator warning message
  • Format code with prettier
  • Commit all changes

Changes Made:

Updated the deprecation warning message in all four library generators from:

"Please provide the exact name you want to use for the library instead."

To:

"Use the '--name' option to specify the exact name you want for the library."

This makes it much clearer to users how they should specify the library name when the simpleName option is deprecated.

Files updated:

  • packages/angular/src/generators/library/library.ts
  • packages/js/src/generators/library/library.ts
  • packages/nest/src/generators/library/library.ts
  • packages/react/src/generators/library/library.ts

Commit: b7b793f

View job run

- Add x-deprecated to schema.json marking for removal in Nx 22
- Add runtime warning when simpleName is used
- Update description to recommend using --name option instead

The simpleName option is no longer useful as we've moved to using
options "as provided" without transformation. Users should use the
--name option to provide the exact name, directory, and import path
they want.

Related to #29508

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@jaysoo jaysoo force-pushed the feat/issue-29508-angular-deprecation branch from b7b793f to a4a849d Compare June 20, 2025 20:02
@jaysoo jaysoo merged commit 57e70d0 into master Jun 21, 2025
8 checks passed
@jaysoo jaysoo deleted the feat/issue-29508-angular-deprecation branch June 21, 2025 01:39
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 Jun 27, 2025
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.

Angular Library Generator not working with non simpleName
2 participants