Skip to content

feat: expose error type constants - #441

Merged
chrispader merged 2 commits into
mainfrom
@chrispader/feat/error-type-constants
Oct 12, 2026
Merged

chrispader merged 2 commits into
mainfrom
@chrispader/feat/error-type-constants

Conversation

@chrispader

@chrispader chrispader commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Consumers have to hard-code strings to distinguish NitroSQLite failures, and importing the package root initializes the native runtime. This PR exports the existing error categories as a NitroSQLiteExceptionType constant object and derives the existing union type from its values. The new react-native-nitro-sqlite/errors entry point exports that object and NitroSQLiteError without loading React Native or Nitro.

Existing category strings and type-only imports remain compatible. The error parser uses the same object, and source comments and the error-handling guide document the categories and new import path.

Regression coverage verifies that the errors entry point loads when native runtime imports throw and that both entry points share the same class and constants. The built CommonJS and ES module exports were also checked in an isolated package without native dependencies, including compatible type declarations.

Android CI also hit a Harness cache bug after all 137 integration tests passed. A dependency patch passes the Metro snapshot through a file instead of an oversized environment variable. A regression check exercises snapshots larger than 128 KiB and verifies unchanged caches, added files, save policy, and inline JSON compatibility.

@vercel

vercel Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
react-native-nitro-sqlite Ignored Ignored Preview Oct 12, 2026 11:03am UTC

Request Review

@chrispader
chrispader merged commit 74c7409 into main Oct 12, 2026
9 checks passed
@chrispader chrispader mentioned this pull request Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant