Skip to content

fix(misc): handle non-interactive mode and add template shorthand names for CNW#35045

Merged
jaysoo merged 1 commit into
masterfrom
NXC-4153
Mar 27, 2026
Merged

fix(misc): handle non-interactive mode and add template shorthand names for CNW#35045
jaysoo merged 1 commit into
masterfrom
NXC-4153

Conversation

@jaysoo

@jaysoo jaysoo commented Mar 27, 2026

Copy link
Copy Markdown
Member

This PR address some common errors seen during CNW around --template and --preset during non-interactive flows that are not AI agents. Also sees that some template names are not qualified with nrwl/<name>-template so we can normal though (which also makes it shorter in docs).

Current Behavior

In non-interactive contexts (IDE terminals, scripts, SSH without -t), determineTemplate() returns 'custom' which routes to the preset flow. Without --preset provided, this throws "Preset is required", which affects ~15 users/day (~145 occurrences Mar 18-27).

Users must also pass full template paths like --template=nrwl/angular-template.

Expected Behavior

Non-interactive mode defaults to nrwl/empty-template (template flow) instead of 'custom' (preset flow) when neither --preset nor --template is provided.

Shorthand template names are supported:

  • --template=angularnrwl/angular-template
  • --template=reactnrwl/react-template
  • --template=typescriptnrwl/typescript-template
  • --template=emptynrwl/empty-template

Related Issue(s)

Fixes NXC-4153

…es for CNW

## Current Behavior

In non-interactive contexts (IDE terminals, scripts, SSH without -t),
`determineTemplate()` returns `'custom'` which routes to the preset flow.
Without `--preset` provided, this throws "Preset is required" — a 22.6.0
regression affecting ~15 users/day.

Users must also pass full template paths like `--template=nrwl/angular-template`.

## Expected Behavior

Non-interactive mode defaults to `nrwl/empty-template` (template flow) instead
of `'custom'` (preset flow) when neither `--preset` nor `--template` is provided.

Shorthand template names are supported:
- `--template=angular` → `nrwl/angular-template`
- `--template=react` → `nrwl/react-template`
- `--template=typescript` → `nrwl/typescript-template`
- `--template=empty` → `nrwl/empty-template`

## Related Issue(s)

Fixes NXC-4153
@jaysoo jaysoo requested a review from a team as a code owner March 27, 2026 17:09
@jaysoo jaysoo requested a review from MaxKless March 27, 2026 17:09
@netlify

netlify Bot commented Mar 27, 2026

Copy link
Copy Markdown

Deploy Preview for nx-dev ready!

Name Link
🔨 Latest commit ebc19c7
🔍 Latest deploy log https://app.netlify.com/projects/nx-dev/deploys/69c6b9e960289700080a2e26
😎 Deploy Preview https://deploy-preview-35045--nx-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Mar 27, 2026

Copy link
Copy Markdown

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit ebc19c7
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/69c6b9e986e6990008632734
😎 Deploy Preview https://deploy-preview-35045--nx-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@nx-cloud

nx-cloud Bot commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit ebc19c7

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 16m 9s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 6s View ↗
nx-cloud record -- pnpm nx conformance:check ✅ Succeeded 7s View ↗
nx build workspace-plugin ✅ Succeeded <1s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 1s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-27 17:30:39 UTC

@jaysoo jaysoo merged commit 7540eb7 into master Mar 27, 2026
26 checks passed
@jaysoo jaysoo deleted the NXC-4153 branch March 27, 2026 17:34
FrozenPandaz pushed a commit that referenced this pull request Mar 27, 2026
…es for CNW (#35045)

This PR address some common errors seen during CNW around `--template`
and `--preset` during non-interactive flows that are not AI agents. Also
sees that some template names are not qualified with
`nrwl/<name>-template` so we can normal though (which also makes it
shorter in docs).

## Current Behavior

In non-interactive contexts (IDE terminals, scripts, SSH without `-t`),
`determineTemplate()` returns `'custom'` which routes to the preset
flow. Without `--preset` provided, this throws "Preset is required",
which affects ~15 users/day (~145 occurrences Mar 18-27).

Users must also pass full template paths like
`--template=nrwl/angular-template`.

## Expected Behavior

Non-interactive mode defaults to `nrwl/empty-template` (template flow)
instead of `'custom'` (preset flow) when neither `--preset` nor
`--template` is provided.

Shorthand template names are supported:
- `--template=angular` → `nrwl/angular-template`
- `--template=react` → `nrwl/react-template`
- `--template=typescript` → `nrwl/typescript-template`
- `--template=empty` → `nrwl/empty-template`

## Related Issue(s)

Fixes NXC-4153
@github-actions

github-actions Bot commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

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 Apr 2, 2026
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.

2 participants