Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp authored and astrobot-houston committed Apr 4, 2024
1 parent 1662aa8 commit d4b88c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/db/src/runtime/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { pathToFileURL } from './utils.js';
import { type ColumnBuilderBaseConfig, type ColumnDataType, sql } from 'drizzle-orm';
import {
type IndexBuilder,
Expand All @@ -11,6 +10,7 @@ import {
} from 'drizzle-orm/sqlite-core';
import { type DBColumn, type DBTable } from '../core/types.js';
import { type SerializedSQL, isSerializedSQL } from './types.js';
import { pathToFileURL } from './utils.js';

export type { Table } from './types.js';
export { createRemoteDatabaseClient, createLocalDatabaseClient } from './db-client.js';
Expand Down
6 changes: 3 additions & 3 deletions packages/db/src/runtime/utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { AstroError } from 'astro/errors';

const isWindows = process?.platform === "win32";
const isWindows = process?.platform === 'win32';

/**
* Small wrapper around fetch that throws an error if the response is not OK. Allows for custom error handling as well through the onNotOK callback.
Expand Down Expand Up @@ -36,10 +36,10 @@ export default function slash(path: string) {
}

export function pathToFileURL(path: string): URL {
if(isWindows) {
if (isWindows) {
let slashed = slash(path);
// Windows like C:/foo/bar
if(!slashed.startsWith('/')) {
if (!slashed.startsWith('/')) {
slashed = '/' + slashed;
}
return new URL('file://' + slashed);
Expand Down

0 comments on commit d4b88c7

Please sign in to comment.