@xata.io/drizzle 0.0.0-alpha.vb3c523150aaa4ff018f4c993b4a2f0b520cd315f → 0.0.0-alpha.vb3e7cc82546110d2c0b5b67b9f1f38cec142cc29

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.
@@ -6,12 +6,12 @@
6
6
  src/index.ts → dist/index.cjs, dist/index.mjs...
7
7
  (!) Unresolved dependencies
8
8
  https://rollupjs.org/troubleshooting/#warning-treating-module-as-external-dependency
9
- drizzle-orm (imported by "src/http/session.ts", "src/http/driver.ts" and "src/shared/utils.ts")
10
- drizzle-orm/pg-core (imported by "src/http/session.ts" and "src/http/driver.ts")
11
- created dist/index.cjs, dist/index.mjs in 412ms
9
+ drizzle-orm (imported by "src/http/driver.ts", "src/http/session.ts" and "src/shared/utils.ts")
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 367ms
12
12
  
13
13
  src/index.ts → dist/index.d.ts...
14
- created dist/index.d.ts in 6.5s
14
+ created dist/index.d.ts in 6.2s
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 40ms
22
+ created dist/pg.cjs, dist/pg.mjs in 41ms
23
23
  
24
24
  src/pg/index.ts → dist/pg.d.ts...
25
25
  created dist/pg.d.ts in 1.5s
package/CHANGELOG.md CHANGED
@@ -1,13 +1,13 @@
1
1
  # @xata.io/drizzle
2
2
 
3
- ## 0.0.0-alpha.vb3c523150aaa4ff018f4c993b4a2f0b520cd315f
3
+ ## 0.0.0-alpha.vb3e7cc82546110d2c0b5b67b9f1f38cec142cc29
4
4
 
5
5
  ### Patch Changes
6
6
 
7
7
  - Force canary build
8
8
 
9
9
  - Updated dependencies []:
10
- - @xata.io/client@0.0.0-alpha.vb3c523150aaa4ff018f4c993b4a2f0b520cd315f
10
+ - @xata.io/client@0.0.0-alpha.vb3e7cc82546110d2c0b5b67b9f1f38cec142cc29
11
11
 
12
12
  ## 0.0.23
13
13
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xata.io/drizzle",
3
- "version": "0.0.0-alpha.vb3c523150aaa4ff018f4c993b4a2f0b520cd315f",
3
+ "version": "0.0.0-alpha.vb3e7cc82546110d2c0b5b67b9f1f38cec142cc29",
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.vb3c523150aaa4ff018f4c993b4a2f0b520cd315f"
26
+ "@xata.io/client": "0.0.0-alpha.vb3e7cc82546110d2c0b5b67b9f1f38cec142cc29"
27
27
  },
28
28
  "devDependencies": {
29
- "@types/pg": "^8.11.6",
30
- "drizzle-orm": "^0.32.2",
31
- "pg": "^8.12.0"
29
+ "@types/pg": "^8.11.10",
30
+ "drizzle-orm": "^0.33.0",
31
+ "pg": "^8.13.0"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "drizzle-orm": "*"
@@ -51,7 +51,7 @@ function getDomain(host: HostProvider) {
51
51
  }
52
52
  }
53
53
 
54
- function getDrizzleClient(type: string, branch: string) {
54
+ function getDrizzleClient(type: string, database: string, branch: string) {
55
55
  if (type === 'http') {
56
56
  const xata = new BaseClient({
57
57
  apiKey,
@@ -77,17 +77,18 @@ function getDrizzleClient(type: string, branch: string) {
77
77
  }
78
78
 
79
79
  describe.concurrent.each([{ type: 'pg' }, { type: 'http' }])('Drizzle $type', ({ type }) => {
80
+ const dbName = `${database}-${type}`;
81
+
80
82
  beforeAll(async () => {
81
83
  await api.databases.createDatabase({
82
- pathParams: { workspaceId: workspace, dbName: `${database}-${type}` },
83
- body: { region, branchName: 'main' },
84
- headers: { 'X-Features': 'feat-pgroll-migrations=1' }
84
+ pathParams: { workspaceId: workspace, dbName },
85
+ body: { region, branchName: 'main', postgresEnabled: true }
85
86
  });
86
87
 
87
- await waitForReplication();
88
+ await waitForReplication(dbName);
88
89
 
89
90
  // For now, run the migrations via wire protocol
90
- const { client, db } = getDrizzleClient('pg', 'main');
91
+ const { client, db } = getDrizzleClient('pg', dbName, 'main');
91
92
  await client?.connect();
92
93
 
93
94
  await db.execute(
@@ -154,17 +155,17 @@ describe.concurrent.each([{ type: 'pg' }, { type: 'http' }])('Drizzle $type', ({
154
155
  });
155
156
 
156
157
  afterAll(async () => {
157
- await api.databases.deleteDatabase({ pathParams: { workspaceId: workspace, dbName: database } });
158
+ await api.databases.deleteDatabase({ pathParams: { workspaceId: workspace, dbName } });
158
159
  });
159
160
 
160
161
  beforeEach(async (ctx) => {
161
162
  ctx.branch = `test-${Math.random().toString(36).substring(7)}`;
162
163
  await api.branch.createBranch({
163
- pathParams: { workspace, region, dbBranchName: `${database}:${ctx.branch}` },
164
+ pathParams: { workspace, region, dbBranchName: `${dbName}:${ctx.branch}` },
164
165
  body: { from: 'main' }
165
166
  });
166
167
 
167
- const { db, client } = getDrizzleClient(type, ctx.branch);
168
+ const { db, client } = getDrizzleClient(type, dbName, ctx.branch);
168
169
  await client?.connect();
169
170
 
170
171
  ctx.db = db;
@@ -173,7 +174,7 @@ describe.concurrent.each([{ type: 'pg' }, { type: 'http' }])('Drizzle $type', ({
173
174
 
174
175
  afterEach(async (ctx) => {
175
176
  await ctx.client?.end();
176
- await api.branch.deleteBranch({ pathParams: { workspace, region, dbBranchName: `${database}:${ctx.branch}` } });
177
+ await api.branch.deleteBranch({ pathParams: { workspace, region, dbBranchName: `${dbName}:${ctx.branch}` } });
177
178
  });
178
179
 
179
180
  /*
@@ -6284,12 +6285,12 @@ describe.concurrent.each([{ type: 'pg' }, { type: 'http' }])('Drizzle $type', ({
6284
6285
  });
6285
6286
  });
6286
6287
 
6287
- async function waitForReplication(): Promise<void> {
6288
+ async function waitForReplication(dbName: string): Promise<void> {
6288
6289
  try {
6289
6290
  await new Promise((resolve) => setTimeout(resolve, 2000));
6290
- await api.branch.getBranchList({ pathParams: { workspace, dbName: database, region } });
6291
+ await api.branch.getBranchList({ pathParams: { workspace, dbName, region } });
6291
6292
  } catch (error) {
6292
6293
  console.log(`Replication not ready yet, retrying...`);
6293
- return await waitForReplication();
6294
+ return await waitForReplication(dbName);
6294
6295
  }
6295
6296
  }