Skip to content

feat(ci): add scaffolding tests for npm, pnpm, and yarn#3458

Draft
itsjustriley wants to merge 2 commits intomainfrom
add-e2e-tests-for-package-managers
Draft

feat(ci): add scaffolding tests for npm, pnpm, and yarn#3458
itsjustriley wants to merge 2 commits intomainfrom
add-e2e-tests-for-package-managers

Conversation

@itsjustriley
Copy link
Contributor

@itsjustriley itsjustriley commented Feb 10, 2026

WHY are these changes introduced?

Resolves developer-tools-team/issues/1042

There were no CI checks validating that create-hydrogen correctly scaffolds projects with different package managers. A bug in handleDependencies was silently causing --package-manager to be ignored when --install-deps was explicitly true — all scaffolded projects used npm regardless of the specified package manager.

WHAT is this pull request doing?

CI scaffolding tests — Adds a new test_scaffolding job to CI that uses a GitHub Actions matrix to test each package manager (npm, pnpm, yarn, bun) in parallel. Each matrix entry:

  1. Installs the package manager (if not pre-installed)
  2. Runs create-hydrogen with --package-manager
  3. Verifies the correct lockfile exists
  4. Builds the scaffolded app

Bug fix — Adds a missing else branch in handleDependencies
(packages/cli/src/lib/onboarding/common.ts). When --install-deps was true and --package-manager was a known PM (not unknown), actualPackageManager stayed as the default 'npm' because neither the unknown nor undefined branches executed.

Unit test — Verifies that setupTemplate with installDeps: true and packageManager: 'pnpm' calls installNodeModules with pnpm.

HOW to test your changes?

The CI scaffolding tests run automatically on the PR.

Checklist

@shopify
Copy link
Contributor

shopify bot commented Feb 10, 2026

Oxygen deployed a preview of your add-e2e-tests-for-package-managers branch. Details:

Storefront Status Preview link Deployment details Last update (UTC)
Skeleton (skeleton.hydrogen.shop) ⏳ In progress (Logs) - Inspect deployment February 10, 2026 2:58 PM

Learn more about Hydrogen's GitHub integration.

@fredericoo
Copy link
Contributor

code looks great but tests with bun will fail until this or this lands

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.

2 participants