diff --git a/node/src/database.ts b/node/src/database.ts index 972f78d2..3ac5793e 100644 --- a/node/src/database.ts +++ b/node/src/database.ts @@ -13,7 +13,7 @@ import type { SQLBatchTuple, Transaction, UpdateHookOperation, -} from "./types"; +} from "./types.js"; export class NodeDatabase implements DB { private db: Database.Database; diff --git a/node/src/index.ts b/node/src/index.ts index 6743eadf..948100ca 100644 --- a/node/src/index.ts +++ b/node/src/index.ts @@ -1,8 +1,8 @@ import * as path from "node:path"; -import { NodeDatabase } from "./database"; -import type { DB, DBParams, OPSQLiteProxy } from "./types"; +import { NodeDatabase } from "./database.js"; +import type { DB, DBParams, OPSQLiteProxy } from "./types.js"; -export { NodeDatabase as Database } from "./database"; +export { NodeDatabase as Database } from "./database.js"; export type { BatchQueryResult, ColumnMetadata, @@ -16,7 +16,7 @@ export type { SQLBatchTuple, Transaction, UpdateHookOperation, -} from "./types"; +} from "./types.js"; class OPSQLiteProxyImpl implements OPSQLiteProxy { open(options: { diff --git a/node/src/test.spec.ts b/node/src/test.spec.ts index fa406d9a..01dad318 100644 --- a/node/src/test.spec.ts +++ b/node/src/test.spec.ts @@ -1,7 +1,7 @@ import * as fs from "node:fs"; import * as path from "node:path"; import * as os from "node:os"; -import { isIOSEmbedded, isLibsql, isSQLCipher, open } from "./index"; +import { isIOSEmbedded, isLibsql, isSQLCipher, open } from "./index.js"; describe("op-sqlite Node.js tests", () => { let db: ReturnType; diff --git a/node/tsconfig.json b/node/tsconfig.json index a4695d8c..ae09fd4a 100644 --- a/node/tsconfig.json +++ b/node/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { "target": "ES2020", - "module": "ESNext", + "module": "NodeNext", "lib": ["ES2020"], "declaration": true, "declarationMap": true, @@ -12,7 +12,7 @@ "esModuleInterop": true, "skipLibCheck": true, "forceConsistentCasingInFileNames": true, - "moduleResolution": "bundler", + "moduleResolution": "NodeNext", "allowSyntheticDefaultImports": true, "resolveJsonModule": true, "types": ["node", "jest"]