Skip to content
Draft
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
5 changes: 2 additions & 3 deletions .eslint.ronasit.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const eslint = require('@eslint/js');

module.exports = [
{
ignores: ['**/node_modules', '**/*.js', 'apps/*/app.config.ts', 'src/lib/nx-generators.ts'],
ignores: ['**/node_modules', '**/*.js', 'apps/*/app.config.ts'],
},
eslint.configs.recommended,
...tseslint.configs.recommended,
Expand Down Expand Up @@ -96,7 +96,7 @@ module.exports = [
'@stylistic/brace-style': ['warn', '1tbs'],
'@stylistic/comma-spacing': ['warn', { before: false, after: true }],
'@stylistic/eol-last': ['warn', 'always'],
'@stylistic/func-call-spacing': ['warn', 'never'],
'@stylistic/function-call-spacing': ['warn', 'never'],
'@stylistic/key-spacing': ['warn', { beforeColon: false, afterColon: true }],
'@stylistic/keyword-spacing': ['warn', { before: true, after: true }],
'@stylistic/no-whitespace-before-property': 'warn',
Expand All @@ -107,7 +107,6 @@ module.exports = [
'@stylistic/type-annotation-spacing': 'warn',
'@stylistic/jsx-equals-spacing': ['warn', 'never'],
'@stylistic/jsx-indent-props': ['warn', 2],
'@stylistic/jsx-props-no-multi-spaces': 'warn',
'@stylistic/type-named-tuple-spacing': 'warn',
'no-var': 'warn',
'no-dupe-class-members': 'off',
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,9 @@ cache/

# Generated files for npm publishing
src/lib/README.md

.nx/migrate-runs
.claude/worktrees
.claude/settings.local.json
.nx/polygraph
.nx/self-healing
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node-linker=hoisted
min-release-age=3
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
/dist
/coverage
/.nx/cache
/.nx/workspace-data
/.nx/workspace-data
.nx/self-healing
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,22 @@ const handlePickImage = async (source: ImagePickerSource) => {
};
```

> **_NOTE:_** Since Expo SDK 56 the global `fetch` on iOS and Android is `expo/fetch`, which may not support the `{ uri, type, name }` file parts created by `getFormData`. If the upload fails, send the form data with `XMLHttpRequest` (e.g. axios) or switch the global `fetch` back to the React Native implementation with `EXPO_PUBLIC_USE_RN_FETCH=1`.

#### 3. WebSocket

> **_NOTE:_** Required dependencies: `@pusher/pusher-websocket-react-native`, `pusher-js`

> **_NOTE:_** On Android, a release build with code shrinking enabled (the default in the Expo SDK 58 template) fails in R8 with `Missing class org.slf4j.impl.StaticLoggerBinder`, which comes from `@pusher/pusher-websocket-react-native` (via `pusher-java-client` → `Java-WebSocket` → `slf4j`). To fix it, add the `-dontwarn org.slf4j.impl.StaticLoggerBinder` rule, e.g. with `expo-build-properties` in your app config:
>
> ```ts
> plugins: [
> ['expo-build-properties', {
> android: { extraProguardRules: '-dontwarn org.slf4j.impl.StaticLoggerBinder' },
> }],
> ],
> ```

`WebSocketService` manages WebSocket connections using [Pusher](https://pusher.com/) and can work in both web and mobile applications.
Doesn't support Expo Go.

Expand Down
16 changes: 7 additions & 9 deletions apps/example/app.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ExpoConfig } from '@expo/config';
import { EASConfig } from 'expo-constants/build/Constants.types';
import type { ExpoConfig } from 'expo/config';

type EASConfig = { projectId?: string };

const createConfig = (): Omit<ExpoConfig, 'extra'> & { extra: { eas: EASConfig } & typeof extra } => {
const projectId = '';
Expand All @@ -15,14 +16,8 @@ const createConfig = (): Omit<ExpoConfig, 'extra'> & { extra: { eas: EASConfig }
slug: 'example-app',
scheme: 'example-dev',
version: '0.1.0',
newArchEnabled: true,
orientation: 'portrait',
icon: './assets/icon.png',
splash: {
image: './assets/splash.png',
resizeMode: 'contain',
backgroundColor: '#ffffff',
},
updates: {
url: `https://u.expo.dev/${projectId}`,
},
Expand All @@ -42,7 +37,10 @@ const createConfig = (): Omit<ExpoConfig, 'extra'> & { extra: { eas: EASConfig }
backgroundColor: '#FFFFFF',
},
},
plugins: ['expo-router'],
plugins: [
'expo-router',
['expo-splash-screen', { image: './assets/splash.png', resizeMode: 'contain', backgroundColor: '#ffffff' }],
],
extra,
};
};
Expand Down
20 changes: 0 additions & 20 deletions apps/example/jest.config.ts

