@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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @xata.io/drizzle@0.0.22 build /home/runner/work/client-ts/client-ts/packages/plugin-client-drizzle
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
  
@@ -8,10 +8,10 @@
8
8
  https://rollupjs.org/troubleshooting/#warning-treating-module-as-external-dependency
9
9
  drizzle-orm (imported by "src/http/driver.ts", "src/http/session.ts" and "src/shared/utils.ts")
10
10
  drizzle-orm/pg-core (imported by "src/http/driver.ts" and "src/http/session.ts")
11
- created dist/index.cjs, dist/index.mjs in 623ms
11
+ created dist/index.cjs, dist/index.mjs in 493ms
12
12
  
13
13
  src/index.ts → dist/index.d.ts...
14
- created dist/index.d.ts in 6.3s
14
+ created dist/index.d.ts in 6.6s
15
15
  
16
16
  src/pg/index.ts → dist/pg.cjs, dist/pg.mjs...
17
17
  (!) Unresolved dependencies
@@ -19,7 +19,7 @@
19
19
  drizzle-orm (imported by "src/pg/driver.ts", "src/pg/session.ts" and "src/shared/utils.ts")
20
20
  drizzle-orm/pg-core (imported by "src/pg/driver.ts" and "src/pg/session.ts")
21
21
  pg (imported by "src/pg/session.ts")
22
- created dist/pg.cjs, dist/pg.mjs in 61ms
22
+ created dist/pg.cjs, dist/pg.mjs in 34ms
23
23
  
24
24
  src/pg/index.ts → dist/pg.d.ts...
25
- created dist/pg.d.ts in 1.3s
25
+ created dist/pg.d.ts in 1.5s
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @xata.io/drizzle
2
2
 
3
+ ## 0.0.23
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`cc673c9`](https://github.com/xataio/client-ts/commit/cc673c9a7885351082020e360630eab5db78c652)]:
8
+ - @xata.io/client@0.30.0
9
+
3
10
  ## 0.0.22
4
11
 
5
12
  ### Patch Changes
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['execute']) | undefined);
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['execute']) | undefined);
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.22",
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.29.5"
26
+ "@xata.io/client": "0.30.0"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@types/pg": "^8.11.6",
30
- "drizzle-orm": "^0.30.10",
31
- "pg": "^8.11.5"
30
+ "drizzle-orm": "^0.31.2",
31
+ "pg": "^8.12.0"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "drizzle-orm": "*"
@@ -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.database.createDatabase({
82
- workspace,
83
- database,
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.database.deleteDatabase({ workspace, database });
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.branches.createBranch({ workspace, database, region, branch: ctx.branch, from: 'main' });
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.branches.deleteBranch({ workspace, database, region, branch: ctx.branch });
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.branches.getBranchList({ workspace, database, region });
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();