Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
6a195bc
fix: `typeorm` missing in `bun.lockb`
chrispader Nov 3, 2025
1a6af09
chore: add npm `prepare` script
chrispader Nov 3, 2025
9f91898
Update bun.lockb
chrispader Nov 3, 2025
0477ec8
Update bun.lockb
chrispader Nov 3, 2025
81e9748
chore: build package on `prepublishOnly`
chrispader Nov 3, 2025
24d7d26
chore: add `typeorm` dependency top-level
chrispader Nov 3, 2025
b0e1233
fix: eslint jest error in CI
chrispader Nov 3, 2025
f1afddb
chore: use prettier in VS Code
chrispader Nov 3, 2025
f7943cb
fix: typescript-eslint setup
chrispader Nov 3, 2025
908cd60
fix: add back prettier/recommended eslint config
chrispader Nov 3, 2025
6a3f4c9
chore: add `eslint-plugin-eslint-comments`
chrispader Nov 3, 2025
6cbf842
chore: add `eslint-plugin-react`
chrispader Nov 3, 2025
a7da636
chore: add `eslint-plugin-react-hooks`
chrispader Nov 3, 2025
8a1db20
chore: add `eslint-plugin-react-native`
chrispader Nov 3, 2025
613b279
chore: add `@react-native/eslint-plugin`
chrispader Nov 3, 2025
437bbeb
revert package changes
chrispader Nov 3, 2025
af236a0
Update bun.lockb
chrispader Nov 3, 2025
77b9273
revert: eslint changes
chrispader Nov 3, 2025
c118bee
Update lint-typescript.yml
chrispader Nov 3, 2025
710e75a
chore: remove lint-ci script
chrispader Nov 3, 2025
dc7e3cf
update ci deps
chrispader Nov 3, 2025
602258f
chore: update jest
chrispader Nov 3, 2025
ba3a04b
chore: add `eslint-plugin-jest`
chrispader Nov 3, 2025
4d73620
Revert "chore: add `eslint-plugin-jest`"
chrispader Nov 3, 2025
aba9508
Update lint-typescript.yml
chrispader Nov 3, 2025
c5ac13b
Revert "Update lint-typescript.yml"
chrispader Nov 3, 2025
0ef24ba
chore: update deps
chrispader Nov 3, 2025
0d43d3e
chore: fix bun dependencies
chrispader Nov 3, 2025
ef53dd0
fix: eslint errors
chrispader Nov 3, 2025
e068882
chore: set strict typeorm version
chrispader Nov 3, 2025
48f4454
chore: rename typecheck script
chrispader Nov 3, 2025
9caa59e
fix: typescript errors
chrispader Nov 3, 2025
fd8e262
Update lint-typescript.yml
chrispader Nov 3, 2025
fe09726
chore: update TS setup
chrispader Nov 3, 2025
504c800
Update .gitattributes
chrispader Nov 3, 2025
48a827b
Create bunfig.toml
chrispader Nov 3, 2025
2acf371
chore: split up tsc workflow check
chrispader Nov 3, 2025
d7072d0
revert: TS changes
chrispader Nov 3, 2025
30bae9d
chore: fix typeorm version
chrispader Nov 3, 2025
790e04f
Update package.json
chrispader Nov 3, 2025
e66e9d2
Update package.json
chrispader Nov 3, 2025
7e1c24b
Update bunfig.toml
chrispader Nov 3, 2025
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: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
*.pbxproj -text
# specific for windows script files
*.bat text eol=crlf
.lockb binary diff=lockb
26 changes: 13 additions & 13 deletions .github/workflows/lint-typescript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,38 +36,38 @@ jobs:
name: Compile TypeScript (tsc)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: oven-sh/setup-bun@v2
- uses: reviewdog/action-setup@v1

- name: Install npm dependencies (bun)
run: bun install

- name: Run TypeScript (tsc)
- name: Run TypeScript (tsc) in example
working-directory: example
run: |
bun typecheck | reviewdog -name="tsc" -efm="%f(%l,%c): error TS%n: %m" -reporter="github-pr-review" -filter-mode="nofilter" -fail-level=any -tee
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Run TypeScript (tsc) in react-native-nitro-sqlite
working-directory: package
run: |
bun typescript | reviewdog -name="tsc" -efm="%f(%l,%c): error TS%n: %m" -reporter="github-pr-review" -filter-mode="nofilter" -fail-on-error -tee
bun typecheck | reviewdog -name="tsc" -efm="%f(%l,%c): error TS%n: %m" -reporter="github-pr-review" -filter-mode="nofilter" -fail-level=any -tee
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}

lint:
name: Lint TypeScript (eslint, prettier)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- uses: oven-sh/setup-bun@v2
- uses: reviewdog/action-setup@v1

- name: Install npm dependencies (bun)
run: bun install

- name: Run ESLint CI in example/
working-directory: example
run: bun lint-ci
- name: Run ESLint CI in react-native-nitro-sqlite
working-directory: package
run: bun lint-ci

- name: Run ESLint with auto-fix in example/
- name: Run ESLint with auto-fix in example
working-directory: example
run: bun lint
- name: Run ESLint with auto-fix in react-native-nitro-sqlite
Expand Down
8 changes: 4 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"[javascript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascriptreact]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
3,362 changes: 3,362 additions & 0 deletions bun.lock

Large diffs are not rendered by default.

