-
Notifications
You must be signed in to change notification settings - Fork 8
Do not depend on runtime Prisma deps #109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
lpan
wants to merge
9
commits into
adamjkb:main
Choose a base branch
from
intrinsic-org:lpan/custom-prisma-path-take-2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BREAKING CHANGE: withBark now returns a function that accepts the Prisma namespace
This change allows the extension to work with custom Prisma output paths,
which is essential for monorepo setups. Instead of hardcoding imports from
@prisma/client, users now pass their own Prisma namespace.
Before:
```js
const xprisma = new PrismaClient().$extends(
withBark({ modelNames: ['node'] })
)
```
After:
```js
import { PrismaClient, Prisma } from '../generated/client'
const xprisma = new PrismaClient().$extends(
withBark({ modelNames: ['node'] })(Prisma)
)
```
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Removed all import statements from '@prisma/client/extension' - Replaced Prisma.getExtensionContext(this) with direct 'this' usage - Removed type annotations that depended on @prisma/client - All tests pass with the refactored code This completes the removal of hardcoded Prisma imports, making the extension fully compatible with custom Prisma output paths. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Added postinstall script to automatically build dist files - Moved esbuild to dependencies to support GitHub installations - Added documentation for installing directly from GitHub - This allows users to test the changes before npm publication 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Added specific pnpm installation commands for monorepo - Clarified different installation methods for various package managers - Simplified instructions to avoid confusion 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Added integration tests verifying the new API works correctly - Added TypeScript tests to verify type definitions - Fixed type definition for Prisma parameter (though 'as any' still needed due to TS limitations) - Added test scripts for TypeScript validation - Verified that withBark works with Prisma namespace parameter The tests confirm the implementation works correctly, though TypeScript's inference limitations mean users still need 'as any' for now. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
…ility - Added tests to verify all standard Prisma CRUD operations work correctly - Tested findMany, findUnique, findFirst, create, update, delete, etc. - Verified Bark methods work alongside standard Prisma methods - Tested transactions mixing both Bark and Prisma operations - Confirmed select, where, orderBy, and other query options work - Added tests for aggregate, groupBy, count operations These tests ensure that adding the Bark extension doesn't break any existing Prisma functionality. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 4f5c986 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 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 |
Remove the "Installing from GitHub" section and custom Prisma output paths documentation that were added in this branch, reverting to the simpler API documentation from main. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Add changeset describing the custom Prisma client path support feature that warrants a minor version bump. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
esbuild is only needed during the build process and should not be a runtime dependency. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why
What
Prismaobject