Skip to content

Commit 03d510e

Browse files
committed
format.
1 parent b76d176 commit 03d510e

24 files changed

+270
-285
lines changed

biome.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
33
"files": {
4-
"include": ["src", "tests", "scripts"]
4+
"include": ["src", "tests", "scripts", "examples", "*.ts", "*.json"]
55
},
66
"javascript": {
77
"formatter": {

examples/bun/.config/kysely.config.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { defineConfig } from "kysely-ctl";
21
// @ts-ignore no idea why it can't find the module despite @types/bun being installed
3-
import { Database } from "bun:sqlite";
4-
import { BunSqliteDialect } from "kysely-bun-sqlite";
2+
import { Database } from 'bun:sqlite'
3+
import { BunSqliteDialect } from 'kysely-bun-sqlite'
4+
import { defineConfig } from 'kysely-ctl'
55

66
export default defineConfig({
7-
dialect: new BunSqliteDialect({
8-
database: new Database("./example.db"),
9-
}),
10-
});
7+
dialect: new BunSqliteDialect({
8+
database: new Database('./example.db'),
9+
}),
10+
})
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import type { Kysely } from "kysely";
1+
import type { Kysely } from 'kysely'
22

33
export async function up(db: Kysely<any>): Promise<void> {
4-
await db.schema.createTable("moshe").addColumn("id", "integer").execute();
4+
await db.schema.createTable('moshe').addColumn('id', 'integer').execute()
55
}
66

77
export async function down(db: Kysely<any>): Promise<void> {
8-
await db.schema.dropTable("moshe").execute();
8+
await db.schema.dropTable('moshe').execute()
99
}
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
import type { Kysely } from "kysely";
1+
import type { Kysely } from 'kysely'
22

33
export async function up(db: Kysely<any>): Promise<void> {
4-
await db.schema
5-
.alterTable("moshe")
6-
.addColumn("is_moshe", "boolean")
7-
.execute();
4+
await db.schema.alterTable('moshe').addColumn('is_moshe', 'boolean').execute()
85
}
96

107
export async function down(db: Kysely<any>): Promise<void> {
11-
await db.schema.alterTable("moshe").dropColumn("is_moshe").execute();
8+
await db.schema.alterTable('moshe').dropColumn('is_moshe').execute()
129
}

examples/bun/package.json

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
2-
"name": "bun-example",
3-
"module": "index.ts",
4-
"type": "module",
5-
"devDependencies": {
6-
"@types/bun": "latest",
7-
"kysely-ctl": "link:kysely-ctl"
8-
},
9-
"peerDependencies": {
10-
"typescript": "^5.0.0"
11-
},
12-
"dependencies": {
13-
"kysely": "^0.27.5",
14-
"kysely-bun-sqlite": "^0.3.2"
15-
}
2+
"name": "bun-example",
3+
"module": "index.ts",
4+
"type": "module",
5+
"devDependencies": {
6+
"@types/bun": "latest",
7+
"kysely-ctl": "link:kysely-ctl"
8+
},
9+
"peerDependencies": {
10+
"typescript": "^5.0.0"
11+
},
12+
"dependencies": {
13+
"kysely": "^0.27.5",
14+
"kysely-bun-sqlite": "^0.3.2"
15+
}
1616
}

examples/bun/tsconfig.json

