fix(cli): save generator arguments in command metadata - #11812
Open
raymondfeng wants to merge 3 commits into
Open
raymondfeng wants to merge 3 commits into
raymondfeng wants to merge 3 commits into
Conversation
`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>
6 of 8 tasks
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>
4 of 8 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
lb4 --metacollects each generator's arguments insideif (!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.jsonstill lists the arguments. So runninglb4 --meta, or the test "saves command metadata to .yo-rc.json", which calls it withoutdryRun, 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: checksgen._argumentsinstead of!gen. With the fix,lb4 --metareports.yo-rc.json is up to date..yo-rc.jsongains theeditorconfigoptions that c2441cb added to the file without updating the snapshot.test/integration/cli/cli.integration.js: 5 passing (previously 1 failing).Checklist
npm testpasses on your machine: ran the affected CLI integration test onlypackages/cliwere updatedexamples/*were updated🤖 Generated with Claude Code