supabase-test 3.18.15 → 3.18.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -586,9 +586,9 @@ This table documents the available options for the `getConnections` function. Th
586
586
 
587
587
  ### `pg` Options (PgConfig)
588
588
 
589
- Environment variables will override these options when available:
589
+ These environment variables override the defaults, but explicit options take precedence:
590
590
 
591
- * `PGHOST`, `PGPORT`, `PGUSER`, `PGPASSWORD`, `PGDATABASE`
591
+ * `PGHOST`, `PGPORT`, `PGUSER`, `PGPASSWORD`
592
592
 
593
593
  | Option | Type | Default | Description |
594
594
  | ------------- | -------- | ------------- | ----------------------------------------------- |
@@ -596,7 +596,7 @@ Environment variables will override these options when available:
596
596
  | `pg.password` | `string` | `'password'` | Password for the PostgreSQL superuser |
597
597
  | `pg.host` | `string` | `'localhost'` | Hostname for PostgreSQL |
598
598
  | `pg.port` | `number` | `5423` | Port for PostgreSQL |
599
- | `pg.database` | `string` | `'postgres'` | Default database used when connecting initially |
599
+ | `pg.database` | `string` | Generated | Test database name; `PGDATABASE` is ignored |
600
600
 
601
601
  ### Usage
602
602
 
package/connect.js CHANGED
@@ -42,8 +42,8 @@ const SUPABASE_PG_DEFAULTS = {
42
42
  * 3. User-provided options
43
43
  */
44
44
  const getConnections = async (cn = {}, seedAdapters) => {
45
- // Get environment variables (only includes defined keys)
46
- const pgEnvVars = (0, pg_env_1.getPgEnvVars)();
45
+ // Let pgsql-test name the test database unless the caller explicitly names it.
46
+ const { database: _database, ...pgEnvVars } = (0, pg_env_1.getPgEnvVars)();
47
47
  // Build env overrides - pgEnvVars already only has defined keys
48
48
  // Mirror user/password to connections.app for the app connection
49
49
  const envOverrides = {
package/esm/connect.js CHANGED
@@ -36,8 +36,8 @@ const SUPABASE_PG_DEFAULTS = {
36
36
  * 3. User-provided options
37
37
  */
38
38
  export const getConnections = async (cn = {}, seedAdapters) => {
39
- // Get environment variables (only includes defined keys)
40
- const pgEnvVars = getPgEnvVars();
39
+ // Let pgsql-test name the test database unless the caller explicitly names it.
40
+ const { database: _database, ...pgEnvVars } = getPgEnvVars();
41
41
  // Build env overrides - pgEnvVars already only has defined keys
42
42
  // Mirror user/password to connections.app for the app connection
43
43
  const envOverrides = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "supabase-test",
3
- "version": "3.18.15",
3
+ "version": "3.18.16",
4
4
  "author": "Interweb <developers@interweb.io>",
5
5
  "description": "supabase-test offers isolated, role-aware, and rollback-friendly PostgreSQL environments for integration tests with Supabase defaults baked in",
6
6
  "main": "index.js",
@@ -45,7 +45,7 @@
45
45
  "deepmerge": "^4.3.1",
46
46
  "@pgpmjs/types": "^2.58.4",
47
47
  "pg-env": "^1.33.1",
48
- "pgsql-test": "^5.20.15"
48
+ "pgsql-test": "^5.20.16"
49
49
  },
50
50
  "devDependencies": {
51
51
  "makage": "^0.8.0"