fix: Fixes issue with patternfly-starter seed is not building.#34
fix: Fixes issue with patternfly-starter seed is not building.#34dlabaj wants to merge 1 commit intopatternfly:mainfrom
Conversation
WalkthroughUpdated the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
fix: Fixes issue with patternfly-startarter seed not building.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/templates.ts`:
- Around line 22-23: The test failure is caused by the starter template
switching to packageManager: "npm"; update the test in
src/__tests__/create.test.ts that asserts the runtime installer, so that the
assertion for runCreate(projectDir, 'starter') expects execa to be invoked with
'npm' instead of 'yarn' (or alternatively change the test to call a yarn-based
template like 'compass-starter'/'nextjs-starter'); modify the expectation that
inspects execa calls in the “uses template packageManager and runs install” test
to match the new packageManager value for the 'starter' template.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| options: ["--single-branch", "--branch", "main"], | ||
| packageManager: "npm" |
There was a problem hiding this comment.
Update the failing create.test.ts test to match the new starter packageManager.
The existing test uses template packageManager and runs install in src/__tests__/create.test.ts (lines 221–232) asserts that runCreate(projectDir, 'starter') invokes execa with 'yarn'. Switching starter to packageManager: "npm" here will cause that test to fail. Please update the assertion to expect 'npm' (or re-point the test at compass-starter/nextjs-starter if the intent is to keep a yarn-based check).
🧪 Suggested test update
- expect(mockExeca).toHaveBeenNthCalledWith(
- 2,
- 'yarn',
- ['install'],
- expect.objectContaining({ cwd: projectPath, stdio: 'inherit' })
- );
+ expect(mockExeca).toHaveBeenNthCalledWith(
+ 2,
+ 'npm',
+ ['install'],
+ expect.objectContaining({ cwd: projectPath, stdio: 'inherit' })
+ );🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/templates.ts` around lines 22 - 23, The test failure is caused by the
starter template switching to packageManager: "npm"; update the test in
src/__tests__/create.test.ts that asserts the runtime installer, so that the
assertion for runCreate(projectDir, 'starter') expects execa to be invoked with
'npm' instead of 'yarn' (or alternatively change the test to call a yarn-based
template like 'compass-starter'/'nextjs-starter'); modify the expectation that
inspects execa calls in the “uses template packageManager and runs install” test
to match the new packageManager value for the 'starter' template.
This fixes the bug where the PatternFly seed (starter selection when creating a project) does not build. Closes jira issue #4007
Summary by CodeRabbit