ReviewOS

also looking at this

stacks/bun-query-builder

chore: drop imports nothing uses

#1156
Merged glennmichael123 wants to merge chore/remove-unused-imports into main
9 files +4 -18

Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.

packages/bun-query-builder/src/actions/db-optimize.tsmodified+0-1
Changes to packages/bun-query-builder/src/actions/db-optimize.ts
@@ -1,6 +1,5 @@
11import type { SupportedDialect } from '@/types'
22import { isMysqlLike, resolveDialect } from '@/config'
3import process from 'node:process'
43import { bunSql, resolveDatabaseName } from '@/db'
54
65export interface OptimizeOptions {
packages/bun-query-builder/src/actions/db-wipe.tsmodified+0-1
Changes to packages/bun-query-builder/src/actions/db-wipe.ts
@@ -1,6 +1,5 @@
11import type { SupportedDialect } from '@/types'
22import { isMysqlLike, resolveDialect } from '@/config'
3import process from 'node:process'
43import { bunSql, resolveDatabaseName } from '@/db'
54
65export interface WipeOptions {
packages/bun-query-builder/src/actions/migrate-rollback.tsmodified+1-2
Changes to packages/bun-query-builder/src/actions/migrate-rollback.ts
@@ -1,6 +1,5 @@
11import { existsSync, readFileSync, unlinkSync } from 'node:fs'
2import { dirname, join } from 'node:path'
3import process from 'node:process'
2import { join } from 'node:path'
43import type { SupportedDialect } from '../types'
54import { config, getPlaceholder, isMysqlLike } from '../config'
65import { createQueryBuilder } from '../index'
packages/bun-query-builder/src/actions/migrate-status.tsmodified+0-2
Changes to packages/bun-query-builder/src/actions/migrate-status.ts
@@ -1,7 +1,5 @@
11import type { SupportedDialect } from '@/types'
22import { existsSync, readdirSync } from 'node:fs'
3import { dirname, join } from 'node:path'
4import process from 'node:process'
53import { config } from '@/config'
64import { getDialectDriver } from '@/drivers'
75import { createQueryBuilder } from '../index'
packages/bun-query-builder/src/client.tsmodified+1-1
Changes to packages/bun-query-builder/src/client.ts
@@ -5,7 +5,7 @@ import { Buffer } from 'node:buffer'
55import { serialize } from 'node:v8'
66import type { SchemaMeta } from './meta'
77import type { ResolvedPivot } from './pivot'
8import type { DatabaseSchema, AnyDatabaseSchema } from './schema'
8import type { AnyDatabaseSchema } from './schema'
99import type { QueryBuilderOptions, QueryHooks, SupportedDialect} from './types'
1010import { config, getPlaceholder, getPlaceholders, isMysqlLike, setConfig } from './config'
1111import type { DriverConnection, DriverQuery } from './db'
packages/bun-query-builder/src/dynamodb-client.tsmodified+0-5
Changes to packages/bun-query-builder/src/dynamodb-client.ts
@@ -6,18 +6,13 @@
66 */
77
88import type {
9 DynamoDBBatchGetItemParams,
10 DynamoDBBatchWriteItemParams,
119 DynamoDBComparisonOperator,
1210 DynamoDBCondition,
1311 DynamoDBConfig,
14 DynamoDBDeleteItemParams,
1512 DynamoDBDriver,
16 DynamoDBGetItemParams,
1713 DynamoDBPutItemParams,
1814 DynamoDBQueryParams,
1915 DynamoDBScanParams,
20 DynamoDBTransactWriteParams,
2116 DynamoDBUpdateItemParams,
2217 SingleTableEntityMapping,
2318} from './drivers/dynamodb'
packages/bun-query-builder/src/dynamodb-single-table.tsmodified+0-4
Changes to packages/bun-query-builder/src/dynamodb-single-table.ts
@@ -13,13 +13,9 @@
1313 */
1414
1515import type {
16 DynamoDBConfig,
17 DynamoDBDriver,
1816 DynamoDBGlobalSecondaryIndex,
1917 DynamoDBTableDefinition,
20 SingleTableEntityMapping,
2118} from './drivers/dynamodb'
22import { createDynamoDBDriver } from './drivers/dynamodb'
2319import type { DynamoDBFilterOperator, DynamoDBQueryBuilderOptions, DynamoDBValue } from './dynamodb-client'
2420import { DynamoDBItemBuilder, DynamoDBQueryBuilder } from './dynamodb-client'
2521
packages/bun-query-builder/src/dynamodb/migration-driver.tsmodified+1-1
Changes to packages/bun-query-builder/src/dynamodb/migration-driver.ts
@@ -23,7 +23,7 @@ import type { DynamoDBMigrationPlan, DynamoDBMigrationOperation, DynamoDBMigrati
2323import { DynamoDBClient, createClient } from './client'
2424import type { DynamoDBClientConfig } from './client'
2525import { DynamoDBMigrationTracker } from './migration-tracker'
26import { buildMigrationPlan, extractTableDefinition, hashTableDefinition } from './migrations'
26import { buildMigrationPlan, extractTableDefinition } from './migrations'
2727
2828// ============================================================================
2929// Types
packages/bun-query-builder/src/model.tsmodified+1-1
Changes to packages/bun-query-builder/src/model.ts
@@ -40,7 +40,7 @@
4040 * ```
4141 */
4242
43import { createBrowserModel, isBrowser, type BrowserModelDefinition } from './browser'
43import { createBrowserModel, type BrowserModelDefinition } from './browser'
4444import { clearLocalModels, createModel, type ModelStatic, type ModelDefinition as OrmModelDefinition } from './orm'
4545
4646// Re-export the browser model types for convenience