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
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
version: 2

updates:
- package-ecosystem: "npm"
- package-ecosystem: "bun"
target-branch: "main"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "npm"
- package-ecosystem: "bun"
target-branch: "0.x"
directory: "/"
schedule:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ on:
- 'packages/react-native-quick-crypto/nitrogen/generated/android/**'
- 'packages/react-native-quick-crypto/nitrogen/generated/shared/**'
- 'example/android/**'
- 'bun.lockb'
- 'example/bun.lockb'
- 'bun.lock'
- 'example/bun.lock'
pull_request:
paths:
- '.github/workflows/build-android.yml'
- 'packages/react-native-quick-crypto/android/**'
- 'packages/react-native-quick-crypto/nitrogen/generated/android/**'
- 'packages/react-native-quick-crypto/nitrogen/generated/shared/**'
- 'example/android/**'
- 'bun.lockb'
- 'example/bun.lockb'
- 'bun.lock'
- 'example/bun.lock'

jobs:
build_android_example:
Expand All @@ -36,7 +36,7 @@ jobs:

- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.1.26
bun-version: 1.2.9

- name: Setup JDK
uses: actions/setup-java@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.1.26
bun-version: 1.2.9

- name: Bootstrap JS
run: |
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/update-lockfiles.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Update Lockfiles (bun.lockb + Podfile.lock)'
name: 'Update Lockfiles (Podfile.lock)'

on:
push:
Expand All @@ -17,7 +17,7 @@ permissions:

jobs:
update-lockfiles:
name: "Update lockfiles (bun.lockb + Podfile.lock)"
name: "Update lockfiles (Podfile.lock)"
if: github.actor == 'dependabot[bot]'
runs-on: macOS-latest
steps:
Expand All @@ -28,7 +28,7 @@ jobs:

- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.1.26
bun-version: 1.2.9

- name: Setup Ruby (bundle)
uses: ruby/setup-ruby@v1
Expand All @@ -39,7 +39,6 @@ jobs:

- run: |
bun install
git add bun.lockb

cd example
bundle install
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:

- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.1.26
bun-version: 1.2.9

- name: Setup JDK
uses: actions/setup-java@v4
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/validate-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,29 @@ on:
- main
paths:
- '.github/workflows/validate-js.yml'
- 'bun.lockb'
- 'bun.lock'
- 'packages/react-native-quick-crypto/src/**'
- 'packages/react-native-quick-crypto/*.json'
- 'packages/react-native-quick-crypto/*.*s'
- 'packages/react-native-quick-crypto/bun.lockb'
- 'packages/react-native-quick-crypto/bun.lock'
- 'example/src/**'
- 'example/*.json'
- 'example/*.*s'
- 'example/*.*sx'
- 'example/bun.lockb'
- 'example/bun.lock'
pull_request:
paths:
- '.github/workflows/validate-js.yml'
- 'bun.lockb'
- 'bun.lock'
- 'packages/react-native-quick-crypto/src/**'
- 'packages/react-native-quick-crypto/*.json'
- 'packages/react-native-quick-crypto/*.*s'
- 'packages/react-native-quick-crypto/bun.lockb'
- 'packages/react-native-quick-crypto/bun.lock'
- 'example/src/**'
- 'example/*.json'
- 'example/*.*s'
- 'example/*.*sx'
- 'example/bun.lockb'
- 'example/bun.lock'

jobs:
compile_js:
Expand All @@ -39,7 +39,7 @@ jobs:

- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.1.26
bun-version: 1.2.9

- name: Install reviewdog
uses: reviewdog/action-setup@v1
Expand All @@ -64,7 +64,7 @@ jobs:
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.1.26
bun-version: 1.2.9

- name: Bootstrap JS
run: |
Expand All @@ -83,4 +83,4 @@ jobs:
bun format:fix

- name: Verify no files have changed after auto-fix
run: git diff --exit-code HEAD -- . ':(exclude)bun.lockb'
run: git diff --exit-code HEAD -- . ':(exclude)bun.lock'
7 changes: 7 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"arrowParens": "avoid",
"bracketSameLine": true,
"bracketSpacing": true,
"singleQuote": true,
"trailingComma": "all"
}
712 changes: 339 additions & 373 deletions bun.lock

Large diffs are not rendered by default.

52 changes: 52 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import js from '@eslint/js';
import typescriptEslint from 'typescript-eslint';

// Import prettier plugin and config directly
import eslintPluginPrettier from 'eslint-plugin-prettier';
import eslintConfigPrettier from 'eslint-config-prettier';

