Skip to content

Commit

Permalink
Move from Expo next to Expo 50
Browse files Browse the repository at this point in the history
  • Loading branch information
venables committed Mar 7, 2024
1 parent c0bb8cf commit 7679d71
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 71 deletions.
14 changes: 3 additions & 11 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = {
extends: ["plugin:@typescript-eslint/disable-type-checked"]
},
/**
* Config files (ex: jest.config.js, prettier.config.js, tailwind.config.js)
* Config files (ex: prettier.config.js, tailwind.config.js)
*/
{
files: ["*.config.{js,ts}"],
Expand All @@ -39,19 +39,11 @@ module.exports = {
}
},
/**
* Jest Configuration
* Test Configuration
*/
{
files: ["**/__tests__/**/*.{ts,tsx}", "**/*.test.{ts,tsx}"],
env: {
jest: true
},
extends: [
require.resolve("@vercel/style-guide/eslint/jest"),
require.resolve("@vercel/style-guide/eslint/jest-react"),
"plugin:jest/style"
],
plugins: ["jest"],
extends: [require.resolve("@vercel/style-guide/eslint/vitest")],
rules: {
/**
* Allow non-null assertions in tests
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
- [Typescript](https://www.typescriptlang.org/) for a rock-solid codebase
- Strict, recommended [ESLint](https://eslint.org/) and [Prettier](https://prettier.io/) config using the [Vercel Style Guide](https://github.com/vercel/style-guide) for readable, safe code.
- Extra linting power with [Oxlint](https://oxc-project.github.io)
- [Jest](https://jestjs.io/) testing, optimized for Expo.
- [Vitest](https://vitest.dev) testing.

## Starting a new project with StartKit

Expand Down Expand Up @@ -96,7 +96,7 @@ to check for format errors, run:
bun run format:check
```

### Testing via Jest
### Testing

```sh
bun run test
Expand Down
Binary file modified bun.lockb
Binary file not shown.
3 changes: 1 addition & 2 deletions hooks/use-user-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ export const useUserSettingsStore = create<UserSettingsState>()(
isHapticFeedbackEnabled: true as boolean,
toggleHapticFeedback: (enabled) => {
set((current) => ({
isHapticFeedbackEnabled:
enabled === undefined ? !current.isHapticFeedbackEnabled : enabled
isHapticFeedbackEnabled: enabled ?? !current.isHapticFeedbackEnabled
}))
},

Expand Down
13 changes: 0 additions & 13 deletions jest.config.js

This file was deleted.

2 changes: 2 additions & 0 deletions lib/cls/cls.test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { describe, expect, test } from "vitest"

import { cls } from "./cls"

describe("cls", () => {
Expand Down
85 changes: 42 additions & 43 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,77 +4,76 @@
"private": true,
"main": "expo-router/entry",
"scripts": {
"android": "expo start --android",
"android": "expo run:android",
"check": "concurrently bun:type-check bun:oxlint bun:lint bun:format:check bun:test",
"clean": "git clean -xdf .expo",
"dev": "expo start",
"format": "npx prettier --write . --ignore-path .gitignore",
"format:check": "npx prettier --check . --ignore-path .gitignore",
"ios": "expo start --ios",
"clean": "git clean -xdf .expo ios android",
"dev": "expo run",
"format": "npx prettier --write .",
"format:check": "npx prettier --check .",
"ios": "expo run:ios",
"lint": "eslint .",
"outdated": "npx npm-check-updates@latest --interactive --format group",
"oxlint": "oxlint",
"setup": "./bin/setup",
"start": "expo start",
"test": "jest",
"test": "vitest run",
"type-check": "tsc --noEmit --pretty",
"web": "expo start --web"
},
"dependencies": {
"@expo-google-fonts/space-mono": "^0.2.3",
"@react-native-async-storage/async-storage": "1.21.0",
"@react-native-community/netinfo": "11.1.0",
"@react-navigation/native": "^6.1.9",
"@t3-oss/env-core": "^0.7.1",
"@tanstack/query-async-storage-persister": "^5.14.2",
"@tanstack/react-query": "^5.15.3",
"@tanstack/react-query-persist-client": "^5.15.3",
"clsx": "^2.0.0",
"expo": "next",
"@react-navigation/native": "^6.1.14",
"@t3-oss/env-core": "^0.8.0",
"@tanstack/query-async-storage-persister": "^5.25.0",
"@tanstack/react-query": "^5.25.0",
"@tanstack/react-query-persist-client": "^5.25.0",
"clsx": "^2.1.0",
"expo": "~50.0.11",
"expo-clipboard": "~5.0.1",
"expo-constants": "~15.4.2",
"expo-device": "~5.9.1",
"expo-font": "~11.10.0",
"expo-constants": "~15.4.5",
"expo-device": "~5.9.3",
"expo-font": "~11.10.3",
"expo-haptics": "~12.8.1",
"expo-linking": "~6.2.1",
"expo-notifications": "~0.27.2",
"expo-router": "~3.4.1",
"expo-splash-screen": "~0.26.1",
"expo-linking": "~6.2.2",
"expo-notifications": "~0.27.6",
"expo-router": "~3.4.8",
"expo-splash-screen": "~0.26.4",
"expo-status-bar": "~1.11.1",
"expo-system-ui": "~2.9.2",
"expo-web-browser": "~12.8.1",
"lucide-react-native": "^0.303.0",
"expo-system-ui": "~2.9.3",
"expo-web-browser": "~12.8.2",
"lucide-react-native": "^0.350.0",
"nativewind": "^4.0.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.73.1",
"react-native": "0.73.4",
"react-native-gesture-handler": "~2.14.0",
"react-native-reanimated": "~3.6.0",
"react-native-safe-area-context": "4.7.4",
"react-native-screens": "~3.27.0",
"react-native-reanimated": "~3.6.2",
"react-native-safe-area-context": "4.8.2",
"react-native-screens": "~3.29.0",
"react-native-toast-message": "^2.2.0",
"react-native-web": "~0.19.9",
"tailwind-merge": "^2.2.0",
"react-native-web": "~0.19.10",
"tailwind-merge": "^2.2.1",
"zod": "^3.22.4",
"zustand": "^4.4.7"
"zustand": "^4.5.2"
},
"devDependencies": {
"@babel/core": "^7.23.6",
"@babel/core": "^7.24.0",
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
"@types/jest": "^29.5.11",
"@types/react": "~18.2.46",
"@types/react": "~18.2.64",
"@types/react-test-renderer": "^18.0.7",
"@vercel/style-guide": "^5.1.0",
"@vercel/style-guide": "^6.0.0",
"ajv": "^8.12.0",
"babel-plugin-module-resolver": "^5.0.0",
"concurrently": "^8.2.2",
"eslint": "^8.56.0",
"eslint-plugin-tailwindcss": "^3.13.1",
"jest": "^29.7.0",
"jest-expo": "~50.0.1",
"oxlint": "^0.0.22",
"prettier": "^3.1.1",
"eslint": "^8.57.0",
"eslint-plugin-tailwindcss": "^3.14.3",
"oxlint": "^0.2.13",
"prettier": "^3.2.5",
"react-test-renderer": "18.2.0",
"tailwindcss": "^3.4.0",
"typescript": "^5.3.3"
"tailwindcss": "^3.4.1",
"typescript": "^5.4.2",
"vitest": "^1.3.1"
}
}

0 comments on commit 7679d71

Please sign in to comment.