@xata.io/drizzle 0.0.0-alpha.veb0d47bb2a60af38f961367b95acb62f9b6c31c7 → 0.0.0-alpha.veb9e2f6e94760b6ade958a8ab3cad9a7e5bc6ae3
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/.turbo/turbo-build.log +5 -5
- package/CHANGELOG.md +10 -7
- package/package.json +4 -4
- package/test/drizzle.test.ts +15 -20
package/.turbo/turbo-build.log
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
> @xata.io/drizzle@0.0.
|
2
|
+
> @xata.io/drizzle@0.0.22 build /home/runner/work/client-ts/client-ts/packages/plugin-client-drizzle
|
3
3
|
> rimraf dist && rollup -c
|
4
4
|
|
5
5
|
[36m
|
@@ -8,10 +8,10 @@
|
|
8
8
|
[90mhttps://rollupjs.org/troubleshooting/#warning-treating-module-as-external-dependency[39m
|
9
9
|
[1mdrizzle-orm[22m (imported by "src/http/driver.ts", "src/http/session.ts" and "src/shared/utils.ts")
|
10
10
|
[1mdrizzle-orm/pg-core[22m (imported by "src/http/driver.ts" and "src/http/session.ts")
|
11
|
-
[32mcreated [1mdist/index.cjs, dist/index.mjs[22m in [
|
11
|
+
[32mcreated [1mdist/index.cjs, dist/index.mjs[22m in [1m290ms[22m[39m
|
12
12
|
[36m
|
13
13
|
[1msrc/index.ts[22m → [1mdist/index.d.ts[22m...[39m
|
14
|
-
[32mcreated [1mdist/index.d.ts[22m in [
|
14
|
+
[32mcreated [1mdist/index.d.ts[22m in [1m7.2s[22m[39m
|
15
15
|
[36m
|
16
16
|
[1msrc/pg/index.ts[22m → [1mdist/pg.cjs, dist/pg.mjs[22m...[39m
|
17
17
|
[1m[33m(!) Unresolved dependencies[39m[22m
|
@@ -19,7 +19,7 @@
|
|
19
19
|
[1mdrizzle-orm[22m (imported by "src/pg/driver.ts", "src/pg/session.ts" and "src/shared/utils.ts")
|
20
20
|
[1mdrizzle-orm/pg-core[22m (imported by "src/pg/driver.ts" and "src/pg/session.ts")
|
21
21
|
[1mpg[22m (imported by "src/pg/session.ts")
|
22
|
-
[32mcreated [1mdist/pg.cjs, dist/pg.mjs[22m in [
|
22
|
+
[32mcreated [1mdist/pg.cjs, dist/pg.mjs[22m in [1m50ms[22m[39m
|
23
23
|
[36m
|
24
24
|
[1msrc/pg/index.ts[22m → [1mdist/pg.d.ts[22m...[39m
|
25
|
-
[32mcreated [1mdist/pg.d.ts[22m in [1m1.
|
25
|
+
[32mcreated [1mdist/pg.d.ts[22m in [1m1.5s[22m[39m
|
package/CHANGELOG.md
CHANGED
@@ -1,17 +1,20 @@
|
|
1
1
|
# @xata.io/drizzle
|
2
2
|
|
3
|
-
## 0.0.0-alpha.
|
4
|
-
|
5
|
-
### Major Changes
|
6
|
-
|
7
|
-
- [#1473](https://github.com/xataio/client-ts/pull/1473) [`0a60b36`](https://github.com/xataio/client-ts/commit/0a60b3612f7fba050eb3c73b0b3b7a73e58ff26f) Thanks [@eemmiillyy](https://github.com/eemmiillyy)! - Version 1.0
|
3
|
+
## 0.0.0-alpha.veb9e2f6e94760b6ade958a8ab3cad9a7e5bc6ae3
|
8
4
|
|
9
5
|
### Patch Changes
|
10
6
|
|
11
7
|
- Force canary build
|
12
8
|
|
13
|
-
- Updated dependencies [
|
14
|
-
- @xata.io/client@0.0.0-alpha.
|
9
|
+
- Updated dependencies []:
|
10
|
+
- @xata.io/client@0.0.0-alpha.veb9e2f6e94760b6ade958a8ab3cad9a7e5bc6ae3
|
11
|
+
|
12
|
+
## 0.0.22
|
13
|
+
|
14
|
+
### Patch Changes
|
15
|
+
|
16
|
+
- Updated dependencies [[`6b754d2`](https://github.com/xataio/client-ts/commit/6b754d2f6a1f7b9378a96fe27502ff6c29ff5ed8)]:
|
17
|
+
- @xata.io/client@0.29.5
|
15
18
|
|
16
19
|
## 0.0.21
|
17
20
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@xata.io/drizzle",
|
3
|
-
"version": "0.0.0-alpha.
|
3
|
+
"version": "0.0.0-alpha.veb9e2f6e94760b6ade958a8ab3cad9a7e5bc6ae3",
|
4
4
|
"description": "",
|
5
5
|
"main": "./dist/index.cjs",
|
6
6
|
"module": "./dist/index.mjs",
|
@@ -23,12 +23,12 @@
|
|
23
23
|
"url": "https://github.com/xataio/client-ts/issues"
|
24
24
|
},
|
25
25
|
"dependencies": {
|
26
|
-
"@xata.io/client": "0.0.0-alpha.
|
26
|
+
"@xata.io/client": "0.0.0-alpha.veb9e2f6e94760b6ade958a8ab3cad9a7e5bc6ae3"
|
27
27
|
},
|
28
28
|
"devDependencies": {
|
29
29
|
"@types/pg": "^8.11.6",
|
30
|
-
"drizzle-orm": "^0.
|
31
|
-
"pg": "^8.
|
30
|
+
"drizzle-orm": "^0.31.2",
|
31
|
+
"pg": "^8.12.0"
|
32
32
|
},
|
33
33
|
"peerDependencies": {
|
34
34
|
"drizzle-orm": "*"
|
package/test/drizzle.test.ts
CHANGED
@@ -53,16 +53,13 @@ function getDomain(host: HostProvider) {
|
|
53
53
|
|
54
54
|
function getDrizzleClient(type: string, branch: string) {
|
55
55
|
if (type === 'http') {
|
56
|
-
const xata = new BaseClient(
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
},
|
64
|
-
{ tables: [] }
|
65
|
-
);
|
56
|
+
const xata = new BaseClient({
|
57
|
+
apiKey,
|
58
|
+
host,
|
59
|
+
clientName: 'sdk-tests',
|
60
|
+
databaseURL: `https://${workspace}.${region}.${getDomain(host)}/db/${database}`,
|
61
|
+
branch
|
62
|
+
});
|
66
63
|
|
67
64
|
return { db: drizzleHttp(xata, { schema, logger: ENABLE_LOGGING }) };
|
68
65
|
} else if (type === 'pg') {
|
@@ -81,9 +78,10 @@ function getDrizzleClient(type: string, branch: string) {
|
|
81
78
|
|
82
79
|
describe.concurrent.each([{ type: 'pg' }, { type: 'http' }])('Drizzle $type', ({ type }) => {
|
83
80
|
beforeAll(async () => {
|
84
|
-
await api.
|
85
|
-
|
86
|
-
|
81
|
+
await api.database.createDatabase({
|
82
|
+
workspace,
|
83
|
+
database,
|
84
|
+
data: { region, branchName: 'main' },
|
87
85
|
headers: { 'X-Features': 'feat-pgroll-migrations=1' }
|
88
86
|
});
|
89
87
|
|
@@ -157,15 +155,12 @@ describe.concurrent.each([{ type: 'pg' }, { type: 'http' }])('Drizzle $type', ({
|
|
157
155
|
});
|
158
156
|
|
159
157
|
afterAll(async () => {
|
160
|
-
await api.
|
158
|
+
await api.database.deleteDatabase({ workspace, database });
|
161
159
|
});
|
162
160
|
|
163
161
|
beforeEach(async (ctx) => {
|
164
162
|
ctx.branch = `test-${Math.random().toString(36).substring(7)}`;
|
165
|
-
await api.
|
166
|
-
pathParams: { workspace, region, dbBranchName: `${database}:${ctx.branch}` },
|
167
|
-
body: { from: 'main' }
|
168
|
-
});
|
163
|
+
await api.branches.createBranch({ workspace, database, region, branch: ctx.branch, from: 'main' });
|
169
164
|
|
170
165
|
const { db, client } = getDrizzleClient(type, ctx.branch);
|
171
166
|
await client?.connect();
|
@@ -176,7 +171,7 @@ describe.concurrent.each([{ type: 'pg' }, { type: 'http' }])('Drizzle $type', ({
|
|
176
171
|
|
177
172
|
afterEach(async (ctx) => {
|
178
173
|
await ctx.client?.end();
|
179
|
-
await api.
|
174
|
+
await api.branches.deleteBranch({ workspace, database, region, branch: ctx.branch });
|
180
175
|
});
|
181
176
|
|
182
177
|
/*
|
@@ -6290,7 +6285,7 @@ describe.concurrent.each([{ type: 'pg' }, { type: 'http' }])('Drizzle $type', ({
|
|
6290
6285
|
async function waitForReplication(): Promise<void> {
|
6291
6286
|
try {
|
6292
6287
|
await new Promise((resolve) => setTimeout(resolve, 2000));
|
6293
|
-
await api.
|
6288
|
+
await api.branches.getBranchList({ workspace, database, region });
|
6294
6289
|
} catch (error) {
|
6295
6290
|
console.log(`Replication not ready yet, retrying...`);
|
6296
6291
|
return await waitForReplication();
|