This file was deleted.

6 changes: 3 additions & 3 deletions apps/example/metro.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const path = require('path');
const { getDefaultConfig } = require('@expo/metro-config');
const { getDefaultConfig } = require('expo/metro-config');
const { withNxMetro } = require('@nx/expo');
const { mergeConfig } = require('metro-config');
const { mergeConfig } = require('@expo/metro/metro-config');

const appRoot = __dirname;
const monorepoRoot = path.resolve(appRoot, '../..');
Expand All @@ -11,7 +11,7 @@ const { assetExts, sourceExts } = defaultConfig.resolver;
* Metro configuration
* https://facebook.github.io/metro/docs/configuration
*
* @type {import('metro-config').MetroConfig}
* @type {import('@expo/metro/metro-config').MetroConfig}
*/
const customConfig = {
transformer: {
Expand Down
51 changes: 26 additions & 25 deletions apps/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,39 @@
"version": "0.0.1",
"private": true,
"dependencies": {
"@expo/metro-config": "~54.0.2",
"@expo/metro-runtime": "~6.1.2",
"@reduxjs/toolkit": "^2.9.0",
"expo": "^54.0.0",
"expo-constants": "~18.0.9",
"expo-image-picker": "~17.0.8",
"expo-linking": "~8.0.8",
"expo-localization": "~17.0.7",
"expo-notifications": "~0.32.12",
"expo-router": "~6.0.12",
"expo-splash-screen": "~31.0.10",
"expo-status-bar": "~3.0.8",
"expo-updates": "~29.0.12",
"i18n-js": "~4.5.1",
"lodash-es": "^4.17.21",
"react": "19.1.0",
"react-dom": "19.1.0",
"react-native": "0.81.4",
"react-native-safe-area-context": "~5.6.0",
"react-native-screens": "~4.16.0",
"react-native-svg": "15.12.1",
"react-native-svg-transformer": "1.5.1",
"tslib": "^2.8.1"
"@expo/metro": "~58.0.0",
"@expo/metro-runtime": "~58.0.17",
"@reduxjs/toolkit": "^2.15.0",
"expo": "~58.0.26",
"expo-constants": "~58.0.16",
"expo-image-picker": "~58.0.10",
"expo-linking": "~58.0.17",
"expo-localization": "~58.0.5",
"expo-notifications": "~58.1.9",
"expo-router": "~58.0.32",
"expo-splash-screen": "~58.0.14",
"expo-status-bar": "~58.0.5",
"expo-system-ui": "~58.0.7",
"expo-updates": "~58.0.22",
"i18n-js": "~4.5.4",
"lodash-es": "^4.18.1",
"react": "19.3.0",
"react-dom": "19.3.0",
"react-native": "0.88.1",
"react-native-safe-area-context": "~5.11.1",
"react-native-screens": "~4.30.1",
"react-native-svg": "15.16.0",
"react-native-svg-transformer": "1.5.3",
"tslib": "^2.9.1"
},
"scripts": {
"start": "npx expo start",
"start:prod": "cross-env APP_ENV=production npx expo start",
"build:dev": "eas build --no-wait -p all --profile=development",
"build:debug": "npm run build:dev -- --profile=debug",
"build:prod": "npm run build:dev -- --profile=production",
"update:dev": "cross-env APP_ENV=development eas update --branch development",
"update:prod": "cross-env APP_ENV=production eas update --branch production",
"update:dev": "cross-env APP_ENV=development eas update --branch development --environment development",
"update:prod": "cross-env APP_ENV=production eas update --branch production --environment production",
"submit:ios:dev": "cross-env APP_ENV=development eas submit --no-wait -p ios --profile=development",
"submit:ios:prod": "cross-env APP_ENV=production eas submit --no-wait -p ios --profile=production",
"eas-build-post-install": "cd ../../ && node tools/scripts/eas-build-post-install.mjs . apps/example",
Expand Down
5 changes: 1 addition & 4 deletions apps/example/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"allowSyntheticDefaultImports": true,
"jsx": "react-native",
"lib": ["dom", "esnext"],
"moduleResolution": "node",
"moduleResolution": "bundler",
"skipLibCheck": true,
"resolveJsonModule": true,
"strict": true,
Expand All @@ -15,9 +15,6 @@
"references": [
{
"path": "./tsconfig.app.json"
},
{
"path": "./tsconfig.spec.json"
}
]
}
21 changes: 0 additions & 21 deletions apps/example/tsconfig.spec.json

This file was deleted.

2 changes: 1 addition & 1 deletion eslint.base.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const compat = new FlatCompat({

module.exports = [
{
ignores: ['**/node_modules', '**/*.js', 'apps/*/app.config.ts', 'src/lib/nx-generators.ts'],
ignores: ['**/node_modules', '**/*.js', 'apps/*/app.config.ts'],
},
{
plugins: {
Expand Down
11 changes: 1 addition & 10 deletions eslint.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,7 @@ const constraints = require('./eslint.constraints.json');

module.exports = [
{
ignores: [
'**/node_modules',
'**/dist',
'**/*.js',
'**/*.cjs',
'**/*.mjs',
'apps/*/app.config.ts',
'src/lib/nx-generators.ts',
],
ignores: ['**/node_modules', '**/dist', '**/*.js', '**/*.cjs', '**/*.mjs', 'apps/*/app.config.ts'],
},
...baseConfig,
...ronasitConfig,
Expand All @@ -36,7 +28,6 @@ module.exports = [
'@stylistic/array-bracket-newline': 'off',
'@stylistic/implicit-arrow-linebreak': 'off',
'@stylistic/indent': 'off',
'@stylistic/jsx-indent': 'off',
'@stylistic/indent-binary-ops': 'off',
'@stylistic/newline-per-chained-call': 'off',
'@stylistic/function-paren-newline': 'off',
Expand Down
40 changes: 2 additions & 38 deletions eslint.constraints.json
Original file line number Diff line number Diff line change
@@ -1,42 +1,6 @@
[
{
"sourceTag": "app:shared",
"onlyDependOnLibsWithTags": ["app:shared"]
},
{
"sourceTag": "scope:shared",
"onlyDependOnLibsWithTags": ["scope:*"]
},
{
"sourceTag": "type:app",
"onlyDependOnLibsWithTags": ["type:features", "type:ui", "type:utils", "type:data-access"]
},
{
"sourceTag": "type:utils",
"onlyDependOnLibsWithTags": ["type:utils"]
},
{
"sourceTag": "type:data-access",
"onlyDependOnLibsWithTags": ["type:data-access", "type:utils"]
},
{
"sourceTag": "type:features",
"onlyDependOnLibsWithTags": ["type:features", "type:data-access", "type:ui", "type:utils"]
},
{
"sourceTag": "type:ui",
"onlyDependOnLibsWithTags": ["type:ui", "type:utils"]
},
{
"sourceTag": "app:mobile",
"onlyDependOnLibsWithTags": ["app:mobile", "app:shared"]
},
{
"sourceTag": "scope:auth",
"onlyDependOnLibsWithTags": ["scope:auth", "scope:shared"]
},
{
"sourceTag": "scope:profile",
"onlyDependOnLibsWithTags": ["scope:profile", "scope:shared"]
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
}
]
5 changes: 0 additions & 5 deletions jest.config.ts

This file was deleted.

3 changes: 0 additions & 3 deletions jest.preset.js

This file was deleted.

5 changes: 4 additions & 1 deletion nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,8 @@
"targetName": "lint"
}
}
]
],
"affected": {
"legacy": true
}
}
Loading
Loading