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

Migrate Next to version 15 and eslint to version 9 #138

Merged
merged 25 commits into from
Dec 12, 2024
Merged

Conversation

EasySouls
Copy link
Contributor

@EasySouls EasySouls commented Nov 7, 2024

Next

  • Upgraded Next to version 15 and the functions using cookies to use the new async version, this needs further testing so we can be sure that it works as intended
  • A lot of stuff changed with static and dynamic routes in v15 so we need to make sure that every page uses the correct config.

Debugging Configurations:

  • Added new configurations for debugging Next.js applications both server-side and client-side using different browsers and a full-stack debugging option in .vscode/launch.json.

Dependency Updates:

  • Updated all the outdated dependencies.
  • The shadcn libraries should work with next 15, but there may be complications, this needs testing.

ESLint:

  • The frontend uses the new flat eslint configuration which is the default in version 9.

Yarn:

  • Updated yarn from version 1.22 to 4.5.1.
  • Now the yarn version is connected to the project, so there should be no problems with different people using different versions of yarn.

React:

  • Updated React to version 19.0.3.

@EasySouls EasySouls added dependencies Pull requests that update a dependency file Improvement labels Nov 7, 2024
Copy link

vercel bot commented Nov 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
schbody-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 9, 2024 2:07pm

@EasySouls EasySouls marked this pull request as ready for review December 7, 2024 18:37
@EasySouls
Copy link
Contributor Author

Hold on a little bit, with merging this pr, I also upgraded Prisma to v6, but they changed that the Bytes type now returns Uint8Array instead of Buffer, and I'm having a little trouble with the images. Also I want to use next/image instead of img tags, so the images are optimized

…date controller methods to specify return types
- I don't know why it was there
- Please don't check git blame, it was not me, I promise
- one container for running only the db
- and another for running the entire backend locally
- If a user or an application period had no pfp/background set, it would call the backend in an endless loop
- Now it fetches the images using useFetch with the cacheBuster, so the images still automatically reload upon uploading
- Also set a padding on the badges to make the look nicer
- Footer was not at the end of page
- Fix eslint not used variable errors
- Center the footer
@EasySouls
Copy link
Contributor Author

@mozsarmate @FearsomeRover I think I am brave enough to say that the migration is fully done. But rather prove me wrong than deploy it with errors. I also had to change a few other stuff not related to the migration, but they only improved the UX (I hope).

@mozsarmate mozsarmate merged commit 9d980f1 into main Dec 12, 2024
5 checks passed
@mozsarmate mozsarmate deleted the refactor/next-15 branch December 12, 2024 12:31
mozsarmate added a commit that referenced this pull request Dec 12, 2024
* summarized posts, second banner card, 24 recap

* design updates

* updated footer

* 2024 recap update

* Migrate Next to version 15 and eslint to version 9 (#138)

* Add Yarn configuration, update Next.js and React versions, and refactor cookie handling

* Update package dependencies and ESLint configuration, refactor hooks and components for improved functionality

* Update every non-breaking package

* Modify imported shadcn-ui compoponents

* Update react-day-picker to version 9.3.0 and enhance badge and calendar components with new variants

* Update ESLint configuration, add launch options for next and add types to pdf download

* Separate utility functions, so the pdf generation can run on the client

* Remove eslint config from root project and fix errors in frontend

* Add new eslint config file to backend as well

* Enable corepack and yarn v4 in github analysis action

* Fix import and conditional useCallback

* Update React from rc to stable version

* Update react icons

* Fix react icon import

* Generate prisma client in build github actions

* Update JSX import

* Update Next minor version

* Update Buffer to Uint8Array in images, and prisma to v6

* Refactor image handling to return Buffer instead of Uint8Array and update controller methods to specify return types

* Remove prisma dependency from frontend

- I don't know why it was there
- Please don't check git blame, it was not me, I promise

* Add new docker compose files

- one container for running only the db
- and another for running the entire backend locally

* Fix image loading

- If a user or an application period had no pfp/background set, it would call the backend in an endless loop
- Now it fetches the images using useFetch with the cacheBuster, so the images still automatically reload upon uploading
- Also set a padding on the badges to make the look nicer

* Fix minor errors

- Footer was not at the end of page
- Fix eslint not used variable errors
- Center the footer

* Fix eslint errors

* return prof-pic-status on /user/me

---------

Co-authored-by: EasySouls <93796810+EasySouls@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file Improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants