Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 12bc7c0
Author: BilligsterUser <[email protected]>
Date:   Mon Jan 22 17:33:59 2024 +0100

    update example.env and app.config

commit 932305f
Author: BilligsterUser <[email protected]>
Date:   Sat Jan 20 22:37:34 2024 +0100

    Update index.ts

commit af24d9e
Author: BilligsterUser <[email protected]>
Date:   Sat Jan 20 22:21:38 2024 +0100

    update scripts

commit 3c72997
Author: BilligsterUser <[email protected]>
Date:   Sat Jan 20 21:20:18 2024 +0100

    remove old file

commit 403a6c6
Author: BilligsterUser <[email protected]>
Date:   Sat Jan 20 20:39:49 2024 +0100

    Create .npmrc

commit 01254ff
Author: BilligsterUser <[email protected]>
Date:   Sat Jan 20 20:26:10 2024 +0100

    minor changes

commit 1836e7b
Author: BilligsterUser <[email protected]>
Date:   Sat Jan 20 19:07:10 2024 +0100

    update deps & clean up

commit f810b75
Author: BilligsterUser <[email protected]>
Date:   Sat Jan 20 18:40:35 2024 +0100

    update expo sdk to  version 50

commit 908146d
Author: BilligsterUser <[email protected]>
Date:   Sat Jan 20 18:30:17 2024 +0100

    switch to pnpm
  • Loading branch information
BilligsterUser committed Feb 14, 2024
1 parent 589d372 commit a95d109
Show file tree
Hide file tree
Showing 17 changed files with 11,027 additions and 370 deletions.
5 changes: 5 additions & 0 deletions .example.env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ SENTRY_PROJECT=
SENTRY_DSN=
SENTRY_AUTH_TOKEN=

EXPO_TOKEN=
EXPO_NO_TELEMETRY=1

NODE_ENV=development
NODE_ENV_SHORT=dev

APP_VARIANT=dev

DEBUG=dev
11 changes: 11 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# https://pnpm.io/npmrc#shamefully-hoist
shamefully-hoist=true # Default: false - Type: Boolean

# https://pnpm.io/npmrc#node-linker
# node-linker= # Default: isolated - type: isolated, hoisted, pnp

# https://pnpm.io/npmrc#package-import-method
# package-import-method= # Default: auto - Type: auto, hardlink, copy, clone, clone-or-copy

# https://pnpm.io/npmrc#symlink
# symlink= # Default: true - Type: Boolean
35 changes: 11 additions & 24 deletions config/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,15 @@ const config: ExpoConfig = {
'expo-localization',
['expo-barcode-scanner', { cameraPermission }],
['expo-camera', { cameraPermission }],
'sentry-expo',
'expo-updates'
[
'@sentry/react-native/expo',
{
organization: process?.env?.SENTRY_ORG, // || 'sentry org slug, or use the `SENTRY_ORG` environment variable',
project: process?.env?.SENTRY_PROJECT , // || 'sentry project name, or use the `SENTRY_PROJECT` environment variable',
dsn: process?.env?.SENTRY_DSN , // || 'sentry dsn, or use the `SENTRY_DSN` environment variable',
authToken: process?.env?.SENTRY_AUTH_TOKEN , // || 'sentry auth token, or use the `SENTRY_AUTH_TOKEN` environment variable',
}
]
],
ios: {
supportsTablet: false,
Expand All @@ -92,9 +99,6 @@ const config: ExpoConfig = {
},
package: `com.agron.enuts${!IS_PROD ? `.${_appVariant}` : ''}`
},
web: {
favicon: './assets/favicon.png'
},
extra: {
eas: { projectId: 'edb75ccd-71ac-4934-9147-baf1c7f2b068' },
DEBUG: process?.env?.DEBUG,
Expand All @@ -103,25 +107,8 @@ const config: ExpoConfig = {
NODE_ENV_SHORT: _nodeEnvShort,
SENTRY_DSN: process?.env?.SENTRY_DSN,
SENTRY_ORG: process?.env?.SENTRY_ORG,
SENTRY_PROJECT: process?.env?.SENTRY_PROJECT
},
hooks: {
postPublish: [
{
file: 'sentry-expo/upload-sourcemaps',
config: {
organization: process?.env?.SENTRY_ORG,
project: process?.env?.SENTRY_PROJECT
}
}
]
},
updates: {
enabled: false,
url: 'https://u.expo.dev/edb75ccd-71ac-4934-9147-baf1c7f2b068'
},
runtimeVersion: {
policy: 'sdkVersion'
SENTRY_PROJECT: process?.env?.SENTRY_PROJECT,
SENTRY_AUTH_TOKEN: process?.env?.SENTRY_AUTH_TOKEN
}
}

