Skip to content

Commit 665b8d4

Browse files
committed
Merge branch 'main' into chore/improve-prettier-config
2 parents 811587b + 8af36ea commit 665b8d4

File tree

11 files changed

+3397
-38
lines changed

11 files changed

+3397
-38
lines changed

.gitattributes

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
*.pbxproj -text
22
# specific for windows script files
33
*.bat text eol=crlf
4-
.lockb binary diff=lockb

.github/workflows/lint-typescript.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,38 +36,38 @@ jobs:
3636
name: Compile TypeScript (tsc)
3737
runs-on: ubuntu-latest
3838
steps:
39-
- uses: actions/checkout@v4
39+
- uses: actions/checkout@v5
4040
- uses: oven-sh/setup-bun@v2
4141
- uses: reviewdog/action-setup@v1
4242

4343
- name: Install npm dependencies (bun)
4444
run: bun install
4545

46-
- name: Run TypeScript (tsc)
46+
- name: Run TypeScript (tsc) in example
47+
working-directory: example
48+
run: |
49+
bun typecheck | reviewdog -name="tsc" -efm="%f(%l,%c): error TS%n: %m" -reporter="github-pr-review" -filter-mode="nofilter" -fail-level=any -tee
50+
env:
51+
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
53+
- name: Run TypeScript (tsc) in react-native-nitro-sqlite
54+
working-directory: package
4755
run: |
48-
bun typescript | reviewdog -name="tsc" -efm="%f(%l,%c): error TS%n: %m" -reporter="github-pr-review" -filter-mode="nofilter" -fail-on-error -tee
56+
bun typecheck | reviewdog -name="tsc" -efm="%f(%l,%c): error TS%n: %m" -reporter="github-pr-review" -filter-mode="nofilter" -fail-level=any -tee
4957
env:
5058
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5159

5260
lint:
5361
name: Lint TypeScript (eslint, prettier)
5462
runs-on: ubuntu-latest
5563
steps:
56-
- uses: actions/checkout@v4
64+
- uses: actions/checkout@v5
5765
- uses: oven-sh/setup-bun@v2
58-
- uses: reviewdog/action-setup@v1
5966

6067
- name: Install npm dependencies (bun)
6168
run: bun install
6269

63-
- name: Run ESLint CI in example/
64-
working-directory: example
65-
run: bun lint-ci
66-
- name: Run ESLint CI in react-native-nitro-sqlite
67-
working-directory: package
68-
run: bun lint-ci
69-
70-
- name: Run ESLint with auto-fix in example/
70+
- name: Run ESLint with auto-fix in example
7171
working-directory: example
7272
run: bun lint
7373
- name: Run ESLint with auto-fix in react-native-nitro-sqlite

bun.lock

Lines changed: 3362 additions & 0 deletions
Large diffs are not rendered by default.

bun.lockb

-545 KB
Binary file not shown.

bunfig.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[install]
2+
# Opt out from isolated installs
3+
linker = "hoisted"
4+
linkWorkspacePackages = true

