pgsql-test 2.4.0 → 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 +1 -1
- package/esm/seed/launchql.js +3 -6
- package/esm/seed/sqitch.js +5 -2
- package/package.json +3 -3
- package/seed/launchql.js +2 -5
- package/seed/sqitch.js +4 -1
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 `
|
|
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';
|
package/esm/seed/launchql.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getEnvOptions } from '@launchql/types';
|
|
2
|
-
import { LaunchQLProject,
|
|
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
|
|
11
|
-
|
|
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
|
});
|
package/esm/seed/sqitch.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getEnvOptions } from '@launchql/types';
|
|
2
|
-
import { LaunchQLProject,
|
|
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
|
|
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
|
+
"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.
|
|
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": "
|
|
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.
|
|
14
|
-
|
|
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.
|
|
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
|
}
|