+22-22
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
{
2-
"compilerOptions": {
3-
// Enable latest features
4-
"lib": ["ESNext", "DOM"],
5-
"target": "ESNext",
6-
"module": "ESNext",
7-
"moduleDetection": "force",
8-
"jsx": "react-jsx",
9-
"allowJs": true,
2+
"compilerOptions": {
3+
// Enable latest features
4+
"lib": ["ESNext", "DOM"],
5+
"target": "ESNext",
6+
"module": "ESNext",
7+
"moduleDetection": "force",
8+
"jsx": "react-jsx",
9+
"allowJs": true,
1010

11-
// Bundler mode
12-
"moduleResolution": "bundler",
13-
"allowImportingTsExtensions": true,
14-
"verbatimModuleSyntax": true,
15-
"noEmit": true,
11+
// Bundler mode
12+
"moduleResolution": "bundler",
13+
"allowImportingTsExtensions": true,
14+
"verbatimModuleSyntax": true,
15+
"noEmit": true,
1616

17-
// Best practices
18-
"strict": true,
19-
"skipLibCheck": true,
20-
"noFallthroughCasesInSwitch": true,
17+
// Best practices
18+
"strict": true,
19+
"skipLibCheck": true,
20+
"noFallthroughCasesInSwitch": true,
2121

22-
// Some stricter flags (disabled by default)
23-
"noUnusedLocals": false,
24-
"noUnusedParameters": false,
25-
"noPropertyAccessFromIndexSignature": false
26-
}
22+
// Some stricter flags (disabled by default)
23+
"noUnusedLocals": false,
24+
"noUnusedParameters": false,
25+
"noPropertyAccessFromIndexSignature": false
26+
}
2727
}
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
import { defineConfig } from "kysely-ctl";
2-
import postgres from "postgres";
1+
import { defineConfig } from 'kysely-ctl'
2+
import postgres from 'postgres'
33

44
export default defineConfig({
5-
dialect: "postgres",
6-
dialectConfig: {
7-
postgres: postgres({
8-
database: "kysely_test",
9-
host: "localhost",
10-
port: 5434,
11-
user: "kysely",
12-
}),
13-
},
14-
});
5+
dialect: 'postgres',
6+
dialectConfig: {
7+
postgres: postgres({
8+
database: 'kysely_test',
9+
host: 'localhost',
10+
port: 5434,
11+
user: 'kysely',
12+
}),
13+
},
14+
})
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import type { Kysely } from "kysely";
1+
import type { Kysely } from 'kysely'
22

33
export async function up(db: Kysely<any>): Promise<void> {
4-
await db.schema.createTable("moshe").addColumn("id", "integer").execute();
4+
await db.schema.createTable('moshe').addColumn('id', 'integer').execute()
55
}
66

77
export async function down(db: Kysely<any>): Promise<void> {
8-
await db.schema.dropTable("moshe").execute();
8+
await db.schema.dropTable('moshe').execute()
99
}
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
import type { Kysely } from "kysely";
1+
import type { Kysely } from 'kysely'
22

33
export async function up(db: Kysely<any>): Promise<void> {
4-
await db.schema
5-
.alterTable("moshe")
6-
.addColumn("is_moshe", "boolean")
7-
.execute();
4+
await db.schema.alterTable('moshe').addColumn('is_moshe', 'boolean').execute()
85
}
96

107
export async function down(db: Kysely<any>): Promise<void> {
11-
await db.schema.alterTable("moshe").dropColumn("is_moshe").execute();
8+
await db.schema.alterTable('moshe').dropColumn('is_moshe').execute()
129
}
+12-12
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
2-
"name": "deno-package-json",
3-
"scripts": {
4-
"kysely": "kysely"
5-
},
6-
"devDependencies": {
7-
"kysely-ctl": "^0.9.0"
8-
},
9-
"dependencies": {
10-
"kysely": "^0.27.5",
11-
"kysely-postgres-js": "^2.0.0",
12-
"postgres": "^3.4.4"
13-
}
2+
"name": "deno-package-json",
3+
"scripts": {
4+
"kysely": "kysely"
5+
},
6+
"devDependencies": {
7+
"kysely-ctl": "^0.9.0"
8+
},
9+
"dependencies": {
10+
"kysely": "^0.27.5",
11+
"kysely-postgres-js": "^2.0.0",
12+
"postgres": "^3.4.4"
13+
}
1414
}
+7-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { defineConfig } from "kysely-ctl";
2-
import database from "better-sqlite3";
1+
import database from 'better-sqlite3'
2+
import { defineConfig } from 'kysely-ctl'
33

44
export default defineConfig({
5-
dialect: "better-sqlite3",
6-
dialectConfig: {
7-
database: database("./example.db"),
8-
},
9-
});
5+
dialect: 'better-sqlite3',
6+
dialectConfig: {
7+
database: database('./example.db'),
8+
},
9+
})
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import type { Kysely } from "kysely";
1+
import type { Kysely } from 'kysely'
22

