Skip to content

chore: scaffold hydrogen core module#3711

Draft
fredericoo wants to merge 3 commits intomainfrom
fb-scaffold-micropackage
Draft

chore: scaffold hydrogen core module#3711
fredericoo wants to merge 3 commits intomainfrom
fb-scaffold-micropackage

Conversation

@fredericoo
Copy link
Copy Markdown
Contributor

@fredericoo fredericoo commented Apr 13, 2026

WHY are these changes introduced?

Scaffolding basic core separate package for internal usage

WHAT is this pull request doing?

New package: @shopify/hydrogen-core

  • Scaffolds packages/hydrogen-core/ with tsup build, vitest, and tsconfig
  • Seeds it with shared constants (MOCK_SHOP_DOMAIN, isMockShop) — the kind of utility currently duplicated across hydrogen, hydrogen-react, and cli

Monorepo housekeeping

  • Adds @types/node (via catalog) to root devDependencies so the root tsconfig resolves cleanly

HOW to test your changes?

  1. pnpm install && pnpm build
  2. pnpm test — all existing tests should pass at their new paths
  3. Verify the new package builds: cd packages/hydrogen-core && pnpm build

Checklist

  • I've read the Contributing Guidelines
  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've added a changeset if this PR contains user-facing or functional changes. Test changes or internal-only config changes do not require a changeset.
  • I've added tests to cover my changes
  • I've added or updated the documentation

@shopify
Copy link
Copy Markdown
Contributor

shopify bot commented Apr 13, 2026

Oxygen deployed a preview of your fb-scaffold-micropackage branch. Details:

Storefront Status Preview link Deployment details Last update (UTC)
Skeleton (skeleton.hydrogen.shop) ✅ Successful (Logs) Preview deployment Inspect deployment April 15, 2026 2:58 PM

Learn more about Hydrogen's GitHub integration.

First step in the Hydrogen modularization effort. This adds the
hydrogen-core micro-package for shared, framework-agnostic constants
and utilities that are currently duplicated across hydrogen,
hydrogen-react, and cli-hydrogen.

- Register hydrogen-core in pnpm workspace
- Add @types/node to root devDependencies (resolves root tsconfig)
- Scaffold package with tsup build, vitest, and tsconfig
- Seed with isMockShop utility + tests as proof-of-scaffold

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@fredericoo fredericoo force-pushed the fb-scaffold-micropackage branch from d1a392a to f8ca0dd Compare April 13, 2026 19:22
fredericoo and others added 2 commits April 14, 2026 18:50
…ishing

Add hydrogen-core to the workspace listing in CONTRIBUTING.md so
contributors can discover the package. Populate the empty description
field and add a files array to package.json so that dist/ and skills/
are included in the npm tarball (skills/ follows the skills-npm
proposal for shipping AI agent context with packages).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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