@xata.io/drizzle 0.0.22 → 0.0.23
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 +7 -0
- package/dist/index.d.ts +1 -1
- package/dist/pg.d.ts +1 -1
- package/package.json +4 -4
- package/test/drizzle.test.ts +10 -8
package/.turbo/turbo-build.log
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
> @xata.io/drizzle@0.0.
|
2
|
+
> @xata.io/drizzle@0.0.23 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 [1m493ms[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 [1m6.
|
14
|
+
[32mcreated [1mdist/index.d.ts[22m in [1m6.6s[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 [1m34ms[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
package/dist/index.d.ts
CHANGED
@@ -17,7 +17,7 @@ declare class XataHttpPreparedQuery<T extends PreparedQueryConfig> extends PgPre
|
|
17
17
|
private _isResponseInArrayMode;
|
18
18
|
private customResultMapper?;
|
19
19
|
static readonly [entityKind]: string;
|
20
|
-
constructor(client: XataHttpClient, query: Query, logger: Logger, fields: SelectedFieldsOrdered<PgColumn> | undefined, _isResponseInArrayMode: boolean, customResultMapper?: ((rows: unknown[][]) => T[
|
20
|
+
constructor(client: XataHttpClient, query: Query, logger: Logger, fields: SelectedFieldsOrdered<PgColumn> | undefined, _isResponseInArrayMode: boolean, customResultMapper?: ((rows: unknown[][]) => T["execute"]) | undefined);
|
21
21
|
execute(placeholderValues?: Record<string, unknown> | undefined): Promise<T['execute']>;
|
22
22
|
all(placeholderValues?: Record<string, unknown> | undefined): Promise<T['all']>;
|
23
23
|
values(placeholderValues?: Record<string, unknown> | undefined): Promise<T['values']>;
|
package/dist/pg.d.ts
CHANGED
@@ -13,7 +13,7 @@ declare class XataPreparedQuery<T extends PreparedQueryConfig> extends PgPrepare
|
|
13
13
|
static readonly [entityKind]: string;
|
14
14
|
private rawQueryConfig;
|
15
15
|
private queryConfig;
|
16
|
-
constructor(client: XataClient, queryString: string, params: unknown[], logger: Logger, fields: SelectedFieldsOrdered<PgColumn> | undefined, name: string | undefined, _isResponseInArrayMode: boolean, customResultMapper?: ((rows: unknown[][]) => T[
|
16
|
+
constructor(client: XataClient, queryString: string, params: unknown[], logger: Logger, fields: SelectedFieldsOrdered<PgColumn> | undefined, name: string | undefined, _isResponseInArrayMode: boolean, customResultMapper?: ((rows: unknown[][]) => T["execute"]) | undefined);
|
17
17
|
execute(placeholderValues?: Record<string, unknown> | undefined): Promise<T['execute']>;
|
18
18
|
all(placeholderValues?: Record<string, unknown> | undefined): Promise<T['all']>;
|
19
19
|
values(placeholderValues?: Record<string, unknown> | undefined): Promise<T['values']>;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@xata.io/drizzle",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.23",
|
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.
|
26
|
+
"@xata.io/client": "0.30.0"
|
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
@@ -78,10 +78,9 @@ function getDrizzleClient(type: string, branch: string) {
|
|
78
78
|
|
79
79
|
describe.concurrent.each([{ type: 'pg' }, { type: 'http' }])('Drizzle $type', ({ type }) => {
|
80
80
|
beforeAll(async () => {
|
81
|
-
await api.
|
82
|
-
workspace,
|
83
|
-
|
84
|
-
data: { region, branchName: 'main' },
|
81
|
+
await api.databases.createDatabase({
|
82
|
+
pathParams: { workspaceId: workspace, dbName: database },
|
83
|
+
body: { region, branchName: 'main' },
|
85
84
|
headers: { 'X-Features': 'feat-pgroll-migrations=1' }
|
86
85
|
});
|
87
86
|
|
@@ -155,12 +154,15 @@ describe.concurrent.each([{ type: 'pg' }, { type: 'http' }])('Drizzle $type', ({
|
|
155
154
|
});
|
156
155
|
|
157
156
|
afterAll(async () => {
|
158
|
-
await api.
|
157
|
+
await api.databases.deleteDatabase({ pathParams: { workspaceId: workspace, dbName: database } });
|
159
158
|
});
|
160
159
|
|
161
160
|
beforeEach(async (ctx) => {
|
162
161
|
ctx.branch = `test-${Math.random().toString(36).substring(7)}`;
|
163
|
-
await api.
|
162
|
+
await api.branch.createBranch({
|
163
|
+
pathParams: { workspace, region, dbBranchName: `${database}:${ctx.branch}` },
|
164
|
+
body: { from: 'main' }
|
165
|
+
});
|
164
166
|
|
165
167
|
const { db, client } = getDrizzleClient(type, ctx.branch);
|
166
168
|
await client?.connect();
|
@@ -171,7 +173,7 @@ describe.concurrent.each([{ type: 'pg' }, { type: 'http' }])('Drizzle $type', ({
|
|
171
173
|
|
172
174
|
afterEach(async (ctx) => {
|
173
175
|
await ctx.client?.end();
|
174
|
-
await api.
|
176
|
+
await api.branch.deleteBranch({ pathParams: { workspace, region, dbBranchName: `${database}:${ctx.branch}` } });
|
175
177
|
});
|
176
178
|
|
177
179
|
/*
|
@@ -6285,7 +6287,7 @@ describe.concurrent.each([{ type: 'pg' }, { type: 'http' }])('Drizzle $type', ({
|
|
6285
6287
|
async function waitForReplication(): Promise<void> {
|
6286
6288
|
try {
|
6287
6289
|
await new Promise((resolve) => setTimeout(resolve, 2000));
|
6288
|
-
await api.
|
6290
|
+
await api.branch.getBranchList({ pathParams: { workspace, dbName: database, region } });
|
6289
6291
|
} catch (error) {
|
6290
6292
|
console.log(`Replication not ready yet, retrying...`);
|
6291
6293
|
return await waitForReplication();
|