Expand Down
3 changes: 2 additions & 1 deletion config/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ export default (): JestConfigWithTsJest => ({
// moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
preset: 'jest-expo',
transformIgnorePatterns: [
'node_modules/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg)'
// eslint-disable-next-line no-useless-escape
'node_modules\/(.?pnpm)?\/(?!((jest-)?react-native|@react-native(-community)?)|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@unimodules/.*|unimodules|sentry-expo|native-base|react-native-svg)'
],

// moduleDirectories: ['<rootDir>/node_modules', '<rootDir>'],
Expand Down
10 changes: 6 additions & 4 deletions config/metro.config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
// Learn more https://docs.expo.io/guides/customizing-metro
// https://docs.expo.dev/guides/using-sentry/#update-metro-configuration

import { getDefaultConfig } from '@expo/metro-config'
// This replaces `const { getDefaultConfig } = require('expo/metro-config');`
import { getSentryExpoConfig } from '@sentry/react-native/metro'
import { readdirSync } from 'fs'
// import { mergeConfig } from 'metro-config'
import { join, resolve } from 'path'


const root = resolve(join(__dirname, '..', ''))
const assertDir = resolve(join(root, 'assets'))

export const config = getDefaultConfig(root)
// This replaces const config = getDefaultConfig(root)
export const config = getSentryExpoConfig(root)

const assetExts = [...new Set([
...config?.resolver?.assetExts ?? [],
Expand All @@ -19,4 +22,3 @@ const assetExts = [...new Set([
])]
if (config.resolver?.assetExts) { config.resolver.assetExts = assetExts }

// config mergeConfig(config, { resolver: { ...config.resolver, assetExts } })
108 changes: 52 additions & 56 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "A Cashu wallet for Android and iOS",
"author": "Agron Kadriaj <[email protected]> (https://agron.dev)",
"scripts": {
"s:debug:full": "npx -y cross-env@latest DEBUG=full expo start -c",
"s:debug:full": "pnpm dlx cross-env@latest DEBUG=full expo start -c",
"s:c": "expo start -c --go",
"start": "expo start --go",
"lint:eslint": "npx eslint ./src --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts,.json --fix",
Expand All @@ -27,95 +27,91 @@
"submit:ios": "npx -y eas-cli@latest submit -p ios",
"ios": "expo run:ios",
"web": "expo start --web",
"test": "npx jest -c ./config/jest.config.ts --passWithNoTests ",
"test:coverage": "npm run test -- --collectCoverage",
"test:dev": "npm run test -- --detectOpenHandles",
"cpd:ts": "npx -y jscpd -c config/cpd.config.ts.json src config",
"cpd:tsx": "npx -y jscpd -c config/cpd.config.tsx.json src",
"cpd": "npm run cpd:ts && npm run cpd:tsx",
"deps:c": "npx -y madge --circular --ts-config tsconfig.json --extensions ts,tsx .",
"eas-build-pre-install": "echo \"require('./src/App.ts')\" > index.js",
"test": "pnpm jest -c ./config/jest.config.ts --passWithNoTests ",
"test:coverage": "pnpm test -- --collectCoverage",
"test:dev": "pnpm test -- --detectOpenHandles",
"cpd:ts": "pnpm dlx jscpd -c config/cpd.config.ts.json src config",
"cpd:tsx": "pnpm dlx jscpd -c config/cpd.config.tsx.json src",
"cpd": "pnpm cpd:ts && pnpm cpd:tsx",
"deps:c": "pnpm dlx madge --circular --ts-config tsconfig.json --extensions ts,tsx .",
"eas-build-pre-install": "echo \"require('./src/index.js')\" > index.js",
"update-translations": "node utils/update-translations.js",
"android": "expo run:android"
},
"dependencies": {
"@cashu/cashu-ts": "^0.9.0",
"@react-native-community/netinfo": "9.3.10",
"@react-native-community/netinfo": "11.1.0",
"@react-navigation/core": "^6.4.10",
"@react-navigation/native": "^6.1.9",
"@react-navigation/native-stack": "^6.9.17",
"@sentry/react-native": "5.10.0",
"@shopify/flash-list": "1.4.3",
"@sentry/react-native": "5.16.0",
"@shopify/flash-list": "1.6.3",
"crypto-js": "4.2.0",
"expo": "^49.0.21",
"expo-application": "~5.3.0",
"expo-asset": "~8.10.1",
"expo-barcode-scanner": "~12.5.3",
"expo-camera": "~13.4.4",
"expo-clipboard": "~4.3.1",
"expo-constants": "~14.4.2",
"expo-crypto": "~12.4.1",
"expo-device": "~5.4.0",
"expo-file-system": "~15.4.5",
"expo-image": "~1.3.5",
"expo-insights": "~0.2.0",
"expo-localization": "~14.3.0",
"expo-secure-store": "~12.3.1",
"expo-splash-screen": "~0.20.5",
"expo-sqlite": "~11.3.3",
"expo-status-bar": "~1.6.0",
"expo-updates": "~0.18.17",
"i18next": "^23.7.8",
"lottie-react-native": "5.1.6",
"expo": "^50.0.2",
"expo-application": "~5.8.3",
"expo-barcode-scanner": "~12.9.2",
"expo-camera": "~14.0.1",
"expo-clipboard": "~5.0.1",
"expo-constants": "~15.4.5",
"expo-crypto": "~12.8.0",
"expo-device": "~5.9.3",
"expo-file-system": "~16.0.4",
"expo-image": "~1.10.4",
"expo-insights": "~0.6.1",
"expo-localization": "~14.8.3",
"expo-secure-store": "~12.8.1",
"expo-splash-screen": "~0.26.3",
"expo-sqlite": "~13.2.1",
"expo-status-bar": "~1.11.1",
"i18next": "^23.7.17",
"lottie-react-native": "6.5.1",
"nostr-tools": "^1.17.0",
"react": "^18.2.0",
"react-i18next": "^13.5.0",
"react-native": "0.72.6",
"react-native-gesture-handler": "~2.12.0",
"react-i18next": "^14.0.1",
"react-native": "0.73.2",
"react-native-gesture-handler": "~2.14.1",
"react-native-onboarding-swiper": "^1.2.0",
"react-native-popup-menu": "^0.16.1",
"react-native-qrcode-svg": "^6.2.0",
"react-native-reanimated": "~3.3.0",
"react-native-safe-area-context": "4.6.3",
"react-native-screens": "~3.22.0",
"react-native-reanimated": "~3.6.1",
"react-native-safe-area-context": "4.8.2",
"react-native-screens": "~3.29.0",
"react-native-size-matters": "^0.4.2",
"react-native-svg": "13.9.0",
"react-native-url-polyfill": "^2.0.0",
"sentry-expo": "~7.1.1",
"react-native-svg": "14.1.0",
"text-encoding-polyfill": "^0.6.7"
},
"devDependencies": {
"@babel/core": "^7.23.6",
"@babel/core": "^7.23.7",
"@babel/plugin-proposal-private-methods": "^7.18.6",
"@getify/eslint-plugin-proper-arrows": "^11.0.3",
"@testing-library/react-native": "^12.4.2",
"@testing-library/react-native": "^12.4.3",
"@types/babel__core": "^7.20.5",
"@types/crypto-js": "^4.2.1",
"@types/jest": "^29.5.11",
"@types/node": "^20.10.5",
"@types/react": "~18.2.45",
"@types/react-native-onboarding-swiper": "^1.1.8",
"@types/node": "^20.11.5",
"@types/react": "~18.2.48",
"@types/react-native-onboarding-swiper": "^1.1.9",
"@types/sqlite3": "^3.1.11",
"@typescript-eslint/eslint-plugin": "^6.15.0",
"@typescript-eslint/parser": "^6.15.0",
"dotenv": "^16.3.1",
"@typescript-eslint/eslint-plugin": "^6.19.0",
"@typescript-eslint/parser": "^6.19.0",
"dotenv": "^16.3.2",
"eslint": "^8.56.0",
"eslint-plugin-deprecate": "^0.8.4",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^27.6.0",
"eslint-plugin-jsdoc": "^46.9.1",
"eslint-plugin-jest": "^27.6.3",
"eslint-plugin-jsdoc": "^48.0.2",
"eslint-plugin-json": "^3.1.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-tsdoc": "^0.2.17",
"expo-dev-client": "~2.4.12",
"expo-dev-client": "~3.3.6",
"jest": "^29.7.0",
"jest-expo": "^49.0.0",
"metro-config": "^0.80.2",
"prettier": "^3.1.1",
"jest-expo": "^50.0.1",
"metro-config": "^0.80.4",
"prettier": "^3.2.4",
"ts-jest": "^29.1.1",
"ts-jest-resolver": "^2.0.1",
"ts-node": "^10.9.2",
Expand Down Expand Up @@ -157,5 +153,5 @@
"bugs": {
"url": "https://github.com/cashubtc/eNuts/issues"
},
"main": "src/App.ts"
"main": "/src/index.js"
}
Loading

0 comments on commit a95d109

Please sign in to comment.