-
-
Notifications
You must be signed in to change notification settings - Fork 46
Closed
Labels
Description
As of Svelte CLI v0.6.26
-
db:generate
is not included in the scripts:
- Unused variable is included in the
schema.ts
file:
// 'text' is declared but its value is never read.ts(6133)
import { sqliteTable, text, integer } from 'drizzle-orm/sqlite-core';
export const user = sqliteTable('user', {
id: integer('id').primaryKey(),
age: integer('age')
});
- Line-breaks are missing in the
drizzle.config.ts
file:
import { defineConfig } from 'drizzle-kit';
if (!process.env.DATABASE_URL) throw new Error('DATABASE_URL is not set');
-
loadEnvFile
should probably be called in thedrizzle.config.ts
file:
import { defineConfig } from 'drizzle-kit';
import { loadEnvFile } from 'node:process';
loadEnvFile();
if (!process.env.DATABASE_URL) throw new Error('DATABASE_URL is not set');
-
@types/node
should probably be installed out-of-the box.
import { defineConfig } from 'drizzle-kit';
// Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`.ts(2580)
if (!process.env.DATABASE_URL) throw new Error('DATABASE_URL is not set');
- Line-breaks are missing in the
src\lib\server\db\index.ts
file:
import { drizzle } from 'drizzle-orm/libsql';
import { createClient } from '@libsql/client';
import * as schema from './schema';
import { env } from '$env/dynamic/private';
if (!env.DATABASE_URL) throw new Error('DATABASE_URL is not set');
const client = createClient({ url: env.DATABASE_URL });
Are there reasons behind these decisions? If not, I would love to create a PR.