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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,5 @@ android/.gradle
yalc.lock

# Typescript
**/.tsbuild/
**/tsconfig.tsbuildinfo
12 changes: 0 additions & 12 deletions config/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
{
"extends": "@tsconfig/react-native/tsconfig.json",
"include": ["**/*.ts", "**/*.tsx"],
"exclude": [
"**/node_modules",
"**/Pods",
"**/lib",
"**/.eslintrc.js",
"**/.prettierrc.js",
"**/jest.config.js",
"**/babel.config.js",
"**/metro.config.js",
"**/tsconfig.json"
],
"compilerOptions": {
"composite": true,
"allowUnreachableCode": false,
Expand Down
2 changes: 2 additions & 0 deletions example/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ module.exports = {
'stream': 'readable-stream',
'buffer': 'react-native-quick-crypto',
'react-native-sqlite-storage': 'react-native-nitro-sqlite',
'^@nitro-sqlite/(.+)':
'../packages/react-native-nitro-sqlite/src/\\1',
'^@/(.+)': './src/\\1',
'^@tests/(.+)': './tests/\\1',
},
Expand Down
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"ios": "react-native run-ios",
"bundle-install": "bundle install",
"pods": "cd ios && bundle exec pod install",
"typecheck": "tsc --noEmit",
"typecheck": "tsc --build",
"lint": "eslint \"**/*.{js,ts,tsx}\" --fix",
"codegen": "bun react-native codegen",
"test:harness": "react-native-harness",
Expand Down
2 changes: 1 addition & 1 deletion example/tests/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { open } from 'react-native-nitro-sqlite'
import {
getDatabaseQueue,
type DatabaseQueue,
} from '../../packages/react-native-nitro-sqlite/src/DatabaseQueue'
} from '@nitro-sqlite/DatabaseQueue'

const chance = new Chance()

Expand Down
4 changes: 2 additions & 2 deletions example/tests/unit/specs/operations/execute.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { chance, expect, isNitroSQLiteError } from '@tests/unit/common'
import { describe, it } from '@tests/TestApi'
import { createArrayBufferTestDb, testDb } from '@tests/db'
import { open } from 'react-native-nitro-sqlite'
import { buildJSQueryResult } from '../../../../../packages/react-native-nitro-sqlite/src/operations/execute'
import type { NitroSQLiteQueryResult } from '../../../../../packages/react-native-nitro-sqlite/src/specs/NitroSQLiteQueryResult.nitro'
import { buildJSQueryResult } from '@nitro-sqlite/operations/execute'
import type { NitroSQLiteQueryResult } from '@nitro-sqlite/specs/NitroSQLiteQueryResult.nitro'

const QUERY_RESULT_SIZES = [60, 1_000, 10_000]

Expand Down
13 changes: 4 additions & 9 deletions example/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
{
"extends": "../config/tsconfig.json",
"include": [
"src",
"tests",
"index.js",
"../packages/react-native-nitro-sqlite/src",
"rn-harness.config.mjs"
],
"include": ["src", "tests", "index.js", "rn-harness.config.mjs"],
"references": [{ "path": "../packages/react-native-nitro-sqlite" }],
"compilerOptions": {
"paths": {
"react-native-nitro-sqlite": [
"../packages/react-native-nitro-sqlite/src"
"../packages/react-native-nitro-sqlite/src/index.ts"
],
"*": ["./*"],
"@nitro-sqlite/*": ["../packages/react-native-nitro-sqlite/src/*"],
"@/*": ["./src/*"],
"@tests/*": ["./tests/*"]
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
"homepage": "https://github.com/margelo/react-native-nitro-sqlite#readme",
"scripts": {
"postinstall": "patch-package",
"typecheck": "bun --filter=\"**\" typecheck",
"typecheck": "tsc --build",
"lint": "bun sqlite lint && bun example lint",
"lint-cpp": "./scripts/clang-format.sh",
"prettier": "prettier --write .",
"clean": "rm -rf **/tsconfig.tsbuildinfo node_modules packages/react-native-nitro-sqlite/node_module packages/react-native-nitro-sqlite/lib",
"clean": "rm -rf **/.tsbuild **/tsconfig.tsbuildinfo node_modules packages/react-native-nitro-sqlite/node_module packages/react-native-nitro-sqlite/lib",
"release": "./scripts/release.sh",
"sqlite": "bun --cwd packages/react-native-nitro-sqlite",
"example": "bun --cwd example"
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-nitro-sqlite-vec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"README.md"
],
"scripts": {
"typecheck": "tsc --noEmit",
"typecheck": "tsc --build",
"lint": "eslint \"**/*.{js,ts,tsx}\" --fix",
"release": "release-it",
"prepublishOnly": "bun typecheck"
Expand Down
6 changes: 4 additions & 2 deletions packages/react-native-nitro-sqlite-vec/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"extends": "../../config/tsconfig.json",
"include": ["src", "../react-native-nitro-sqlite/src"],
"include": ["src"],
"references": [{ "path": "../react-native-nitro-sqlite" }],
"compilerOptions": {
"rootDir": "src",
"paths": {
"react-native-nitro-sqlite": ["../react-native-nitro-sqlite/src"]
"react-native-nitro-sqlite": ["../react-native-nitro-sqlite/src/index.ts"]
}
}
}
5 changes: 4 additions & 1 deletion packages/react-native-nitro-sqlite/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"include": ["src"],
"compilerOptions": {
"rootDir": "src",
"outDir": "lib"
"outDir": ".tsbuild",
"emitDeclarationOnly": true,
"noEmit": false,
"tsBuildInfoFile": ".tsbuild/tsconfig.tsbuildinfo"
}
}
8 changes: 8 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"files": [],
"references": [
{ "path": "./packages/react-native-nitro-sqlite" },
{ "path": "./packages/react-native-nitro-sqlite-vec" },
{ "path": "./example" }
]
}
Loading