chore: Update dependencies including majors - #19
Merged
Conversation
Several dependency majors planned for this branch require Node 22+ in their engines field, and yarn v1 fails installs on engine mismatch. Align CI with the local runtime (Node 24).
Apollo Client 4.2.12, Storybook 10.5.9, Cypress 15.21, Prettier 3.9.6, styled-components 6.5.3 and other patch level bumps. Deduplicate the @apollo/client entry in yarn.lock so that @types/apollo-upload-client resolves the same instance as the root dependency, which otherwise produced conflicting ApolloLink types.
eslint-plugin-react-hooks 7.1 adds set-state-in-effect and error-boundaries, both of which flagged existing code. Read the auth cookie on the server through cookies() and pass it to a new client component, which removes the effect that set state right after mount and the resulting flash of the signed out view. Keep only the query inside try/catch on the landpad detail page so the returned JSX is no longer created where the catch cannot protect it.
Next.js 16.3.1 moves its optional sharp dependency to ^0.35.3, so the direct dependency is aligned with it. eslint-config-next follows the Next.js version.
TypeScript 6.0 rejects target es5, so the compile target moves to ES2017, which matches the default Next.js emits for new projects. TypeScript 7 is not possible yet: ts-jest declares typescript >=4.3 <7 and the typescript-eslint bundled with eslint-config-next declares >=4.8.4 <6.1.0.
Both majors only drop Node versions below 22 and keep the APIs this project uses: the matchers in the test suites and the script wrappers in package.json behave the same.
Apollo Client 4 and apollo-upload-client 20 both accept graphql ^16 || ^17, and the UploadHttpLink.mjs export path is unchanged in apollo-upload-client 20.
Builds and styled-components SSR output are unaffected. The Next.js build never loads .swcrc, so the transform in use comes from the styledComponents compiler option in next.config.mjs.
The types were on 25 while the local and CI runtimes are Node 24, which exposes APIs the runtime does not have. Pin them to the Node 24 line instead of following the latest major.
ESLint 10 is not usable yet because eslint-config-next still ships eslint-plugin-react 7.37, which supports eslint ^9.7 at most and calls context.getFilename(), and its babel based parser returns a scope manager without addGlobals. Stay on the 9 line and take the patch.
The Next.js build never reads .swcrc, verified by pointing it at a plugin that does not exist and still getting a successful build. The styled-components transform comes from the compiler option in next.config.mjs, and the server rendered markup is byte identical without the file.
Neither @eslint/js nor @eslint/eslintrc is imported anywhere; eslint.config.mjs only composes eslint-config-next and eslint-plugin-prettier.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Changes
targetto ES2017 intsconfig.jsonandcypress/tsconfig.json, which TypeScript 6 requires@types/nodeback to the Node 24 line, it was ahead of the runtime on 25src/app/page.tsxand pass it to the newsrc/app/page-ui.tsx, and keep only the query insidetry/catchinsrc/app/landpads/[id]/page.tsx, both required by the new eslint-plugin-react-hooks 7.1 rules.swcrcand@swc/plugin-styled-components, the build never reads them andcompiler.styledComponentsalready does the transform@eslint/jsand@eslint/eslintrc, neither is imported@apollo/clientand refreshyarn.lockNot upgraded
eslint10 — eslint-config-next ships eslint-plugin-react 7.37, which peers^9.7and calls the removedcontext.getFilename(), and its parser returns a scope manager withoutaddGlobalstypescript7 — ts-jest peers<7, typescript-eslint peers<6.1.0@types/node26 — kept on the Node 24 runtime