Binary file removed bun.lockb
Binary file not shown.
4 changes: 4 additions & 0 deletions bunfig.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[install]
# Opt out from isolated installs
linker = "hoisted"
linkWorkspacePackages = true
11 changes: 5 additions & 6 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
"ios": "react-native run-ios",
"bundle-install": "bundle install",
"pods": "cd ios && bundle exec pod install",
"typescript": "tsc --noEmit",
"typecheck": "tsc --noEmit",
"lint": "eslint \"**/*.{js,ts,tsx}\" --fix",
"lint-ci": "eslint \"**/*.{js,ts,tsx}\" -f @jamesacarr/github-actions",
"codegen": "bun react-native codegen"
},
"dependencies": {
Expand All @@ -24,24 +23,24 @@
"react": "19.0.0",
"react-native": "0.78.0",
"react-native-nitro-modules": "0.27.2",
"react-native-nitro-sqlite": "9.1.11",
"react-native-nitro-sqlite": "workspace:*",
"react-native-safe-area-context": "^5.2.0",
"react-native-screens": "^4.9.1",
"reflect-metadata": "^0.1.13",
"stream-browserify": "^3.0.0",
"typeorm": "^0.3.20",
"typeorm": "0.3.20",
"util": "^0.12.5"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/core": "^7.28.5",
"@babel/plugin-proposal-decorators": "^7.20.5",
"@babel/preset-env": "^7.25.4",
"@babel/runtime": "^7.25.4",
"@react-native-community/cli": "15.0.1",
"@react-native-community/cli-platform-android": "15.0.1",
"@react-native-community/cli-platform-ios": "15.0.1",
"@react-native/babel-preset": "0.78.0",
"@react-native/eslint-config": "0.78.0",
"@react-native/eslint-config": "0.82.1",
"@react-native/metro-config": "0.78.0",
"@react-native/typescript-config": "0.78.0",
"@types/chai": "^4.3.4",
Expand Down
2 changes: 1 addition & 1 deletion example/src/Database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export async function executeFailingTypeORMQuery(): Promise<QueryResult | void>
SELECT * From UnexistingTable
`)) as QueryResult
return manualQuery
} catch (e) {
} catch {
console.warn('should have cached')
}
}
8 changes: 4 additions & 4 deletions example/src/initGlobals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { Buffer as CraftzdogBuffer } from '@craftzdog/react-native-buffer'

declare global {
var Buffer: typeof CraftzdogBuffer
}

var process: {
cwd: () => string
env: { NODE_ENV: string }
}
if (!globalThis.process) {
// @ts-expect-error
globalThis.process = {}
}

globalThis.Buffer = CraftzdogBuffer
Expand Down
2 changes: 1 addition & 1 deletion example/src/tests/unitTests.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ export function registerUnitTests() {
'INSERT INTO "User" (id, name, age, networth) VALUES(?, ?, ?, ?)',
[id, name, age, networth]
)
} catch (e) {
} catch {
tx.rollback()
}
})
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"homepage": "https://github.com/margelo/react-native-nitro-sqlite#readme",
"scripts": {
"postinstall": "patch-package",
"typescript": "bun --filter=\"**\" typescript",
"typecheck": "bun --filter=\"**\" typecheck",
"lint": "bun package lint && bun example lint",
"lint-cpp": "./scripts/clang-format.sh",
"clean": "rm -rf **/tsconfig.tsbuildinfo node_modules package/node_module package/lib",
Expand All @@ -34,17 +34,16 @@
"react-native-nitro-modules": "0.27.2"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/core": "^7.28.5",
"@babel/plugin-proposal-decorators": "^7.20.5",
"@babel/preset-env": "^7.25.4",
"@babel/runtime": "^7.25.4",
"@eslint/js": "^9.10.0",
"@jamesacarr/eslint-formatter-github-actions": "^0.2.0",
"@react-native-community/cli": "15.0.1",
"@react-native-community/cli-platform-android": "15.0.1",
"@react-native-community/cli-platform-ios": "15.0.1",
"@react-native/babel-preset": "0.78.0",
"@react-native/eslint-config": "0.78.0",
"@react-native/eslint-config": "0.82.1",
"@react-native/metro-config": "0.78.0",
"@react-native/typescript-config": "0.78.0",
"@release-it/bumper": "^6.0.1",
Expand All @@ -58,10 +57,11 @@
"eslint": "8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"jest": "^29.7.0",
"jest": "^30.2.0",
"nitro-codegen": "0.27.2",
"prettier": "^3.3.3",
"release-it": "^17.10.0",
"typeorm": "0.3.20",
"typescript": "~5.5.4",
"typescript-eslint": "^8.13.0"
},
Expand Down
11 changes: 5 additions & 6 deletions package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,13 @@
"!**/__mocks__"
],
"scripts": {
"postinstall": "bun build || exit 0;",
"build": "bun typescript && bob build",
"specs": "bun typescript && bun nitro-codegen --logLevel=\"debug\"",
"typescript": "tsc --noEmit",
"typecheck": "tsc --noEmit",
"lint": "eslint \"**/*.{js,ts,tsx}\" --fix",
"lint-ci": "eslint \"**/*.{js,ts,tsx}\" -f @jamesacarr/github-actions",
"test": "jest",
"release": "release-it"
"release": "release-it",
"prepublishOnly": "bun run build"
},
"keywords": [
"react-native",
Expand All @@ -66,10 +65,10 @@
"registry": "https://registry.npmjs.org/"
},
"dependencies": {
"typeorm": "^0.3.20"
"typeorm": "0.3.20"
},
"devDependencies": {
"jest": "^29.7.0",
"jest": "^30.2.0",
"nitro-codegen": "0.27.2",
"react": "19.0.0",
"react-native": "0.78.0",
Expand Down
Loading