Skip to content

Commit 88be5f8

Browse files
authored
Merge pull request #320 from drizzle-team/beta
2 parents 53b4ce3 + e17a5ba commit 88be5f8

File tree

9 files changed

+20
-20
lines changed

9 files changed

+20
-20
lines changed

changelogs/drizzle-orm/0.23.2.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- 🐛 Rolled back some breaking changes for drizzle-kit

drizzle-orm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "drizzle-orm",
3-
"version": "0.23.1",
3+
"version": "0.23.2",
44
"description": "Drizzle ORM package for SQL databases",
55
"scripts": {
66
"build": "tsc && resolve-tspaths && cp ../README.md package.json dist/",

drizzle-orm/src/mysql-core/dialect.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ export class MySqlDialect {
143143
if (isSingleTable) {
144144
chunk.push(
145145
new SQL(
146-
query.chunks.map((c) => {
146+
query.queryChunks.map((c) => {
147147
if (c instanceof MySqlColumn) {
148148
return new Name(c.name);
149149
}

drizzle-orm/src/pg-core/dialect.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ export class PgDialect {
134134
if (isSingleTable) {
135135
chunk.push(
136136
new SQL(
137-
query.chunks.map((c) => {
137+
query.queryChunks.map((c) => {
138138
if (c instanceof PgColumn) {
139139
return new Name(c.name);
140140
}

drizzle-orm/src/sql/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ function mergeQueries(queries: Query[]): Query {
5959
return result;
6060
}
6161

62-
class StringChunk {
62+
export class StringChunk {
6363
readonly value: string[];
6464

6565
constructor(value: string | string[]) {
@@ -77,15 +77,15 @@ export class SQL<T = unknown> implements SQLWrapper {
7777
decoder: DriverValueDecoder<T, any> = noopDecoder;
7878
private shouldInlineParams = false;
7979

80-
constructor(readonly chunks: SQLChunk[]) {}
80+
constructor(readonly queryChunks: SQLChunk[]) {}
8181

8282
append(query: SQL): this {
83-
this.chunks.push(...query.chunks);
83+
this.queryChunks.push(...query.queryChunks);
8484
return this;
8585
}
8686

8787
toQuery(config: BuildQueryConfig): Query {
88-
return this.buildQueryFromSourceParams(this.chunks, config);
88+
return this.buildQueryFromSourceParams(this.queryChunks, config);
8989
}
9090

9191
buildQueryFromSourceParams(chunks: SQLChunk[], _config: BuildQueryConfig): Query {
@@ -129,7 +129,7 @@ export class SQL<T = unknown> implements SQLWrapper {
129129
}
130130

131131
if (chunk instanceof SQL) {
132-
return this.buildQueryFromSourceParams(chunk.chunks, {
132+
return this.buildQueryFromSourceParams(chunk.queryChunks, {
133133
...config,
134134
inlineParams: inlineParams || chunk.shouldInlineParams,
135135
});

drizzle-orm/src/sqlite-core/columns/integer.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export interface PrimaryKeyConfig {
1717
onConflict?: OnConflict;
1818
}
1919

20-
export abstract class SQLiteIntegerBaseBuilder<
20+
export abstract class SQLiteBaseIntegerBuilder<
2121
THKT extends ColumnBuilderHKTBase,
2222
T extends ColumnBuilderBaseConfig,
2323
> extends SQLiteColumnBuilder<THKT, T, { autoIncrement: boolean }> {
@@ -39,18 +39,18 @@ export abstract class SQLiteIntegerBaseBuilder<
3939
/** @internal */
4040
abstract override build<TTableName extends string>(
4141
table: AnySQLiteTable<{ name: TTableName }>,
42-
): SQLiteIntegerBase<Assume<THKT['_columnHKT'], ColumnHKTBase>, MakeColumnConfig<T, TTableName>>;
42+
): SQLiteBaseInteger<Assume<THKT['_columnHKT'], ColumnHKTBase>, MakeColumnConfig<T, TTableName>>;
4343
}
4444

45-
export abstract class SQLiteIntegerBase<
45+
export abstract class SQLiteBaseInteger<
4646
THKT extends ColumnHKTBase,
4747
T extends ColumnBaseConfig,
4848
> extends SQLiteColumn<THKT, T> {
4949
readonly autoIncrement: boolean;
5050

5151
constructor(
5252
override readonly table: AnySQLiteTable<{ name: T['tableName'] }>,
53-
config: SQLiteIntegerBaseBuilder<ColumnBuilderHKTBase, T>['config'],
53+
config: SQLiteBaseIntegerBuilder<ColumnBuilderHKTBase, T>['config'],
5454
) {
5555
super(table, config);
5656
this.autoIncrement = config.autoIncrement;
@@ -79,7 +79,7 @@ export type SQLiteIntegerBuilderInitial<TName extends string> = SQLiteIntegerBui
7979
}>;
8080

8181
export class SQLiteIntegerBuilder<T extends ColumnBuilderBaseConfig>
82-
extends SQLiteIntegerBaseBuilder<SQLiteIntegerBuilderHKT, T>
82+
extends SQLiteBaseIntegerBuilder<SQLiteIntegerBuilderHKT, T>
8383
{
8484
build<TTableName extends string>(
8585
table: AnySQLiteTable<{ name: TTableName }>,
@@ -88,7 +88,7 @@ export class SQLiteIntegerBuilder<T extends ColumnBuilderBaseConfig>
8888
}
8989
}
9090

91-
export class SQLiteInteger<T extends ColumnBaseConfig> extends SQLiteIntegerBase<SQLiteIntegerHKT, T> {}
91+
export class SQLiteInteger<T extends ColumnBaseConfig> extends SQLiteBaseInteger<SQLiteIntegerHKT, T> {}
9292

9393
export interface SQLiteTimestampBuilderHKT extends ColumnBuilderHKTBase {
9494
_type: SQLiteTimestampBuilder<Assume<this['config'], ColumnBuilderBaseConfig>>;
@@ -108,7 +108,7 @@ export type SQLiteTimestampBuilderInitial<TName extends string> = SQLiteTimestam
108108
}>;
109109

110110
export class SQLiteTimestampBuilder<T extends ColumnBuilderBaseConfig>
111-
extends SQLiteIntegerBaseBuilder<SQLiteTimestampBuilderHKT, T>
111+
extends SQLiteBaseIntegerBuilder<SQLiteTimestampBuilderHKT, T>
112112
{
113113
/**
114114
* @deprecated Use `defaultCurrentTimestamp()` or `default()` with your own expression instead.
@@ -133,7 +133,7 @@ export class SQLiteTimestampBuilder<T extends ColumnBuilderBaseConfig>
133133
}
134134
}
135135

136-
export class SQLiteTimestamp<T extends ColumnBaseConfig> extends SQLiteIntegerBase<SQLiteTimestampHKT, T> {
136+
export class SQLiteTimestamp<T extends ColumnBaseConfig> extends SQLiteBaseInteger<SQLiteTimestampHKT, T> {
137137
override mapFromDriverValue(value: number): Date {
138138
return new Date(value);
139139
}

drizzle-orm/src/sqlite-core/dialect.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export abstract class SQLiteDialect {
9898
if (isSingleTable) {
9999
chunk.push(
100100
new SQL(
101-
query.chunks.map((c) => {
101+
query.queryChunks.map((c) => {
102102
if (c instanceof SQLiteColumn) {
103103
return new Name(c.name);
104104
}

drizzle-orm/src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
export const compatibilityVersion = 3;
1+
export const compatibilityVersion = 4;
22
export const npmVersion: string = require('./package.json').version;

tsconfig.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@
3333
"allowUnusedLabels": false /* Disable error reporting for unused labels. */,
3434
"allowUnreachableCode": false /* Disable error reporting for unreachable code. */,
3535
"skipLibCheck": true /* Skip type checking all .d.ts files. */,
36-
"noErrorTruncation": true /* Disable truncating types in error messages. */,
37-
"importsNotUsedAsValues": "error" /* Specify emit/checking behavior for imports that are only used for types */
36+
"noErrorTruncation": true /* Disable truncating types in error messages. */
3837
},
3938
"exclude": ["**/dist"],
4039
"ts-node": {

0 commit comments

Comments
 (0)