Registry / database / sqlite-hello-darwin-arm64

sqlite-hello-darwin-arm64

JSON →
library0.1.0-alpha.79jsnpmunverified

A native SQLite extension binary for macOS ARM64 that provides a 'hello' function, part of the sqlite-dist family. Version 0.1.0-alpha.79 is the current pre-release; release cadence is tied to sqlite-dist. Key differentiator: precompiled extension for Apple Silicon, enabling easy testing of sqlite-dist's cross-platform distribution mechanism. Ships TypeScript types for type-safe usage in Node.js.

npm install sqlite-hello-darwin-arm64
INSTALL
IMPORT
SIG · SQLITE-HELLO-DARWI
S
sqlite-hello-darwin-arm64
databasejavascriptv0.1.0-alpha.79
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default (namespace)
import * as sqliteHello from 'sqlite-hello-darwin-arm64'
import sqliteHello from 'sqlite-hello-darwin-arm64'
This package exports a namespace object; default import will not work.
loadExtension
import { loadExtension } from 'sqlite-hello-darwin-arm64'
const { loadExtension } = require('sqlite-hello-darwin-arm64')
CommonJS require is not supported; this package is ESM-only.
Type definitions
import type { HelloExtension } from 'sqlite-hello-darwin-arm64'
import { HelloExtension } from 'sqlite-hello-darwin-arm64'
HelloExtension is a type, not a runtime value. Use import type.

Shows how to load the extension from Node.js using better-sqlite3 and invoke the hello function.

import * as sqliteHello from 'sqlite-hello-darwin-arm64'; import Database from 'better-sqlite3'; const db = new Database(':memory:'); // Load the extension using its path const extPath = sqliteHello.path; db.loadExtension(extPath); // Call the 'hello' function const result = db.prepare("SELECT hello('World')").pluck().get(); console.log(result); // 'Hello, World!' db.close();
Debug
Known issues
gotchaPlatform-specific package: only works on darwin-arm64 (macOS with Apple Silicon). Attempting to install on other platforms will result in missing binary.
fix
Use a conditional dependency or rely on sqlite-dist to automatically select the correct platform package.
affects: all
breakingESM-only: This package does not support CommonJS require. Using require() will throw.
fix
Use import syntax or enable ESM in your project.
affects: >=0.1.0-alpha.79
deprecatedThe extension name may change in future releases; sqlite-hello is a test extension and not stable.
fix
Do not rely on this package in production; use only for testing sqlite-dist.
affects: all
Errors
Common errors & fixes
Cannot find module 'sqlite-hello-darwin-arm64' or its corresponding type declarations.
Package not installed or unsupported platform (not darwin-arm64).
fix
Run `npm install sqlite-hello-darwin-arm64` on a macOS Apple Silicon machine, or use sqlite-dist for cross-platform.
Error: The module 'sqlite-hello-darwin-arm64' is not a valid ESM module.
Trying to use CommonJS require() on an ESM-only package.
fix
Change the import to an ESM import: `import * as sqliteHello from 'sqlite-hello-darwin-arm64'`
TypeError: db.loadExtension is not a function
Using a database driver that does not support loadExtension (e.g., sql.js instead of better-sqlite3).
fix
Use better-sqlite3 or another driver that supports loading native extensions.
Upgrade
Version history
0.1.0-alpha.79latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
18 hits · last 30 days
node
14
Meta
1
OpenAI (training)
1
Resources
sqlite-hello-darwin-arm64 — npm install sqlite-hello-darwin-arm64 · libregistry