feat: Add support for generating files field in package.json and move prisma back to dev dependency#722
Conversation
… prisma back to dev dependency
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: bd4bd1f The changes in this PR will be included in the next version bump. This PR includes changesets to release 18 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
📝 WalkthroughWalkthroughAdds support for generating the package.json "files" field in generators, updates generator implementations to populate node.files (including build/dist/prisma paths), moves Prisma from prod → dev dependencies in generator outputs and example backends, and updates example package.json files and changesets accordingly. Changes
Sequence Diagram(s)(omitted) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (3)
examples/blog-with-auth/apps/admin/package.json (1)
8-10: Consider whether thefilesfield is needed for a private package.The
filesfield specifies which files are included when publishing to npm. Since this package is marked as"private": true, it won't be published, making this field currently unnecessary. However, if this is intended for other tooling or future use, this is fine.examples/todo-with-auth0/apps/admin/package.json (1)
8-10: Consider whether thefilesfield is needed for a private package.The
filesfield specifies which files are included when publishing to npm. Since this package is marked as"private": true, it won't be published, making this field currently unnecessary. However, if this is intended for other tooling or future use, this is fine.examples/todo-with-auth0/apps/web/package.json (1)
8-10: Consider whether thefilesfield is needed for a private package.The
filesfield specifies which files are included when publishing to npm. Since this package is marked as"private": true, it won't be published, making this field currently unnecessary. However, if this is intended for other tooling or future use, this is fine.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (12)
examples/blog-with-auth/apps/admin/baseplate/generated/package.jsonis excluded by!**/generated/**,!**/generated/**examples/blog-with-auth/apps/backend/baseplate/generated/package.jsonis excluded by!**/generated/**,!**/generated/**examples/blog-with-auth/pnpm-lock.yamlis excluded by!**/pnpm-lock.yamlexamples/todo-with-auth0/apps/admin/baseplate/generated/package.jsonis excluded by!**/generated/**,!**/generated/**examples/todo-with-auth0/apps/backend/baseplate/generated/package.jsonis excluded by!**/generated/**,!**/generated/**examples/todo-with-auth0/apps/web/baseplate/generated/package.jsonis excluded by!**/generated/**,!**/generated/**examples/todo-with-auth0/pnpm-lock.yamlis excluded by!**/pnpm-lock.yamltests/simple/apps/backend/baseplate/generated/package.jsonis excluded by!**/generated/**,!tests/**,!**/generated/**tests/simple/apps/backend/package.jsonis excluded by!tests/**tests/simple/apps/web/baseplate/generated/package.jsonis excluded by!**/generated/**,!tests/**,!**/generated/**tests/simple/apps/web/package.jsonis excluded by!tests/**tests/simple/pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml,!tests/**
📒 Files selected for processing (11)
.changeset/some-flowers-double.md.changeset/tangy-worms-divide.mdexamples/blog-with-auth/apps/admin/package.jsonexamples/blog-with-auth/apps/backend/package.jsonexamples/todo-with-auth0/apps/admin/package.jsonexamples/todo-with-auth0/apps/backend/package.jsonexamples/todo-with-auth0/apps/web/package.jsonpackages/core-generators/src/generators/node/node/node.generator.tspackages/fastify-generators/src/generators/core/fastify/fastify.generator.tspackages/fastify-generators/src/generators/prisma/prisma/prisma.generator.tspackages/react-generators/src/generators/core/react/node.ts
💤 Files with no reviewable changes (1)
- .changeset/some-flowers-double.md
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/code-style.mdc)
**/*.{ts,tsx}: Use TypeScript with strict type checking enabled
Always include return types on top-level functions including React components (React.ReactElement)
Include absolute paths in import statements via tsconfig paths (@src/is the alias forsrc/)
If a particular interface or type is not exported, change the file so it is exported
If caught on a typing loop where forcing theanytype is necessary, do not iterate too much - leave the typing as broken and let the user fix itIf target code is not easily testable, refactor it to be more testable (e.g., export types or functions)
**/*.{ts,tsx}: Import components from '@baseplate-dev/ui-components' package for UI development (e.g., Button, Input, Card, Dialog, etc.)
Use form components with React Hook Form controller variants (InputField, TextareaField, SelectField, CheckboxField, SwitchField, ComboboxField, MultiComboboxField, ColorPickerField, DatePickerField, DateTimePickerField)
Use SidebarLayout, Card, Breadcrumb, NavigationMenu, and NavigationTabs components for consistent layout structure from @baseplate-dev/ui-components
Use Dialog, ConfirmDialog, and useConfirmDialog from @baseplate-dev/ui-components for modal dialogs and confirmation interactions
Always usecompareStringsfrom@baseplate-dev/utilsinstead ofString.prototype.localeCompare()for code generation, file sorting, and internal data structures
If a particular interface or type is not exported, modify the file to export it
Use TsCodeFragment for composable code pieces and TsCodeUtils for manipulating fragments when generating TypeScript code
Create generators usingcreateGeneratorwith configuration via descriptor schema (Zod), organizing into one or more tasks created withcreateGeneratorTask
Tasks should haverun(initialization) andbuild(code generation) phases, export and consume providers, and may be organized into phases for ordered execution
Use provider scopes to control visibility and prevent collisions be...
Files:
packages/fastify-generators/src/generators/prisma/prisma/prisma.generator.tspackages/core-generators/src/generators/node/node/node.generator.tspackages/fastify-generators/src/generators/core/fastify/fastify.generator.tspackages/react-generators/src/generators/core/react/node.ts
**/*.{ts,tsx,js}
📄 CodeRabbit inference engine (.cursor/rules/code-style.mdc)
**/*.{ts,tsx,js}: Node 16 module resolution - include file extensions in imports (.js)
Sort imports by group: external libs first, then local imports
Use camelCase for variables/functions, PascalCase for types/classes
Order functions such that functions are placed below the variables/functions they use
Prefer using nullish coalescing operator (??) instead of logical or (||), enforced via ESLint rule
Prefer barrel exports e.g.export * from './foo.js'instead of individual named exports
Use console.info/warn/error instead of console.log
Files:
packages/fastify-generators/src/generators/prisma/prisma/prisma.generator.tspackages/core-generators/src/generators/node/node/node.generator.tspackages/fastify-generators/src/generators/core/fastify/fastify.generator.tspackages/react-generators/src/generators/core/react/node.ts
.changeset/*.md
📄 CodeRabbit inference engine (AGENTS.md)
Add a new Changeset in the
.changeset/directory for new features or changes, with format'package-name': patchand description of the feature or change
Files:
.changeset/tangy-worms-divide.md
examples/blog-with-auth/**/package.json
📄 CodeRabbit inference engine (examples/blog-with-auth/CLAUDE.md)
examples/blog-with-auth/**/package.json: Enforce pnpm 10+ as the package manager
Use ESM only with"type": "module"in package.json
Files:
examples/blog-with-auth/apps/admin/package.jsonexamples/blog-with-auth/apps/backend/package.json
🧠 Learnings (36)
📓 Common learnings
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T22:46:20.505Z
Learning: Baseplate development follows a code-first approach: make changes directly in working codebases, extract those changes into reusable templates, update generators to use the new templates, then validate and sync the generated code
📚 Learning: 2025-11-24T19:44:33.994Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/blog-with-auth/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:33.994Z
Learning: Applies to examples/blog-with-auth/**/package.json : Use ESM only with `"type": "module"` in package.json
Applied to files:
examples/todo-with-auth0/apps/web/package.jsonexamples/todo-with-auth0/apps/admin/package.jsonexamples/blog-with-auth/apps/admin/package.jsonexamples/blog-with-auth/apps/backend/package.json
📚 Learning: 2025-11-24T19:44:46.506Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/todo-with-auth0/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:46.506Z
Learning: Applies to examples/todo-with-auth0/**/*.{ts,tsx} : Add JSDocs to all exported functions, interfaces, and classes with documentation of the function, its parameters, return value, and all fields
Applied to files:
examples/todo-with-auth0/apps/web/package.jsonexamples/todo-with-auth0/apps/backend/package.jsonexamples/todo-with-auth0/apps/admin/package.json
📚 Learning: 2025-11-24T19:44:33.994Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/blog-with-auth/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:33.994Z
Learning: Applies to examples/blog-with-auth/**/package.json : Enforce pnpm 10+ as the package manager
Applied to files:
examples/todo-with-auth0/apps/web/package.jsonexamples/todo-with-auth0/apps/admin/package.jsonexamples/blog-with-auth/apps/admin/package.jsonexamples/blog-with-auth/apps/backend/package.json
📚 Learning: 2025-11-25T22:46:20.505Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T22:46:20.505Z
Learning: Applies to .changeset/*.md : Add a new Changeset in the `.changeset/` directory for new features or changes, with format `'package-name': patch` and description of the feature or change
Applied to files:
examples/todo-with-auth0/apps/web/package.json.changeset/tangy-worms-divide.mdexamples/blog-with-auth/apps/admin/package.json
📚 Learning: 2025-05-08T12:56:11.723Z
Learnt from: kingston
Repo: halfdomelabs/baseplate PR: 539
File: scripts/check-changesets.ts:70-79
Timestamp: 2025-05-08T12:56:11.723Z
Learning: In the check-changesets.ts script for monorepo validation, `npm pack ${pkg.name}latest` is intentionally used to pack the most recently published version (not local changes) for comparison purposes to determine if changes require new changesets.
Applied to files:
examples/todo-with-auth0/apps/web/package.json
📚 Learning: 2025-11-24T19:44:46.506Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/todo-with-auth0/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:46.506Z
Learning: Applies to examples/todo-with-auth0/**/*.{unit,int}.test.ts : Use `.unit.test.ts` or `.int.test.ts` suffixes for test files in TypeScript
Applied to files:
examples/todo-with-auth0/apps/web/package.jsonexamples/todo-with-auth0/apps/admin/package.json
📚 Learning: 2025-11-24T19:44:46.506Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/todo-with-auth0/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:46.506Z
Learning: Applies to examples/todo-with-auth0/**/*.{ts,tsx} : Use `import type` for type-only imports
Applied to files:
examples/todo-with-auth0/apps/web/package.jsonexamples/todo-with-auth0/apps/admin/package.json
📚 Learning: 2025-11-24T19:44:46.506Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/todo-with-auth0/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:46.506Z
Learning: Applies to examples/todo-with-auth0/**/*.{unit,int}.test.ts : Import test functions explicitly from 'vitest' instead of using globals. Example: `import { describe, expect, it } from 'vitest';`
Applied to files:
examples/todo-with-auth0/apps/web/package.jsonexamples/todo-with-auth0/apps/backend/package.jsonexamples/todo-with-auth0/apps/admin/package.json
📚 Learning: 2025-11-24T19:44:33.994Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/blog-with-auth/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:33.994Z
Learning: Applies to examples/blog-with-auth/**/tsconfig.json : Enable `isolatedModules` in TypeScript configuration
Applied to files:
examples/todo-with-auth0/apps/web/package.jsonexamples/todo-with-auth0/apps/admin/package.jsonexamples/blog-with-auth/apps/admin/package.json
📚 Learning: 2025-11-24T19:44:46.506Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/todo-with-auth0/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:46.506Z
Learning: Applies to examples/todo-with-auth0/**/*.{ts,tsx,js,jsx} : Always use .js extensions in import statements, even for TypeScript files. Example: `import { getSystemInfo } from 'src/system-info.js';`
Applied to files:
examples/todo-with-auth0/apps/web/package.jsonexamples/todo-with-auth0/apps/admin/package.json
📚 Learning: 2025-11-24T19:44:33.994Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/blog-with-auth/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:33.994Z
Learning: Applies to examples/blog-with-auth/**/*.{ts,tsx,js,jsx} : Follow ESM module resolution with TypeScript's `NodeNext` setting
Applied to files:
examples/todo-with-auth0/apps/web/package.jsonexamples/todo-with-auth0/apps/backend/package.jsonexamples/todo-with-auth0/apps/admin/package.jsonexamples/blog-with-auth/apps/admin/package.jsonpackages/react-generators/src/generators/core/react/node.tsexamples/blog-with-auth/apps/backend/package.json
📚 Learning: 2025-11-24T19:44:33.994Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/blog-with-auth/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:33.994Z
Learning: Applies to examples/blog-with-auth/**/tsconfig.json : Use `NodeNext` module resolution in TypeScript configuration
Applied to files:
examples/todo-with-auth0/apps/web/package.jsonexamples/todo-with-auth0/apps/backend/package.jsonexamples/todo-with-auth0/apps/admin/package.jsonexamples/blog-with-auth/apps/admin/package.jsonpackages/react-generators/src/generators/core/react/node.tsexamples/blog-with-auth/apps/backend/package.json
📚 Learning: 2025-11-25T22:46:20.505Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T22:46:20.505Z
Learning: Applies to **/*.{ts,tsx} : Tasks should have `run` (initialization) and `build` (code generation) phases, export and consume providers, and may be organized into phases for ordered execution
Applied to files:
examples/todo-with-auth0/apps/web/package.jsonexamples/todo-with-auth0/apps/backend/package.jsonexamples/todo-with-auth0/apps/admin/package.jsonpackages/fastify-generators/src/generators/prisma/prisma/prisma.generator.tspackages/react-generators/src/generators/core/react/node.tsexamples/blog-with-auth/apps/backend/package.json
📚 Learning: 2025-11-24T19:44:33.994Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/blog-with-auth/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:33.994Z
Learning: Applies to examples/blog-with-auth/**/tsconfig.json : Use strict type checking in TypeScript configuration
Applied to files:
examples/todo-with-auth0/apps/web/package.jsonexamples/todo-with-auth0/apps/backend/package.jsonexamples/todo-with-auth0/apps/admin/package.jsonexamples/blog-with-auth/apps/admin/package.jsonexamples/blog-with-auth/apps/backend/package.json
📚 Learning: 2025-11-24T19:45:01.582Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-11-24T19:45:01.582Z
Learning: Applies to **/*.{ts,tsx} : Include absolute paths in import statements via tsconfig paths (`src/` is the alias for `src/`)
Applied to files:
examples/todo-with-auth0/apps/backend/package.jsonpackages/react-generators/src/generators/core/react/node.tsexamples/blog-with-auth/apps/backend/package.json
📚 Learning: 2025-06-03T09:11:29.651Z
Learnt from: kingston
Repo: halfdomelabs/baseplate PR: 562
File: plugins/plugin-auth/package.json:32-36
Timestamp: 2025-06-03T09:11:29.651Z
Learning: With TypeScript project references, TypeScript compilation is watched from the root level using "watch:tsc:root" script, so individual packages no longer need to include their "tsc:watch" scripts in their local "watch" commands. The local "tsc:watch" scripts are renamed from "watch:tsc" but are not meant to be run as part of the package's watch command since TypeScript watching is handled centrally at the workspace root.
Applied to files:
examples/todo-with-auth0/apps/backend/package.jsonexamples/blog-with-auth/apps/backend/package.json
📚 Learning: 2025-11-24T19:45:01.582Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: .cursor/rules/code-style.mdc:0-0
Timestamp: 2025-11-24T19:45:01.582Z
Learning: Applies to **/*.{ts,tsx,js} : Node 16 module resolution - include file extensions in imports (`.js`)
Applied to files:
examples/todo-with-auth0/apps/backend/package.jsonpackages/fastify-generators/src/generators/core/fastify/fastify.generator.tspackages/react-generators/src/generators/core/react/node.tsexamples/blog-with-auth/apps/backend/package.json
📚 Learning: 2025-04-21T06:32:22.476Z
Learnt from: kingston
Repo: halfdomelabs/baseplate PR: 505
File: packages/create-project/tsconfig.json:6-6
Timestamp: 2025-04-21T06:32:22.476Z
Learning: Since TypeScript 4.1, baseUrl is not required for paths mapping in tsconfig.json. Removing baseUrl and using explicit relative paths with "./" prefix (e.g., changing "src/*": ["src/*"] to "src/*": ["./src/*"]) prevents bare path imports from node_modules while maintaining path alias functionality.
Applied to files:
examples/todo-with-auth0/apps/backend/package.jsonexamples/blog-with-auth/apps/backend/package.json
📚 Learning: 2025-01-23T09:12:46.178Z
Learnt from: kingston
Repo: halfdomelabs/baseplate PR: 428
File: packages/project-builder-server/src/sync/index.ts:5-5
Timestamp: 2025-01-23T09:12:46.178Z
Learning: Avoid importing directly from 'dist' directories. Instead, expose functionality through the package's public API and import from the main package entry point.
Applied to files:
examples/todo-with-auth0/apps/backend/package.jsonpackages/fastify-generators/src/generators/core/fastify/fastify.generator.tsexamples/blog-with-auth/apps/backend/package.json
📚 Learning: 2025-11-24T19:44:46.506Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/todo-with-auth0/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:46.506Z
Learning: Use pnpm 10+ as the package manager (enforced)
Applied to files:
examples/todo-with-auth0/apps/backend/package.jsonpackages/fastify-generators/src/generators/prisma/prisma/prisma.generator.tsexamples/blog-with-auth/apps/backend/package.json
📚 Learning: 2025-11-25T22:46:20.505Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T22:46:20.505Z
Learning: Applies to **/*.{ts,tsx} : Create generators using `createGenerator` with configuration via descriptor schema (Zod), organizing into one or more tasks created with `createGeneratorTask`
Applied to files:
packages/fastify-generators/src/generators/prisma/prisma/prisma.generator.ts.changeset/tangy-worms-divide.md
📚 Learning: 2025-11-25T22:46:20.505Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T22:46:20.505Z
Learning: Follow task-based architecture for generators, use provider scopes for explicit wiring, leverage TypeScript rendering system for code generation, organize complex generation with Task Phases, and use Dynamic Tasks for data-driven generation
Applied to files:
packages/fastify-generators/src/generators/prisma/prisma/prisma.generator.ts
📚 Learning: 2025-11-25T22:46:20.505Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T22:46:20.505Z
Learning: Applies to **/*.{ts,tsx} : Use Dynamic Tasks for data-driven generation where code generation is driven by data
Applied to files:
packages/fastify-generators/src/generators/prisma/prisma/prisma.generator.tspackages/react-generators/src/generators/core/react/node.ts
📚 Learning: 2025-11-24T19:45:08.523Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: .cursor/rules/dev-commands.mdc:0-0
Timestamp: 2025-11-24T19:45:08.523Z
Learning: Build the project using `pnpm build` from repository root or package
Applied to files:
packages/fastify-generators/src/generators/prisma/prisma/prisma.generator.tspackages/react-generators/src/generators/core/react/node.ts
📚 Learning: 2025-11-25T22:46:20.505Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T22:46:20.505Z
Learning: Baseplate development follows a code-first approach: make changes directly in working codebases, extract those changes into reusable templates, update generators to use the new templates, then validate and sync the generated code
Applied to files:
.changeset/tangy-worms-divide.md
📚 Learning: 2025-11-24T19:44:33.994Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/blog-with-auth/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:33.994Z
Learning: Applies to examples/blog-with-auth/**/*.{ts,tsx} : Use `import type` for type-only imports in TypeScript
Applied to files:
examples/blog-with-auth/apps/admin/package.json
📚 Learning: 2025-11-24T19:44:33.994Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/blog-with-auth/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:33.994Z
Learning: Applies to examples/blog-with-auth/**/*.{unit,int}.test.ts : Use `.unit.test.ts` or `.int.test.ts` suffixes for test files and collocate tests with source files
Applied to files:
examples/blog-with-auth/apps/admin/package.json
📚 Learning: 2025-11-24T19:44:33.994Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/blog-with-auth/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:33.994Z
Learning: Applies to examples/blog-with-auth/**/*.{ts,tsx,js,jsx} : Add JSDocs to all exported functions, interfaces, and classes with documentation of the function, its parameters, return value, and all fields
Applied to files:
examples/blog-with-auth/apps/admin/package.json
📚 Learning: 2025-11-25T22:46:20.505Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T22:46:20.505Z
Learning: Applies to **/*.{ts,tsx} : Run `pnpm lint:affected` and `pnpm typecheck` before committing changes
Applied to files:
packages/react-generators/src/generators/core/react/node.ts
📚 Learning: 2025-04-23T06:44:30.952Z
Learnt from: kingston
Repo: halfdomelabs/baseplate PR: 510
File: packages/project-builder-server/src/sync/conflict-file-monitor.test.ts:19-24
Timestamp: 2025-04-23T06:44:30.952Z
Learning: When testing file operations in this codebase, the pattern is to use Vitest automocks for 'node:fs' and 'node:fs/promises' (without explicit implementation replacement) while populating a virtual filesystem with vol.fromJSON() from memfs. File operations in tests are performed directly via vol.promises methods.
Applied to files:
packages/react-generators/src/generators/core/react/node.ts
📚 Learning: 2025-06-30T11:52:28.745Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: .cursor/rules/tests.mdc:0-0
Timestamp: 2025-06-30T11:52:28.745Z
Learning: Applies to **/*.test.{ts,tsx} : For file system operations in tests, use memfs and mock 'node:fs' and 'node:fs/promises' with vi.mock
Applied to files:
packages/react-generators/src/generators/core/react/node.ts
📚 Learning: 2025-04-23T06:44:30.952Z
Learnt from: kingston
Repo: halfdomelabs/baseplate PR: 510
File: packages/project-builder-server/src/sync/conflict-file-monitor.test.ts:19-24
Timestamp: 2025-04-23T06:44:30.952Z
Learning: In this codebase, when testing file operations, Vitest's automocks for 'node:fs' and 'node:fs/promises' are used in conjunction with memfs, but without replacing the mock implementation explicitly in each test file. The virtual filesystem is populated using vol.fromJSON or similar methods, which works seamlessly with the automocks.
Applied to files:
packages/react-generators/src/generators/core/react/node.ts
📚 Learning: 2025-11-24T19:45:19.136Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: .cursor/rules/testing.mdc:0-0
Timestamp: 2025-11-24T19:45:19.136Z
Learning: Applies to **/*.{unit,int}.test.{ts,tsx} : For file system operations in tests, use memfs and mock `node:fs` and `node:fs/promises`
Applied to files:
packages/react-generators/src/generators/core/react/node.ts
📚 Learning: 2025-05-08T12:56:23.394Z
Learnt from: kingston
Repo: halfdomelabs/baseplate PR: 539
File: scripts/check-changesets.ts:111-124
Timestamp: 2025-05-08T12:56:23.394Z
Learning: Node.js 22.0.0 and later versions provide native glob functionality via `fs.glob` method in the `node:fs/promises` module, allowing pattern matching without requiring external dependencies.
Applied to files:
packages/react-generators/src/generators/core/react/node.ts
📚 Learning: 2025-05-08T12:56:23.394Z
Learnt from: kingston
Repo: halfdomelabs/baseplate PR: 539
File: scripts/check-changesets.ts:111-124
Timestamp: 2025-05-08T12:56:23.394Z
Learning: Node.js 22.0.0 and later versions provide native glob functionality via `fs.glob` and `fs.globSync` methods in the `node:fs` module, allowing pattern matching without external dependencies.
Applied to files:
packages/react-generators/src/generators/core/react/node.ts
🧬 Code graph analysis (1)
packages/fastify-generators/src/generators/prisma/prisma/prisma.generator.ts (1)
packages/fastify-generators/src/constants/fastify-packages.ts (1)
FASTIFY_PACKAGES(1-84)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
- GitHub Check: Lint Examples (todo-with-auth0)
- GitHub Check: Lint Examples (blog-with-auth)
- GitHub Check: Verify Sync (todo-with-auth0)
- GitHub Check: Verify Sync (blog-with-auth)
- GitHub Check: test
- GitHub Check: Test E2E
- GitHub Check: Lint
🔇 Additional comments (11)
packages/core-generators/src/generators/node/node/node.generator.ts (2)
60-63: LGTM! Clean schema definition for files field.The
filesfield is properly defined with duplicate stripping enabled, which prevents accidental duplicates from multiple generators.
208-211: LGTM! Proper conditional handling of files field.The logic correctly:
- Sorts the array for deterministic output
- Omits the field entirely when empty (cleaner package.json)
- Includes sorted files when non-empty
packages/react-generators/src/generators/core/react/node.ts (1)
42-42: LGTM! Correct inclusion of Vite build artifacts.The
build/**/*pattern correctly includes all Vite build output files in the package.packages/fastify-generators/src/generators/core/fastify/fastify.generator.ts (1)
116-116: LGTM! Correct migration to centralized files handling.The change correctly adds distribution files to
node.files, which aligns with the new centralized packaging approach. The explicit files declaration was appropriately removed fromextraProperties.packages/fastify-generators/src/generators/prisma/prisma/prisma.generator.ts (2)
105-111: LGTM! Correct separation of Prisma dependencies.The change correctly:
- Keeps
@prisma/clientand@prisma/adapter-pgas production dependencies (runtime)- Moves
prismaCLI to dev dependencies (build-time only)This aligns with best practices and reduces production bundle size.
116-116: LGTM! Proper inclusion of Prisma schema files.Adding
prisma/**/*andprisma.config.tsto the files list ensures the Prisma schema and configuration are included in the package, which is necessary for thepostinstallscript to runprisma generate..changeset/tangy-worms-divide.md (1)
1-7: LGTM! Proper changeset documentation.The changeset correctly documents:
- All three affected generator packages
- Appropriate patch version bump for this enhancement
- Clear description of the feature
examples/todo-with-auth0/apps/backend/package.json (2)
9-13: Verify that Prisma schema files are needed in deployment artifacts.The files field now includes
prisma.config.tsandprisma/**/*. For typical application deployments, these files are only needed if:
- The application runs migrations at runtime (not recommended)
- The deployment process generates the Prisma client post-deployment
Most production deployments only need the compiled code (
dist/**/*) and the pre-generated Prisma Client (innode_modules/@prisma/client), not the schema files.Run the following to verify if these files are actively used in the deployment or runtime workflows:
#!/bin/bash # Check if prisma schema is referenced in production code or deployment scripts rg -n --type=ts --type=js -g '!*.test.*' -g '!*.spec.*' 'prisma/schema|prisma.config' examples/todo-with-auth0/apps/backend/
21-21: The deployment workflow correctly handles Prisma client generation.The Dockerfile's build sequence (lines 11–19) installs all dependencies including the Prisma CLI before the
pnpm deploy --prodstep, ensuring thepostinstallscript on line 21 executes successfully during the build phase. The generated Prisma client is then included in the deployed artifacts.The concern about
pnpm install --prodfailing is not applicable here—the Docker build process does not run a production-only install that would skip postinstall, and the explicit copy of Prisma schemas (line 26) further ensures the client is available in production.examples/blog-with-auth/apps/backend/package.json (2)
9-13: Clarify the deployment strategy for Prisma schema files and postinstall generation.The
filesfield includesprisma.config.tsandprisma/**/*, butprismais indevDependencies. Thepostinstallscript runsprisma generate, which requires both the Prisma CLI and schema files. This setup only works if the application runspnpm install(full installation) at deployment—if deployment usespnpm install --prod, the Prisma CLI won't be available and the schema files won't be used.Verify your deployment process:
- If deploying with
pnpm install --prod: Removeprisma.config.tsandprisma/**/*from thefilesfield, and ensure the Prisma Client is pre-generated during the build step.- If deploying with full
pnpm install: Consider if regenerating Prisma Client at runtime is necessary, or if it should be pre-generated during CI/build.
21-21: The deployment process correctly handles Prisma client generation. The Dockerfile performs a full dependency install during the build phase (line 24) where the postinstall script successfully executes and generates the Prisma client. The subsequentpnpm deploy --prodstep (line 33) copies the generated client as part of node_modules to production without needing to re-run postinstall. No changes required.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
examples/todo-with-auth0/apps/backend/.baseplate-snapshot/diffs/package.json.diff (1)
9-10: Consider consistent version pinning strategy.The dependencies use different pinning strategies:
prismauses exact version (7.2.0) whilesentry-testkituses caret range (^6.2.2). If this is intentional to lock Prisma's version, that's fine; otherwise, consider aligning the approach across devDependencies.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
examples/todo-with-auth0/apps/backend/.baseplate-snapshot/diffs/package.json.diff
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T22:46:20.505Z
Learning: Baseplate development follows a code-first approach: make changes directly in working codebases, extract those changes into reusable templates, update generators to use the new templates, then validate and sync the generated code
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T22:46:20.505Z
Learning: Applies to **/*.{ts,tsx} : Create generators using `createGenerator` with configuration via descriptor schema (Zod), organizing into one or more tasks created with `createGeneratorTask`
📚 Learning: 2025-11-24T19:44:33.994Z
Learnt from: CR
Repo: halfdomelabs/baseplate PR: 0
File: examples/blog-with-auth/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:44:33.994Z
Learning: Applies to examples/blog-with-auth/**/package.json : Enforce pnpm 10+ as the package manager
Applied to files:
examples/todo-with-auth0/apps/backend/.baseplate-snapshot/diffs/package.json.diff
🔇 Additional comments (1)
examples/todo-with-auth0/apps/backend/.baseplate-snapshot/diffs/package.json.diff (1)
9-9: Prisma 7.2.0 is the latest stable version available with no deprecation warnings. It requires Node.js ^20.19, ^22.12, or >=24.0, which are reasonable for modern projects. No security advisories detected.
Summary by CodeRabbit
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.