Skip to content

Commit e72cfab

Browse files
committed
Fixed JIT mapper result object init, extended test postpone date
1 parent 77837da commit e72cfab

File tree

11 files changed

+25
-24
lines changed

11 files changed

+25
-24
lines changed

drizzle-kit/tests/mysql/commutativity.integration.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ describe('conflict rule coverage (statement pairs)', () => {
181181
expect(conflicts).not.toBeUndefined();
182182
});
183183

184-
test.skipIf(Date.now() < +new Date('2026-02-24'))('check: alter vs drop', async () => {
184+
test.skipIf(Date.now() < +new Date('2026-03-03'))('check: alter vs drop', async () => {
185185
const parent = {
186186
t: mysqlTable('t', (t) => ({
187187
c: t.int(),
@@ -209,7 +209,7 @@ describe('conflict rule coverage (statement pairs)', () => {
209209
expect(conflicts).not.toBeUndefined();
210210
});
211211

212-
test.skipIf(Date.now() < +new Date('2026-02-24'))(
212+
test.skipIf(Date.now() < +new Date('2026-03-03'))(
213213
'explainConflicts returns reason for table drop vs column alter',
214214
async () => {
215215
const parent = {

drizzle-kit/tests/mysql/commutativity.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function mkTmp(): { tmp: string; fs: any; path: any; os: any } {
3636
}
3737

3838
describe('commutativity integration (mysql)', () => {
39-
test.skipIf(Date.now() < +new Date('2026-02-24'))(
39+
test.skipIf(Date.now() < +new Date('2026-03-03'))(
4040
'Parent not empty: detects conflict when first migration of branch A has a conflict with the last migration of branch B',
4141
async () => {
4242
const parentDDL = createDDL();
@@ -300,7 +300,7 @@ describe('commutativity integration (mysql)', () => {
300300
expect(report.conflicts[0].parentId).toBe('p1');
301301
});
302302

303-
test.skipIf(Date.now() < +new Date('2026-02-24'))(
303+
test.skipIf(Date.now() < +new Date('2026-03-03'))(
304304
'detects conflict when drop table in one branch and add column in other',
305305
async () => {
306306
const parentDDL = createDDL();
@@ -732,7 +732,7 @@ describe('commutativity integration (mysql)', () => {
732732
expect(report.conflicts.length).toBeGreaterThanOrEqual(0);
733733
});
734734

735-
test.skipIf(Date.now() < +new Date('2026-02-24'))('complex mixed: multiple tables and views diverging', async () => {
735+
test.skipIf(Date.now() < +new Date('2026-03-03'))('complex mixed: multiple tables and views diverging', async () => {
736736
const { tmp } = mkTmp();
737737
const files: string[] = [];
738738

drizzle-kit/tests/postgres/pg-columns.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ test('alter text type to enum type', async () => {
323323

324324
// https://github.com/drizzle-team/drizzle-orm/issues/3589
325325
// After discussion it was decided to postpone this feature
326-
test.skipIf(Date.now() < +new Date('2026-02-24'))('alter integer type to text type with fk constraints', async () => {
326+
test.skipIf(Date.now() < +new Date('2026-03-03'))('alter integer type to text type with fk constraints', async () => {
327327
const users1 = pgTable('users', {
328328
id: serial().primaryKey(),
329329
});

drizzle-kit/tests/postgres/pg-enums.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2460,7 +2460,7 @@ test('drop enum', async () => {
24602460

24612461
// https://github.com/drizzle-team/drizzle-orm/issues/4982
24622462
// enhancement
2463-
test.skipIf(Date.now() < +new Date('2026-02-24'))(
2463+
test.skipIf(Date.now() < +new Date('2026-03-03'))(
24642464
'alter enum values; enum value is column default; table with data',
24652465
async () => {
24662466
enum AppStatus1 {

drizzle-kit/tests/postgres/pg-tables.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1500,7 +1500,7 @@ test('push with pscale_extensions schema', async () => {
15001500
});
15011501

15021502
// https://github.com/drizzle-team/drizzle-orm/issues/5329
1503-
test.skipIf(Date.now() < +new Date('2026-02-24'))(
1503+
test.skipIf(Date.now() < +new Date('2026-03-03'))(
15041504
'push empty schema with `schemaFilter` set to `["public"]`',
15051505
async () => {
15061506
await db.query(`CREATE SCHEMA "cron";`);

drizzle-kit/tests/postgres/pg-views.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2105,7 +2105,7 @@ test('.as in view select', async () => {
21052105

21062106
// https://github.com/drizzle-team/drizzle-orm/issues/4181
21072107
// casing bug
2108-
test.skipIf(Date.now() < +new Date('2026-02-24'))('create view with snake_case', async () => {
2108+
test.skipIf(Date.now() < +new Date('2026-03-03'))('create view with snake_case', async () => {
21092109
const test = pgTable('test', {
21102110
testId: serial().primaryKey(),
21112111
testName: text().notNull(),
@@ -2142,7 +2142,7 @@ test.skipIf(Date.now() < +new Date('2026-02-24'))('create view with snake_case',
21422142

21432143
// https://github.com/drizzle-team/drizzle-orm/issues/4181
21442144
// casing bug
2145-
test.skipIf(Date.now() < +new Date('2026-02-24'))('create view with camelCase', async () => {
2145+
test.skipIf(Date.now() < +new Date('2026-03-03'))('create view with camelCase', async () => {
21462146
const test = pgTable('test', {
21472147
test_id: serial().primaryKey(),
21482148
test_name: text().notNull(),

drizzle-kit/tests/postgres/pull.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ test('introspect view #3', async () => {
720720
// https://github.com/drizzle-team/drizzle-orm/issues/4262
721721
// postopone
722722
// Need to write discussion/guide on this and add ts comment in typescript file
723-
test.skipIf(Date.now() < +new Date('2026-02-24'))('introspect view #4', async () => {
723+
test.skipIf(Date.now() < +new Date('2026-03-03'))('introspect view #4', async () => {
724724
const table = pgTable('table', {
725725
column1: text().notNull(),
726726
column2: text(),
@@ -742,7 +742,7 @@ test.skipIf(Date.now() < +new Date('2026-02-24'))('introspect view #4', async ()
742742
// https://github.com/drizzle-team/drizzle-orm/issues/4262
743743
// postopone
744744
// Need to write discussion/guide on this and add ts comment in typescript file
745-
test.skipIf(Date.now() < +new Date('2026-02-24'))('introspect view #5', async () => {
745+
test.skipIf(Date.now() < +new Date('2026-03-03'))('introspect view #5', async () => {
746746
const applications = pgTable('applications', {
747747
applicationId: serial('application_id').primaryKey(),
748748
studentId: integer('student_id').references(() => students.studentId),
@@ -1423,7 +1423,7 @@ test('introspect view with table filter', async () => {
14231423
// this does not look like a bug
14241424
// sequences are separete entities
14251425
// entity filter for sequences ??
1426-
test.skipIf(Date.now() < +new Date('2026-02-24'))('introspect sequences with table filter', async () => {
1426+
test.skipIf(Date.now() < +new Date('2026-03-03'))('introspect sequences with table filter', async () => {
14271427
// can filter sequences with select pg_get_serial_sequence('"schema_name"."table_name"', 'column_name')
14281428

14291429
// const seq1 = pgSequence('seq1');

drizzle-orm/src/utils.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,9 @@ function makeJitQueryMapperInner(
9292

9393
let processedPath;
9494
for (const p of pathPrefix) {
95-
processedPath = processedPath ? `${p}[${JSON.stringify(p)}]` : JSON.stringify(p);
95+
processedPath = processedPath ? `${processedPath}[${JSON.stringify(p)}]` : `[${JSON.stringify(p)}]`;
9696
if (initializedPaths.has(processedPath)) continue;
97-
fn.push(`res[${processedPath}] = {};`);
97+
fn.push(`res${processedPath} = {};`);
9898
initializedPaths.add(processedPath);
9999
}
100100

@@ -174,7 +174,8 @@ export function makeJitQueryMapper<TResult>(
174174
${makeJitQueryMapperInner(columns, joinsNotNullableMap)}
175175
mapped[i] = res;
176176
}
177-
return mapped;`,
177+
return mapped;
178+
//# sourceURL=drizzle:jit-query-mapper`,
178179
).bind({
179180
getTableName,
180181
}) as any;

integration-tests/tests/pg/common-pt1.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ export function tests(test: Test) {
690690
// https://github.com/drizzle-team/drizzle-orm/issues/4209
691691
// postpone
692692
// casing bug
693-
test.skipIf(Date.now() < +new Date('2026-02-24')).concurrent('2 consecutive use of .toSQL', async ({ db }) => {
693+
test.skipIf(Date.now() < +new Date('2026-03-03')).concurrent('2 consecutive use of .toSQL', async ({ db }) => {
694694
const t1 = pgTable('table', (t) => ({
695695
id: t.text().primaryKey(),
696696
}));

integration-tests/tests/pg/common-pt2.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2587,7 +2587,7 @@ export function tests(test: Test) {
25872587

25882588
// https://github.com/drizzle-team/drizzle-orm/issues/5112
25892589
// looks like casing issue
2590-
test.skipIf(Date.now() < +new Date('2026-02-24')).concurrent('view #1', async ({ push, createDB }) => {
2590+
test.skipIf(Date.now() < +new Date('2026-03-03')).concurrent('view #1', async ({ push, createDB }) => {
25912591
const animal = pgTable('animal', (t) => ({
25922592
id: t.text().primaryKey(),
25932593
name: t.text().notNull(),
@@ -3797,7 +3797,7 @@ export function tests(test: Test) {
37973797
// https://github.com/drizzle-team/drizzle-orm/issues/5253
37983798
// enhancement
37993799
// allow select which columns to insert in insert...select
3800-
test.skipIf(Date.now() < +new Date('2026-02-24')).concurrent('insert into ... select #2', async ({ db, push }) => {
3800+
test.skipIf(Date.now() < +new Date('2026-03-03')).concurrent('insert into ... select #2', async ({ db, push }) => {
38013801
const users = pgTable('users_114', {
38023802
id: integer('id').primaryKey(),
38033803
name: text('name').notNull(),
@@ -3871,7 +3871,7 @@ export function tests(test: Test) {
38713871
});
38723872

38733873
// https://github.com/drizzle-team/drizzle-orm/issues/4596
3874-
test.skipIf(Date.now() < +new Date('2026-02-24'))(
3874+
test.skipIf(Date.now() < +new Date('2026-03-03'))(
38753875
'functional index; onConflict do update',
38763876
async ({ db, push }) => {
38773877
throw new Error('SKIP. commented below because of type error');
@@ -3909,7 +3909,7 @@ export function tests(test: Test) {
39093909
);
39103910

39113911
// https://github.com/drizzle-team/drizzle-orm/issues/5282
3912-
test.skipIf(Date.now() < +new Date('2026-02-24'))('casing in sql``', async ({ createDB, push }) => {
3912+
test.skipIf(Date.now() < +new Date('2026-03-03'))('casing in sql``', async ({ createDB, push }) => {
39133913
const payments = pgTable('payments', {
39143914
id: integer().primaryKey(),
39153915
amount: numeric(),
@@ -3944,7 +3944,7 @@ export function tests(test: Test) {
39443944
});
39453945

39463946
// https://github.com/drizzle-team/drizzle-orm/issues/4419
3947-
test.skipIf(Date.now() < +new Date('2026-02-24'))('db/js timestamp comparison', async ({ db, push }) => {
3947+
test.skipIf(Date.now() < +new Date('2026-03-03'))('db/js timestamp comparison', async ({ db, push }) => {
39483948
const table1 = pgTable('table1', {
39493949
id: integer(),
39503950
// default config equal to: { mode: 'date' }

0 commit comments

Comments
 (0)