Skip to content

fix(cli): save generator arguments in command metadata - #11812

Open
raymondfeng wants to merge 3 commits into
masterfrom
fix/cli-yo-rc-arguments
Open

raymondfeng wants to merge 3 commits into
masterfrom
fix/cli-yo-rc-arguments

Conversation

@raymondfeng

Copy link
Copy Markdown
Contributor

lb4 --meta collects each generator's arguments inside if (!gen) { ... }. A generator that was just created is always truthy, so that block never runs and every command gets written as "arguments": [].

The committed packages/cli/.yo-rc.json still lists the arguments. So running lb4 --meta, or the test "saves command metadata to .yo-rc.json", which calls it without dryRun, rewrote the file with the arguments stripped, and the test failed with .yo-rc.json has been updated. Found while reviewing #11793, which had committed the stripped file.

  • packages/cli/lib/cli.js: checks gen._arguments instead of !gen. With the fix, lb4 --meta reports .yo-rc.json is up to date.
  • The test's snapshot of .yo-rc.json gains the editorconfig options that c2441cb added to the file without updating the snapshot.

test/integration/cli/cli.integration.js: 5 passing (previously 1 failing).

Checklist

  • DCO (Developer Certificate of Origin) signed in all commits
  • npm test passes on your machine: ran the affected CLI integration test only
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • API Documentation in code was updated
  • Documentation in /docs/site was updated
  • Affected artifact templates in packages/cli were updated
  • Affected example projects in examples/* were updated

🤖 Generated with Claude Code

`lb4 --meta` collected generator arguments only `if (!gen)`, which is never
true for a generator that was just created, so it wrote `"arguments": []` for
every command. The committed `.yo-rc.json` still lists the arguments, so
running the command or the "saves command metadata to .yo-rc.json" test
rewrote the file and failed.

The test snapshot of `.yo-rc.json` is updated with the `editorconfig` options
that c2441cb added to the file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Raymond Feng <enjoyjava@gmail.com>
raymondfeng and others added 2 commits October 1, 2026 22:15
The US Census geocoder now returns slightly different coordinates for the test
address, so `GeoLookupService` and `TodoApplication` tests fail on every
platform, on master as well.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Raymond Feng <enjoyjava@gmail.com>
The hook that launches puppeteer and loads the page intermittently exceeds
15 seconds on the ubuntu-latest runners. It now gets 30 seconds, the same as
the hook that generates the bundle.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Raymond Feng <enjoyjava@gmail.com>

This branch has not been deployed

No deployments
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.

1 participant