-
Notifications
You must be signed in to change notification settings - Fork 156
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
Cannot work with pnpm #925
Comments
The first issue occurs because our generator does not remove the import for |
@kevin-dp The DB is very simple
(It's just created by create-electric-app) |
This doesn’t seem to have any particular issue. It should just work. @kevin please try to run commands from 0.9.2 |
Closing this in favour of keeping #1001 open as they refer to the same issue. Make sure that your The |
…ests (#1117) Relevant issues: #1001 #925 #1114 Only one thing is fixed in this PR, the `Relation` is no longer imported if the data model has no relations in order to avoid `unused imports` TS errors. Main changes are moving all of the generator tests into their own test directory rather than inside the source code, for consistency with the TS client, ease of use, and improved reusability of test utilities. I've also added a sort of integration test for the CLI generation step, which is crucial to getting a working, compileable TS client as it modifies some of the Prisma generated typings. This test generates the client given a Prisma schema and performs all appropriate modifications to it, and then attempts to compile it with TS and specified compiler options. Also found that with TS version >=5.4 we have [stricter conditional type checking](https://devblogs.microsoft.com/typescript/announcing-typescript-5-4/#notable-behavioral-changes) which breaks clients generated with Prisma versions earlier than 4.16.0 (see issue #1114), however 4.16.0 introduces breaking changes with the "extensions" feature, so I've added a hacky workaround for it: https://github.com/electric-sql/electric/pull/1117/files#diff-fb0a50df4fc86f09b81a210162984d7822276fe19c8ae6496cf5ffe7d09f5adb We can add more tests that would test various compiler options, making it easier to avoid regressions when users report them with more complicated schemas and TS compiler options. Finally, I've added a Caution banner in our Usage section in the docs about requiring TS `strict` mode, since Zod has that as a requirement as well and its the reason why we see some inconsistencies in bug reports.
After upgrading to 0.9.2, can't use with pnpm any more.
Reproduce:
Error:
The text was updated successfully, but these errors were encountered: