chore: playwright support (#5262)

* working playwright

* chore: use zipped, local build of playwright instead of patching it

* chore: remove bloat

* chore: get playwright and lexical to work by fixing imports from cjs modules
This commit is contained in:
Alessio Gravili
2024-03-08 10:56:13 -05:00
committed by GitHub
parent ac2f8c9141
commit 7880fb402a
121 changed files with 9955 additions and 4462 deletions

View File

@@ -4,7 +4,7 @@ import type { Connect } from 'payload/database'
import { eq, sql } from 'drizzle-orm'
import { drizzle } from 'drizzle-orm/node-postgres'
import { numeric, timestamp, varchar } from 'drizzle-orm/pg-core'
import { Pool } from 'pg'
import pg from 'pg'
import prompts from 'prompts'
import type { PostgresAdapter } from './types.js'
@@ -61,7 +61,7 @@ export const connect: Connect = async function connect(
}
try {
this.pool = new Pool(this.poolOptions)
this.pool = new pg.Pool(this.poolOptions)
await connectWithReconnect({ adapter: this, payload: this.payload })
const logger = this.logger || false

View File

@@ -1,4 +1,5 @@
import { DatabaseError } from 'pg'
import pg from 'pg'
const { DatabaseError } = pg
/**
* Format error message with hint if available