Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next 15 & React 19 upgrade #2

Merged
merged 6 commits into from
Jul 3, 2024
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 apps/expo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"expo-status-bar": "~1.12.1",
"expo-web-browser": "^13.0.3",
"nativewind": "~4.0.36",
"react": "18.3.1",
"react-dom": "18.3.1",
"react": "19.0.0-rc-100dfd7dab-20240701",
"react-dom": "19.0.0-rc-100dfd7dab-20240701",
"react-native": "~0.74.1",
"react-native-css-interop": "~0.0.34",
"react-native-gesture-handler": "~2.16.2",
Expand Down
4 changes: 4 additions & 0 deletions apps/nextjs/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ const config = {
/** We already do linting and typechecking as separate tasks in CI */
eslint: { ignoreDuringBuilds: true },
typescript: { ignoreBuildErrors: true },

experimental: {
reactCompiler: true,
},
};

export default config;
8 changes: 4 additions & 4 deletions apps/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"build": "pnpm with-env next build",
"clean": "git clean -xdf .next .turbo node_modules",
"dev": "pnpm with-env next dev",
"dev": "pnpm with-env next dev --turbo",
"format": "prettier --check . --ignore-path ../../.gitignore",
"lint": "eslint",
"start": "pnpm with-env next start",
Expand All @@ -25,9 +25,9 @@
"@trpc/react-query": "11.0.0-rc.364",
"@trpc/server": "11.0.0-rc.364",
"geist": "^1.3.0",
"next": "^14.2.3",
"react": "18.3.1",
"react-dom": "18.3.1",
"next": "15.0.0-rc.0",
"react": "19.0.0-rc-100dfd7dab-20240701",
"react-dom": "19.0.0-rc-100dfd7dab-20240701",
"superjson": "2.2.1",
"zod": "^3.23.8"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@
"@auth/core": "0.32.0",
"@auth/drizzle-adapter": "1.4.1",
"@t3-oss/env-nextjs": "^0.10.1",
"next": "^14.2.3",
"next": "15.0.0-rc.0",
"next-auth": "5.0.0-beta.19",
"react": "18.3.1",
"react-dom": "18.3.1",
"react": "19.0.0-rc-100dfd7dab-20240701",
"react-dom": "19.0.0-rc-100dfd7dab-20240701",
"zod": "^3.23.8"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@
"@types/react": "^18.3.3",
"eslint": "^9.4.0",
"prettier": "^3.3.1",
"react": "18.3.1",
"react": "19.0.0-rc-100dfd7dab-20240701",
"tailwindcss": "^3.4.3",
"typescript": "^5.4.5",
"zod": "^3.23.8"
},
"peerDependencies": {
"react": "18.3.1",
"react": "19.0.0-rc-100dfd7dab-20240701",
"zod": "^3.23.8"
},
"prettier": "@acme/prettier-config"
Expand Down
1,393 changes: 957 additions & 436 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions tooling/eslint/base.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/// <reference types="./types.d.ts" />

import eslint from "@eslint/js";
import stylisticPlugin from "@stylistic/eslint-plugin";
import importPlugin from "eslint-plugin-import";
import turboPlugin from "eslint-plugin-turbo";
import tseslint from "typescript-eslint";
Expand Down Expand Up @@ -42,6 +43,7 @@ export default tseslint.config(
plugins: {
import: importPlugin,
turbo: turboPlugin,
"@stylistic": stylisticPlugin,
},
extends: [
eslint.configs.recommended,
Expand Down Expand Up @@ -71,6 +73,7 @@ export default tseslint.config(
],
"@typescript-eslint/no-non-null-assertion": "error",
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
"@stylistic/semi": ["warn"],
},
},
{
Expand Down
6 changes: 5 additions & 1 deletion tooling/eslint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,14 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@next/eslint-plugin-next": "^14.2.3",
"@eslint/compat": "1.1.0",
"@next/eslint-plugin-next": "15.0.0-rc.0",
"@stylistic/eslint-plugin": "2.1.0",
"babel-plugin-react-compiler": "0.0.0-experimental-696af53-20240625",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-compiler": "0.0.0-experimental-0998c1e-20240625",
"eslint-plugin-react-hooks": "rc",
"eslint-plugin-turbo": "^2.0.3",
"typescript-eslint": "rc-v8"
Expand Down
13 changes: 11 additions & 2 deletions tooling/eslint/react.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { fixupPluginRules } from "@eslint/compat";
import reactPlugin from "eslint-plugin-react";
import hooksPlugin from "eslint-plugin-react-hooks";

Expand All @@ -6,17 +7,25 @@ export default [
{
files: ["**/*.ts", "**/*.tsx"],
plugins: {
react: reactPlugin,
// fixes: https://eslint.org/docs/latest/use/troubleshooting/v9-rule-api-changes
react: fixupPluginRules(reactPlugin),
"react-hooks": hooksPlugin,
},
rules: {
...reactPlugin.configs["jsx-runtime"].rules,
...reactPlugin.configs.recommended.rules,
...hooksPlugin.configs.recommended.rules,
"react/prop-types": "off",
},
languageOptions: {
globals: {
React: "writable",
},
},
settings: {
react: {
// Only necessary to suppress warning
version: "detect",
},
},
},
];
Loading