example/package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@
88
"ios": "react-native run-ios",
99
"bundle-install": "bundle install",
1010
"pods": "cd ios && bundle exec pod install",
11-
"typescript": "tsc --noEmit",
11+
"typecheck": "tsc --noEmit",
1212
"lint": "eslint \"**/*.{js,ts,tsx}\" --fix",
13-
"lint-ci": "eslint \"**/*.{js,ts,tsx}\" -f @jamesacarr/github-actions",
1413
"codegen": "bun react-native codegen"
1514
},
1615
"dependencies": {
@@ -29,19 +28,19 @@
2928
"react-native-screens": "^4.9.1",
3029
"reflect-metadata": "^0.1.13",
3130
"stream-browserify": "^3.0.0",
32-
"typeorm": "^0.3.20",
31+
"typeorm": "0.3.20",
3332
"util": "^0.12.5"
3433
},
3534
"devDependencies": {
36-
"@babel/core": "^7.25.2",
35+
"@babel/core": "^7.28.5",
3736
"@babel/plugin-proposal-decorators": "^7.20.5",
3837
"@babel/preset-env": "^7.25.4",
3938
"@babel/runtime": "^7.25.4",
4039
"@react-native-community/cli": "15.0.1",
4140
"@react-native-community/cli-platform-android": "15.0.1",
4241
"@react-native-community/cli-platform-ios": "15.0.1",
4342
"@react-native/babel-preset": "0.78.0",
44-
"@react-native/eslint-config": "0.78.0",
43+
"@react-native/eslint-config": "0.82.1",
4544
"@react-native/metro-config": "0.78.0",
4645
"@react-native/typescript-config": "0.78.0",
4746
"@types/chai": "^4.3.4",

example/src/Database.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export async function executeFailingTypeORMQuery(): Promise<QueryResult | void>
5858
SELECT * From UnexistingTable
5959
`)) as QueryResult
6060
return manualQuery
61-
} catch (e) {
61+
} catch {
6262
console.warn('should have cached')
6363
}
6464
}

example/src/initGlobals.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import { Buffer as CraftzdogBuffer } from '@craftzdog/react-native-buffer'
22

33
declare global {
44
var Buffer: typeof CraftzdogBuffer
5+
}
56

6-
var process: {
7-
cwd: () => string
8-
env: { NODE_ENV: string }
9-
}
7+
if (!globalThis.process) {
8+
// @ts-expect-error
9+
globalThis.process = {}
1010
}
1111

1212
globalThis.Buffer = CraftzdogBuffer

example/src/tests/unitTests.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ export function registerUnitTests() {
350350
'INSERT INTO "User" (id, name, age, networth) VALUES(?, ?, ?, ?)',
351351
[id, name, age, networth]
352352
)
353-
} catch (e) {
353+
} catch {
354354
tx.rollback()
355355
}
356356
})

package.json

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"homepage": "https://github.com/margelo/react-native-nitro-sqlite#readme",
2020
"scripts": {
2121
"postinstall": "patch-package",
22-
"typescript": "bun --filter=\"**\" typescript",
22+
"typecheck": "bun --filter=\"**\" typecheck",
2323
"lint": "bun package lint && bun example lint",
2424
"lint-cpp": "./scripts/clang-format.sh",
2525
"prettier": "prettier --write .",
@@ -35,17 +35,16 @@
3535
"react-native-nitro-modules": "0.27.2"
3636
},
3737
"devDependencies": {
38-
"@babel/core": "^7.25.2",
38+
"@babel/core": "^7.28.5",
3939
"@babel/plugin-proposal-decorators": "^7.20.5",
4040
"@babel/preset-env": "^7.25.4",
4141
"@babel/runtime": "^7.25.4",
4242
"@eslint/js": "^9.10.0",
43-
"@jamesacarr/eslint-formatter-github-actions": "^0.2.0",
4443
"@react-native-community/cli": "15.0.1",
4544
"@react-native-community/cli-platform-android": "15.0.1",
4645
"@react-native-community/cli-platform-ios": "15.0.1",
4746
"@react-native/babel-preset": "0.78.0",
48-
"@react-native/eslint-config": "0.78.0",
47+
"@react-native/eslint-config": "0.82.1",
4948
"@react-native/metro-config": "0.78.0",
5049
"@react-native/typescript-config": "0.78.0",
5150
"@release-it/bumper": "^6.0.1",
@@ -54,19 +53,16 @@
5453
"@types/eslint__js": "^8.42.3",
5554
"@types/jest": "^29.5.13",
5655
"@types/react": "^19.0.0",
57-
"@typescript-eslint/eslint-plugin": "^8.46.3",
58-
"@typescript-eslint/parser": "^8.46.3",
5956
"babel-plugin-module-resolver": "^5.0.2",
6057
"babel-plugin-transform-typescript-metadata": "^0.3.2",
6158
"eslint": "8.57.0",
6259
"eslint-config-prettier": "^9.1.0",
63-
"eslint-plugin-jest": "^29.0.1",
6460
"eslint-plugin-prettier": "^5.2.1",
65-
"jest": "^29.7.0",
61+
"jest": "^30.2.0",
6662
"nitro-codegen": "0.27.2",
6763
"prettier": "^3.3.3",
6864
"release-it": "^17.10.0",
69-
"typeorm": "^0.3.20",
65+
"typeorm": "0.3.20",
7066
"typescript": "~5.5.4",
7167
"typescript-eslint": "^8.13.0"
7268
},

0 commit comments

Comments
 (0)