Standardize monorepo pipeline: test, lint, typecheck across all workspaces
Previously only 2-3 workspaces participated in each turbo task. This expands test, lint, and typecheck to cover all 11 workspaces with parallel execution and caching. Test pipeline: - Move from single root vitest to per-workspace test scripts via turbo - Shared vitest config (vitest.shared.ts) with passWithNoTests - Per-workspace configs re-export the shared base - Mobile uses Jest (jest-expo + React Native Testing Library) - Add node-environment GPX tests verifying linkedom fallback - Add i18n mobile init tests - Exclude apps/mobile from root vitest (uses Jest separately) Lint pipeline: - Add eslint lint script to all 9 previously unlinted workspaces - Standardize all scripts to "eslint ." with shared root config - Add .expo/ to global ESLint ignores - Fix lint errors: unused imports in api/types, export parseGpx Typecheck pipeline: - Add "typecheck": "tsc" to all 8 packages - Add @types/node (catalog) to gpx and db packages - Fix mobile app.config.ts: remove deprecated experiments.monorepo and newArchEnabled (both default in Expo SDK 55) - Add allowImportingTsExtensions to mobile tsconfig Shared package compatibility (mobile-app Phase 1.3): - Add linkedom as explicit dependency to @trails-cool/gpx - Add initI18nMobile() export to @trails-cool/i18n - Confirm @trails-cool/types is pure interfaces (no DOM deps) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
423499d21d
commit
2ac4014521
41 changed files with 1787 additions and 36 deletions
|
|
@ -9,7 +9,6 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
|
|||
orientation: "portrait",
|
||||
icon: "./assets/icon.png",
|
||||
userInterfaceStyle: "light",
|
||||
newArchEnabled: true,
|
||||
splash: {
|
||||
image: "./assets/splash-icon.png",
|
||||
resizeMode: "contain",
|
||||
|
|
@ -29,8 +28,5 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
|
|||
web: {
|
||||
favicon: "./assets/favicon.png",
|
||||
},
|
||||
experiments: {
|
||||
monorepo: true,
|
||||
},
|
||||
plugins: ["expo-router"],
|
||||
});
|
||||
|
|
|
|||
11
apps/mobile/app/__tests__/smoke.test.tsx
Normal file
11
apps/mobile/app/__tests__/smoke.test.tsx
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import React from "react";
|
||||
import { render, screen } from "@testing-library/react-native";
|
||||
import { Text } from "react-native";
|
||||
|
||||
describe("Jest + React Native Testing Library", () => {
|
||||
it("renders a component", () => {
|
||||
render(<Text testID="hello">Hello</Text>);
|
||||
expect(screen.getByTestId("hello")).toBeTruthy();
|
||||
expect(screen.getByText("Hello")).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
|
@ -7,7 +7,16 @@
|
|||
"start": "expo start",
|
||||
"android": "expo start --android",
|
||||
"ios": "expo start --ios",
|
||||
"web": "expo start --web"
|
||||
"web": "expo start --web",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"test": "jest",
|
||||
"lint": "eslint ."
|
||||
},
|
||||
"jest": {
|
||||
"preset": "jest-expo",
|
||||
"transformIgnorePatterns": [
|
||||
"node_modules/(?!(.pnpm/)?((jest-)?react-native|@react-native(-community)?|expo(nent)?|@expo(nent)?/.*|@expo-google-fonts/.*|react-navigation|@react-navigation/.*|@trails-cool/.*))"
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"@trails-cool/api": "workspace:*",
|
||||
|
|
@ -24,7 +33,10 @@
|
|||
"react-native-screens": "~4.23.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@testing-library/react-native": "^13.3.3",
|
||||
"@types/jest": "^30.0.0",
|
||||
"@types/react": "~19.2.14",
|
||||
"jest-expo": "^55.0.15",
|
||||
"typescript": "~5.9.2"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"extends": "expo/tsconfig.base",
|
||||
"compilerOptions": {
|
||||
"strict": true
|
||||
"strict": true,
|
||||
"allowImportingTsExtensions": true
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue