Skip to content

fix: Fixes issue with patternfly-starter seed is not building.#34

Open
dlabaj wants to merge 1 commit intopatternfly:mainfrom
dlabaj:pf-seed-fix
Open

fix: Fixes issue with patternfly-starter seed is not building.#34
dlabaj wants to merge 1 commit intopatternfly:mainfrom
dlabaj:pf-seed-fix

Conversation

@dlabaj
Copy link
Copy Markdown
Contributor

@dlabaj dlabaj commented Apr 21, 2026

This fixes the bug where the PatternFly seed (starter selection when creating a project) does not build. Closes jira issue #4007

Summary by CodeRabbit

  • Chores
    • Updated the starter template to use npm as the default package manager instead of yarn.
    • Optimized git clone behavior with enhanced checkout options.

@dlabaj dlabaj requested a review from jpuzz0 April 21, 2026 20:19
@dlabaj dlabaj self-assigned this Apr 21, 2026
@dlabaj dlabaj added the bug Something isn't working label Apr 21, 2026
@github-project-automation github-project-automation Bot moved this to Needs triage in PatternFly Issues Apr 21, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 21, 2026

Walkthrough

Updated the starter template entry in src/templates.ts by adding git checkout options (--single-branch --branch main) and changing the packageManager from yarn to npm. No changes to exported type signatures.

Changes

Cohort / File(s) Summary
Template Configuration
src/templates.ts
Modified the starter template entry to include additional git checkout options and switch the package manager from yarn to npm.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: fixing a build issue with the patternfly-starter seed template by updating git options and package manager.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@dlabaj dlabaj changed the base branch from pf-seed-fix to main April 21, 2026 20:20
fix: Fixes issue with patternfly-startarter seed not building.
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 83d75294-8f31-4651-80aa-cd4ec1c3079a

📥 Commits

Reviewing files that changed from the base of the PR and between 3d0a15c and 2912c7e.

📒 Files selected for processing (1)
  • src/templates.ts

Comment thread src/templates.ts
Comment on lines +22 to +23
options: ["--single-branch", "--branch", "main"],
packageManager: "npm"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Needs triage

Development

Successfully merging this pull request may close these issues.

1 participant