mirror of
https://github.com/hanzoai/pack.git
synced 2026-09-30 23:43:13 +00:00
* docs: add monorepo support section to Node.js documentation Addresses user questions about monorepo support by documenting that Railpack automatically handles npm/pnpm/yarn workspaces and Turborepo configurations with links to example projects. * test: improve monorepo example tests to verify workspace functionality Enhanced integration tests for monorepo examples to properly test that workspace package linking and dependencies work correctly: **node-npm-workspaces:** - Root now imports and uses functions from pkg-a and pkg-b workspace packages - pkg-a uses its dependency (abbrev) to demonstrate transitive deps work - pkg-b exports a simple function - Updated to ES modules for consistency - Test now verifies all workspace packages load and execute correctly **node-pnpm-workspaces:** - Root now imports and uses functions from pkg-a and pkg-b workspace packages - pkg-a uses its dependency (abbrev) to demonstrate transitive deps work - pkg-b exports a simple function - Updated to ES modules for consistency - Test now verifies all workspace packages load and execute correctly **node-turborepo:** - Changed from justBuild to httpCheck since this is a Next.js web server - Added start script to root package.json to run the web app - Test now verifies the built app starts and responds to HTTP requests - This properly tests that the @repo/ui workspace package is built and linked These changes ensure that monorepo builds are actually testing workspace functionality, not just that the root package builds in isolation. Fixes #332 * feat: add yarn workspaces and full-stack monorepo examples Added two new monorepo examples to complete coverage: **node-yarn-workspaces:** - Demonstrates yarn workspaces with workspace package imports - Uses the packageManager field for corepack - Similar structure to npm/pnpm workspace examples for consistency - Tests that workspace packages load and transitive dependencies work **node-monorepo-fullstack:** - Real-world example with Express API + frontend + shared package - Shows how to share code (@monorepo/shared) between API and web packages - API uses Express and shared utilities/constants - Frontend demonstrates importing shared code - Uses HTTP checks to verify API endpoints work correctly - Demonstrates common full-stack monorepo pattern Updated documentation to link to the yarn workspaces example and added a note about the full-stack example for users looking for a more realistic monorepo setup. Addresses #332 * fix: format pkg-b package.json properly Fixed uglified JSON that was created with echo instead of proper editing. * fix: add yarn.lock and workspace deps to yarn-workspaces example - Added yarn.lock file required by yarn 4 - Added workspace package dependencies (pkg-a, pkg-b) to root package.json - Yarn requires lockfile to exist and won't create one in CI mode * fix: update yarn.lock with correct workspace references - Added workspace:* aliases to pkg-a and pkg-b entries - Removed unused transitive dependencies that aren't in package.json - Yarn requires both the workspace:* and workspace:packages/* forms * docs: add lockfile guidelines to CLAUDE.md Never manually update lockfiles - always use the package manager to generate them properly with correct checksums. * fix: add workspace deps to pnpm-workspaces package.json ES module imports require workspace packages to be listed as dependencies in the root package.json for Node.js to resolve them correctly. * fix: generate yarn.lock with proper checksums using yarn Used yarn install via corepack to generate proper yarn.lock with real checksums instead of manually creating fake ones. Also includes Yarn PnP files (.pnp.cjs, .pnp.loader.mjs, .yarn/) generated by yarn 4. * fix: regenerate lockfiles using package managers Regenerated pnpm-lock.yaml and yarn install-state.gz using the actual package managers (pnpm and yarn via corepack) instead of manual edits. - pnpm-lock.yaml: Updated for new workspace dependencies - .yarn/install-state.gz: Regenerated by yarn install * fix: remove Yarn PnP files and add .gitignore Yarn PnP files (.pnp.cjs, .pnp.loader.mjs, .yarn/install-state.gz) should not be committed as they contain environment-specific paths. They will be generated during yarn install at build time. Added .gitignore matching the pattern used in node-yarn-3 example. * test: update snapshots * refactor: merge the more realistic monorepo example into existing npm workspaces example * build: ignore example claude folders * test: snapshot update * test: improve unit tests for node workspaces * docs: deslop AI documentation * test: improve turborepo example * test: update snapshots * test: update unit test for changed monorepo structure * test: update snapshot --------- Co-authored-by: Hanzo Dev <[email protected]>
This is a Next.js project bootstrapped with create-next-app.
Getting Started
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Inter, a custom Google Font.
Learn More
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
Deploy on Vercel
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.