deps(dashboard): Next 16, and the four things it broke - #96
Merged
Conversation
Next 16 has been declined three times today because it kept arriving attached to an unrelated advisory: sharp in #85, postcss in #91, and as a dependency of TypeScript 7 in #66. Done deliberately here instead. It closes the four remaining postcss alerts, which were the last ones in the queue. Four things broke and each needed a decision rather than a version number. `next lint` is gone. It does not warn, it parses the word "lint" as a project directory and exits 1 with "Invalid project directory provided", which reads like a broken path rather than a removed command. package.json now calls eslint directly and .eslintrc.json becomes eslint.config.mjs, because eslint-config-next 16 needs eslint 9 and exports a flat config array rather than something `extends` can take. Turbopack is the default build engine in 16 and resolves CSS differently. `@import "tw-animate-css"` and `@import "shadcn/tailwind.css"` both failed with Module not found. Both packages expose their CSS through an exports "style" condition that webpack honoured and Turbopack does not, and their exports maps do not permit the deep path either, so the imports are now relative into node_modules. Ugly, and the comment says why. `next build --webpack` exists as a fallback and was not taken: opting out of the default engine to keep a prettier import is the wrong trade. The `brace-expansion: ^5` override I added earlier today was wrong and this found it. eslint 9 pulls minimatch 3, which needs the v1 callable export, so `eslint .` died with "expand is not a function". `next lint` had masked it by using Next's vendored copy. The override is removed and npm now resolves 1.1.18 and 5.0.9 side by side, per consumer, which satisfies the advisory without forcing anything. eslint-config-next 16 adds `react-hooks/set-state-in-effect`, which lands on 12 existing effects. It is downgraded to a warning rather than disabled, with the reasoning in the config and #95 to work through them. The pattern it flags most often is the hydration guard next-themes documents, and refactoring twelve effects inside a framework migration would make the whole thing unreviewable. Verified past the build, because a build passing is not a working UI. Served the dev server against a live orchestrator: CSS resolves (3 stylesheets, 703 rules, dark theme applied), the live feed renders 128 events with filters and MITRE columns, no console errors. tsc clean, lint 0 errors, 99 tests, static export produces both routes. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Next 16 was declined three times today because it kept arriving attached to an unrelated advisory:
sharpin #85,postcssin #91, and as a dependency of TypeScript 7 in #66. Done deliberately here instead.It closes the four remaining postcss alerts, which were the last ones in the queue.
Four things broke, each needing a decision
1.
next lintis goneIt does not warn. It parses the word
lintas a project directory:package.jsonnow callseslint .directly, and.eslintrc.jsonbecomeseslint.config.mjs—eslint-config-next@16requires eslint 9 and exports a flat config array rather than somethingextendscan consume.2. Turbopack resolves CSS differently
Turbopack is the default build engine in 16. Both
@import "tw-animate-css"and@import "shadcn/tailwind.css"failed withModule not found. Both packages expose CSS through anexports→stylecondition that webpack honoured and Turbopack does not, and their exports maps do not permit the deep path either.Imports are now relative into
node_modules. Ugly, and the file says why.next build --webpackexists and was not taken: opting out of the default engine to keep a prettier import is the wrong trade when the fallback will eventually go away.3. My own override from earlier today was wrong, and this found it
The
brace-expansion: ^5override I added in #94 broke eslint:eslint 9 pulls
minimatch@3, which needs the v1 callable export.next linthad masked this by using Next's vendored copy, so it passed CI at the time and only surfaced once lint went through the eslint CLI.Override removed. npm now resolves 1.1.18 and 5.0.9 side by side, per consumer, which satisfies the advisory without forcing anything. That is the better fix and I should have scoped it that way originally.
4. A new rule lands on 12 existing effects
react-hooks/set-state-in-effect, new ineslint-config-next@16. Downgraded towarnwith the reasoning in the config and tracked in #95.The shape it flags most often is the hydration guard
next-themesdocuments (useEffect(() => setMounted(true), [])), which exists to avoid a server/client mismatch and has no direct replacement. Twelve behaviour-adjacent refactors inside a framework migration would make this unreviewable.Verified past the build
A build passing is not a working UI, so I served the dev server against a live orchestrator:
rgb(9,9,11)ground)Plus:
tsc --noEmitclean,eslint .0 errors (12 warnings, all #95), 99 tests, static export produces both routes.🤖 Generated with Claude Code