// This is a root-level ESLint config that primarily serves to:
// 1. Enable ESLint to find a config at the root level
// 2. Provide basic linting for files outside workspaces
// 3. Delegate to workspace-specific configs for workspace files

// Create a simplified config array
export default [
// Base JS config
js.configs.recommended,

// TypeScript config
...typescriptEslint.configs.recommended,
{
languageOptions: {
parser: typescriptEslint.parser,
parserOptions: {
projectService: true,
},
},
plugins: {
'@typescript-eslint': typescriptEslint.plugin,
},
},

// Prettier integration
{
plugins: {
prettier: eslintPluginPrettier,
},
rules: {
'prettier/prettier': 'error',
},
},
eslintConfigPrettier,
// Ignore workspace-specific config files and node_modules
{
ignores: [
'**/node_modules/**',
'example/**',
'packages/**',
'.vscode/**',
'*.config.js',
],
},
];
42 changes: 29 additions & 13 deletions example/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,40 @@ import js from '@eslint/js';
import eslintReactNative from 'eslint-plugin-react-native';
import typescriptEslint from 'typescript-eslint';

export default typescriptEslint.config(
import eslintPluginPrettier from 'eslint-plugin-prettier';
import eslintConfigPrettier from 'eslint-config-prettier';

// Create a simplified config array
export default [
// Base JS config
js.configs.recommended,

// TypeScript config
...typescriptEslint.configs.recommended,
{
plugins: {
'@typescript-eslint': typescriptEslint.plugin,
},
languageOptions: {
parser: '@typescript-eslint/parser',
parser: typescriptEslint.parser,
parserOptions: {
// project: './tsconfig.json',
projectService: true,
},
},
rules: {},
plugins: {
'@typescript-eslint': typescriptEslint.plugin,
},
},
js.configs.recommended,
...typescriptEslint.configs.recommended,
// react-native

// Prettier integration
{
plugins: {
prettier: eslintPluginPrettier,
},
rules: {
'prettier/prettier': 'error',
},
},
eslintConfigPrettier,
// React Native config
{
name: 'eslint-plugin-react-native',
plugins: {
'react-native': fixupPluginRules({
rules: eslintReactNative.rules,
Expand All @@ -33,8 +48,9 @@ export default typescriptEslint.config(
'react-native/no-inline-styles': 'warn',
},
},
// don't lint config files

// Ignore patterns
{
ignores: ['*.config.*js'],
},
);
];
15 changes: 6 additions & 9 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@
"@babel/plugin-transform-class-static-block": "7.26.0",
"@babel/preset-env": "7.26.0",
"@babel/runtime": "7.25.0",
"@eslint/compat": "^1.1.1",
"@eslint/js": "^9.18.0",

"@react-native-community/cli": "15.0.0",
"@react-native-community/cli-platform-android": "15.0.0",
"@react-native-community/cli-platform-ios": "15.0.0",
Expand All @@ -64,15 +63,13 @@
"@types/react": "18.3.3",
"@types/react-native-vector-icons": "^6.4.18",
"@types/react-test-renderer": "18.3.0",
"@typescript-eslint/parser": "^8.0.1",

"babel-jest": "29.7.0",
"babel-plugin-module-resolver": "5.0.2",
"eslint": "^9.9.0",
"eslint-plugin-react-native": "^4.1.0",
"jest": "29.7.0",
"prettier": "3.3.3",
"typescript": "5.0.4",
"typescript-eslint": "^8.0.1"


"jest": "29.7.0"

},
"engines": {
"node": ">=18"
Expand Down
18 changes: 15 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"version": "1.0.0-beta.13",
"type": "module",
"scripts": {
"clang-format": "./scripts/clang-format.sh",
"clean": "bun --filter='*' clean",
Expand All @@ -17,9 +18,20 @@
"release": "./scripts/release.sh"
},
"devDependencies": {
"@release-it/bumper": "^6.0.1",
"@release-it/conventional-changelog": "^9.0.3",
"release-it": "^17.10.0"
"@release-it/bumper": "7.0.2",
"@release-it/conventional-changelog": "10.0.0",
"release-it": "18.1.2",
"eslint": "9.24.0",
"@typescript-eslint/parser": "8.30.1",
"@typescript-eslint/eslint-plugin": "8.30.1",
"eslint-plugin-react-native": "^4.0.0",
"prettier": "3.5.3",
"@eslint/js": "9.24.0",
"@eslint/compat": "1.2.8",
"typescript": "5.8.3",
"typescript-eslint": "8.30.1",
"eslint-plugin-prettier": "5.2.6",
"eslint-config-prettier": "10.1.2"
},
"packageManager": "bun@1.2.0",
"release-it": {
Expand Down
Loading
Loading