pgsql-test 2.3.1 → 2.5.0

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
@@ -422,7 +422,7 @@ This works for any Sqitch-compatible module, now accelerated by LaunchQL's deplo
422
422
 
423
423
  ## 🚀 LaunchQL Seeding
424
424
 
425
- If your project uses LaunchQL modules with a precompiled `sqitch.plan`, you can use `pgsql-test` with **zero configuration**. Just call `getConnections()` — and it *just works*:
425
+ If your project uses LaunchQL modules with a precompiled `launchql.plan`, you can use `pgsql-test` with **zero configuration**. Just call `getConnections()` — and it *just works*:
426
426
 
427
427
  ```ts
428
428
  import { getConnections } from 'pgsql-test';
@@ -1,5 +1,5 @@
1
1
  import { getEnvOptions } from '@launchql/types';
2
- import { LaunchQLProject, deployFast } from '@launchql/core';
2
+ import { LaunchQLProject, deployProject } from '@launchql/core';
3
3
  export function launchql(cwd, cache = false) {
4
4
  return {
5
5
  async seed(ctx) {
@@ -7,11 +7,8 @@ export function launchql(cwd, cache = false) {
7
7
  if (!proj.isInModule())
8
8
  return;
9
9
  const opts = getEnvOptions({ pg: ctx.config });
10
- await deployFast({
11
- opts,
12
- name: proj.getModuleName(),
13
- database: ctx.config.database,
14
- dir: proj.modulePath,
10
+ await deployProject(opts, proj.getModuleName(), ctx.config.database, proj.modulePath, {
11
+ fast: true,
15
12
  usePlan: true,
16
13
  cache
17
14
  });
@@ -1,5 +1,5 @@
1
1
  import { getEnvOptions } from '@launchql/types';
2
- import { LaunchQLProject, deploy } from '@launchql/core';
2
+ import { LaunchQLProject, deployProject } from '@launchql/core';
3
3
  export function sqitch(cwd) {
4
4
  return {
5
5
  async seed(ctx) {
@@ -7,7 +7,10 @@ export function sqitch(cwd) {
7
7
  if (!proj.isInModule())
8
8
  return;
9
9
  const opts = getEnvOptions({ pg: ctx.config });
10
- await deploy(opts, proj.getModuleName(), ctx.config.database, proj.modulePath);
10
+ await deployProject(opts, proj.getModuleName(), ctx.config.database, proj.modulePath, {
11
+ useSqitch: true,
12
+ fast: false
13
+ });
11
14
  }
12
15
  };
13
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pgsql-test",
3
- "version": "2.3.1",
3
+ "version": "2.5.0",
4
4
  "author": "Dan Lynch <pyramation@gmail.com>",
5
5
  "description": "pgsql-test offers isolated, role-aware, and rollback-friendly PostgreSQL environments for integration tests — giving developers realistic test coverage without external state pollution",
6
6
  "main": "index.js",
@@ -60,7 +60,7 @@
60
60
  "@types/pg-copy-streams": "^1.2.5"
61
61
  },
62
62
  "dependencies": {
63
- "@launchql/core": "^2.3.1",
63
+ "@launchql/core": "^2.5.0",
64
64
  "@launchql/server-utils": "^2.1.15",
65
65
  "@launchql/types": "^2.1.13",
66
66
  "chalk": "^4.1.0",
@@ -70,5 +70,5 @@
70
70
  "pg-copy-streams": "^6.0.6",
71
71
  "pg-env": "^1.0.1"
72
72
  },
73
- "gitHead": "835a2e84ed84edab5bea8f5954d9dfeb657beb03"
73
+ "gitHead": "4dd7337f3bb092641de43f837363b5735afb1856"
74
74
  }
package/seed/launchql.js CHANGED
@@ -10,11 +10,8 @@ function launchql(cwd, cache = false) {
10
10
  if (!proj.isInModule())
11
11
  return;
12
12
  const opts = (0, types_1.getEnvOptions)({ pg: ctx.config });
13
- await (0, core_1.deployFast)({
14
- opts,
15
- name: proj.getModuleName(),
16
- database: ctx.config.database,
17
- dir: proj.modulePath,
13
+ await (0, core_1.deployProject)(opts, proj.getModuleName(), ctx.config.database, proj.modulePath, {
14
+ fast: true,
18
15
  usePlan: true,
19
16
  cache
20
17
  });
package/seed/sqitch.js CHANGED
@@ -10,7 +10,10 @@ function sqitch(cwd) {
10
10
  if (!proj.isInModule())
11
11
  return;
12
12
  const opts = (0, types_1.getEnvOptions)({ pg: ctx.config });
13
- await (0, core_1.deploy)(opts, proj.getModuleName(), ctx.config.database, proj.modulePath);
13
+ await (0, core_1.deployProject)(opts, proj.getModuleName(), ctx.config.database, proj.modulePath, {
14
+ useSqitch: true,
15
+ fast: false
16
+ });
14
17
  }
15
18
  };
16
19
  }