33
export async function up(db: Kysely<any>): Promise<void> {
4-
await db.schema.createTable("moshe").addColumn("id", "integer").execute();
4+
await db.schema.createTable('moshe').addColumn('id', 'integer').execute()
55
}
66

77
export async function down(db: Kysely<any>): Promise<void> {
8-
await db.schema.dropTable("moshe").execute();
8+
await db.schema.dropTable('moshe').execute()
99
}
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
import type { Kysely } from "kysely";
1+
import type { Kysely } from 'kysely'
22

33
export async function up(db: Kysely<any>): Promise<void> {
4-
await db.schema
5-
.alterTable("moshe")
6-
.addColumn("is_moshe", "boolean")
7-
.execute();
4+
await db.schema.alterTable('moshe').addColumn('is_moshe', 'boolean').execute()
85
}
96

107
export async function down(db: Kysely<any>): Promise<void> {
11-
await db.schema.alterTable("moshe").dropColumn("is_moshe").execute();
8+
await db.schema.alterTable('moshe').dropColumn('is_moshe').execute()
129
}

examples/node-cjs/package.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"name": "node-cjs",
3-
"type": "commonjs",
4-
"devDependencies": {
5-
"kysely-ctl": "link:../.."
6-
},
7-
"dependencies": {
8-
"better-sqlite3": "^11.7.0",
9-
"kysely": "^0.27.5"
10-
}
2+
"name": "node-cjs",
3+
"type": "commonjs",
4+
"devDependencies": {
5+
"kysely-ctl": "link:../.."
6+
},
7+
"dependencies": {
8+
"better-sqlite3": "^11.7.0",
9+
"kysely": "^0.27.5"
10+
}
1111
}
+7-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { defineConfig } from "kysely-ctl";
2-
import database from "better-sqlite3";
1+
import database from 'better-sqlite3'
2+
import { defineConfig } from 'kysely-ctl'
33

44
export default defineConfig({
5-
dialect: "better-sqlite3",
6-
dialectConfig: {
7-
database: database("./example.db"),
8-
},
9-
});
5+
dialect: 'better-sqlite3',
6+
dialectConfig: {
7+
database: database('./example.db'),
8+
},
9+
})
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import type { Kysely } from "kysely";
1+
import type { Kysely } from 'kysely'
22

33
export async function up(db: Kysely<any>): Promise<void> {
4-
await db.schema.createTable("moshe").addColumn("id", "integer").execute();
4+
await db.schema.createTable('moshe').addColumn('id', 'integer').execute()
55
}
66

77
export async function down(db: Kysely<any>): Promise<void> {
8-
await db.schema.dropTable("moshe").execute();
8+
await db.schema.dropTable('moshe').execute()
99
}
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
import type { Kysely } from "kysely";
1+
import type { Kysely } from 'kysely'
22

33
export async function up(db: Kysely<any>): Promise<void> {
4-
await db.schema
5-
.alterTable("moshe")
6-
.addColumn("is_moshe", "boolean")
7-
.execute();
4+
await db.schema.alterTable('moshe').addColumn('is_moshe', 'boolean').execute()
85
}
96

107
export async function down(db: Kysely<any>): Promise<void> {
11-
await db.schema.alterTable("moshe").dropColumn("is_moshe").execute();
8+
await db.schema.alterTable('moshe').dropColumn('is_moshe').execute()
129
}

examples/node-esm/package.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"name": "node-esm",
3-
"type": "module",
4-
"devDependencies": {
5-
"kysely-ctl": "link:../.."
6-
},
7-
"dependencies": {
8-
"better-sqlite3": "^11.7.0",
9-
"kysely": "^0.27.5"
10-
}
2+
"name": "node-esm",
3+
"type": "module",
4+
"devDependencies": {
5+
"kysely-ctl": "link:../.."
6+
},
7+
"dependencies": {
8+
"better-sqlite3": "^11.7.0",
9+
"kysely": "^0.27.5"
10+
}
1111
}

0 commit comments

Comments
 (0)