Skip to content

Instantly share code, notes, and snippets.

View vinnymac's full-sized avatar
🤓

Vincent Taverna vinnymac

🤓
View GitHub Profile
@vinnymac
vinnymac / soft-delete-extension.patch
Created August 14, 2025 17:43
Patch to workaround issue in the soft delete extension that prevents compatibility with newer versions of Prisma
diff --git a/dist/lib/helpers/createParams.js b/dist/lib/helpers/createParams.js
index d389df498fbac20e7e1d306d52d997339c83e656..66bba54e5424d7706b168a2c857ea987de3ac519 100644
--- a/dist/lib/helpers/createParams.js
+++ b/dist/lib/helpers/createParams.js
@@ -5,22 +5,29 @@ const client_1 = require("@prisma/client");
const nestedReads_1 = require("../utils/nestedReads");
const uniqueFieldsByModel = {};
const uniqueIndexFieldsByModel = {};
-client_1.Prisma.dmmf.datamodel.models.forEach((model) => {
- // add unique fields derived from indexes
@vinnymac
vinnymac / prisma-npm-6.7.0-70ae4539c9.patch
Created July 31, 2025 17:27
Yarn patch to more easily opt out of noise with `PRISMA_OPT_OUT` env
diff --git a/build/index.js b/build/index.js
index 3a8c0aa29a193b534bf698dac9b8167d2129ee6d..9e2b773ac3ed9d6bc0a54b59b6224f0e3986ce9a 100755
--- a/build/index.js
+++ b/build/index.js
@@ -4744,7 +4744,7 @@ Please run \`${$t("prisma generate")}\` to see the errors.`),"";if(u)this.logTex
`;else throw P}let _=!1;if(x)try{let P=aar();if(P&&typeof P=="string"){let[k,I]=P.split(".");parseInt(k)==2&&parseInt(I)<12&&(_=!0)}}catch{}if(a&&_&&Ns.should.warn())return"There have been breaking changes in Prisma Client since you updated last time.\nPlease run `prisma generate` manually.";let C=`
${ge("Watching...")} ${de(f.schemaRootDir)}
-`,F=i["--no-hints"]??!1;if(u){zp(C+`
+`,F=i["--no-hints"]||!!process.env.PRISMA_OPT_OUT??!1;if(u){zp(C+`
@vinnymac
vinnymac / capital.eval.ts
Created January 15, 2025 07:52
Example of using evalite with Azure and autoevals Factuality
import { createAzure } from '@ai-sdk/azure';
import { streamText } from 'ai';
import { Levenshtein, type Scorer } from 'autoevals';
import { evalite } from 'evalite';
import { traceAISDKModel } from 'evalite/ai-sdk';
process.env.AZURE_API_KEY = process.env.AZURE_OPENAI_API_KEY;
process.env.AZURE_OPENAI_RESOURCE_NAME = process.env.AZURE_OPENAI_RESOURCE_NAME;
const azure = createAzure({
@vinnymac
vinnymac / create_unaccent_extension.sql
Created December 13, 2024 16:35
Slugify postgres functions for creating slugs from arbitrary text strings
CREATE EXTENSION IF NOT EXISTS "unaccent";
@vinnymac
vinnymac / README.md
Last active August 2, 2024 23:02
Next 14.2.5 patch to disable tsconfig rewrite
@vinnymac
vinnymac / silenceReactWarning.log
Created February 1, 2023 04:08
React 18 warning
Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot
@vinnymac
vinnymac / cannotAssignError.log
Created February 1, 2023 04:08
Cannot assign error
TypeError: Cannot assign to read only property 'reload' of object '[object Location]'
@vinnymac
vinnymac / installReact18TestingLibrary.sh
Created February 1, 2023 04:07
React 18 Testing Library Install
yarn remove @testing-library/react-hooks -W && \
yarn add -D @testing-library/react@latest -W
@vinnymac
vinnymac / tsc-output.log
Created February 1, 2023 04:06
TypeScript output
Found 342 errors in 196 files.
@vinnymac
vinnymac / circular-json-error.log
Last active February 1, 2023 04:18
Circular JSON error
TypeError: Converting circular structure to JSON