Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/utils-reference/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ npm install --save @raycast/utils

## Changelog

### v2.2.1

- Fix compiled file to actually make `useSQL` and `executeSQL` work on Windows.

### v2.2.0

- Make `useSQL` and `executeSQL` work on Windows.
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@raycast/utils",
"version": "2.2.0",
"version": "2.2.1",
"description": "Set of utilities to streamline building Raycast extensions",
"author": "Raycast Technologies Ltd.",
"homepage": "https://developers.raycast.com/utilities/getting-started",
Expand Down
4 changes: 3 additions & 1 deletion src/sql-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ export async function baseExecuteSQL<T = unknown>(

let sqlite3: typeof import("node:sqlite");
try {
sqlite3 = require("node:sqlite");
// this is a bit ugly but we can't directly import "node:sqlite" here because parcel will hoist it anyway and it will break when it's not available
const dynamicImport = (module: string) => import(module);
sqlite3 = await dynamicImport("node:sqlite");
} catch (error) {
// If sqlite3 is not available, we fallback to using the sqlite3 CLI (available on macOS and Linux by default).
return sqliteFallback<T>(databasePath, query, options);
Expand Down
Loading