Skip to content
Open
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
2 changes: 1 addition & 1 deletion .clang-format-ignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
package/cpp/sqlite/*
packages/react-native-nitro-sqlite/cpp/sqlite/*
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ updates:

- package-ecosystem: 'gradle'
directories:
- '/package/android/'
- '/packages/react-native-nitro-sqlite/android/'
- '/example/android/'
schedule:
interval: 'daily'
Expand All @@ -20,7 +20,7 @@ updates:

- package-ecosystem: 'npm'
directories:
- '/package/'
- '/packages/react-native-nitro-sqlite/'
- '/example/'
schedule:
interval: 'daily'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
- "example/android/**"
- "**/nitrogen/generated/shared/**"
- "**/nitrogen/generated/android/**"
- "package/cpp/**"
- "package/android/**"
- "packages/react-native-nitro-sqlite/cpp/**"
- "packages/react-native-nitro-sqlite/android/**"
- "**/bun.lock"
- "**/react-native.config.js"
- "**/nitro.json"
Expand All @@ -20,8 +20,8 @@ on:
- "example/android/**"
- "**/nitrogen/generated/shared/**"
- "**/nitrogen/generated/android/**"
- "package/cpp/**"
- "package/android/**"
- "packages/react-native-nitro-sqlite/cpp/**"
- "packages/react-native-nitro-sqlite/android/**"
- "**/bun.lock"
- "**/react-native.config.js"
- "**/nitro.json"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
- "example/ios/**"
- "**/nitrogen/generated/shared/**"
- "**/nitrogen/generated/ios/**"
- "package/cpp/**"
- "package/ios/**"
- "packages/react-native-nitro-sqlite/cpp/**"
- "packages/react-native-nitro-sqlite/ios/**"
- "**/Podfile.lock"
- "**/*.podspec"
- "**/react-native.config.js"
Expand All @@ -21,8 +21,8 @@ on:
- "example/ios/**"
- "**/nitrogen/generated/shared/**"
- "**/nitrogen/generated/ios/**"
- "package/cpp/**"
- "package/ios/**"
- "packages/react-native-nitro-sqlite/cpp/**"
- "packages/react-native-nitro-sqlite/ios/**"
- "**/Podfile.lock"
- "**/*.podspec"
- "**/react-native.config.js"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-typescript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
working-directory: example
run: bun lint
- name: Run ESLint with auto-fix in react-native-nitro-sqlite
working-directory: package
working-directory: packages/react-native-nitro-sqlite
run: bun lint

- name: Verify no files have changed after auto-fix
Expand Down
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*.md
*.markdown

package/lib
packages/react-native-nitro-sqlite/lib

.well-known
android
Expand Down
4 changes: 2 additions & 2 deletions bun.lock

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

8 changes: 6 additions & 2 deletions example/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const path = require('path')
const pak = require('../package/package.json')
const pak = require('../packages/react-native-nitro-sqlite/package.json')

module.exports = {
presets: ['module:@react-native/babel-preset'],
Expand All @@ -9,7 +9,11 @@ module.exports = {
{
extensions: ['.tsx', '.ts', '.js', '.json'],
alias: {
[pak.name]: path.join(__dirname, '../package', pak.source),
[pak.name]: path.join(
__dirname,
'../packages/react-native-nitro-sqlite',
pak.source,
),
'stream': 'stream-browserify',
'react-native-sqlite-storage': 'react-native-nitro-sqlite',
},
Expand Down
4 changes: 2 additions & 2 deletions example/react-native.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
const path = require('path')
const pak = require('../package/package.json')
const pak = require('../packages/react-native-nitro-sqlite/package.json')

module.exports = {
dependencies: {
[pak.name]: {
root: path.join(__dirname, '../package'),
root: path.join(__dirname, '../packages/react-native-nitro-sqlite'),
},
},
}
2 changes: 1 addition & 1 deletion example/src/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 '../../../package/src/DatabaseQueue'
} from '../../../packages/react-native-nitro-sqlite/src/DatabaseQueue'

const chance = new Chance()

Expand Down
4 changes: 2 additions & 2 deletions example/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"extends": "../config/tsconfig.json",
"include": ["src", "index.js", "../package"],
"include": ["src", "index.js", "../packages/react-native-nitro-sqlite"],
"compilerOptions": {
"baseUrl": ".",
"paths": {
"react-native-nitro-sqlite": ["../package/src"]
"react-native-nitro-sqlite": ["../packages/react-native-nitro-sqlite/src"]
}
}
}
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"packageManager": "bun@1.3.1",
"private": "true",
"workspaces": [
"package",
"packages/*",
"example"
],
"repository": {
Expand All @@ -23,9 +23,9 @@
"lint": "bun package lint && bun example lint",
"lint-cpp": "./scripts/clang-format.sh",
"prettier": "prettier --write .",
"clean": "rm -rf **/tsconfig.tsbuildinfo node_modules package/node_module package/lib",
"clean": "rm -rf **/tsconfig.tsbuildinfo node_modules packages/react-native-nitro-sqlite/node_module packages/react-native-nitro-sqlite/lib",
"release": "./scripts/release.sh",
"package": "bun --cwd package",
"package": "bun --cwd packages/react-native-nitro-sqlite",
"example": "bun --cwd example"
},
"engines": {
Expand Down Expand Up @@ -90,7 +90,7 @@
"plugins": {
"@release-it/bumper": {
"in": {
"file": "package/package.json",
"file": "packages/react-native-nitro-sqlite/package.json",
"path": "version"
},
"out": [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
root: true,
extends: '../config/.eslintrc.js',
extends: '../../config/.eslintrc.js',
parserOptions: {
project: true,
tsconfigRootDir: __dirname,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
[
"typescript",
{
"tsc": "../node_modules/.bin/tsc",
"tsc": "../../node_modules/.bin/tsc",
"project": "tsconfig.build.json",
"esm": true
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../config/tsconfig.json",
"extends": "../../config/tsconfig.json",
"include": ["src/**/*.ts", "src/**/*.tsx"],
"compilerOptions": {
"rootDir": "src",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "../config/tsconfig.json",
"extends": "../../config/tsconfig.json",
"include": ["src"],
"compilerOptions": {
"rootDir": "src",
Expand Down
2 changes: 1 addition & 1 deletion scripts/clang-format.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

CPP_DIRS=(
"package/cpp"
"packages/react-native-nitro-sqlite/cpp"
)

if which clang-format >/dev/null; then
Expand Down
2 changes: 1 addition & 1 deletion scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ echo "Starting the release process..."
echo "Provided options: $@"

echo "Publishing react-native-nitro-sqlite to NPM"
cd package
cd packages/react-native-nitro-sqlite
bun release $@

echo "Creating a Git bump commit and GitHub release"
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"files": [],
"references": [
{ "path": "./package/tsconfig.json" },
{ "path": "./packages/react-native-nitro-sqlite/tsconfig.json" },
{ "path": "./example/tsconfig.json" }
]
}