Skip to content

Upgrade package dependencies #298

@lith-x

Description

@lith-x

Poking around the codebase and launching a local instance of the site, just thought I'd cobble together some suggestions for updates/migrations with the deprecations that are starting to creep in.

  • NextJS: 15 -> 16
    • Minimal migration needed, add turbopack: {}, to next.config.js
  • React / React-DOM: 18 -> 19
    • ⚠️ NOTE: @types/react is out of step with underlying react packages, type info is out of step with actual dependencies!
    • Issue: the react wrapper for chessground @react-chess/chessground has not been updated to accept react 19 as a compatible version.
    • Suggestion: Looking at the repo, it looks pretty dead. Vendor the single relevant file here from the package. Licenses are compatible (both this project and @react-chess/chessground are both GPL-3.0), so a simple attribution comment would suffice.
  • ESLint: 8 -> 10
    • Will need to migrate .eslintrc to corresponding eslint.config.ts, there is a tool to do this pretty seamlessly. see migration guide
    • Alternative suggestion: migrate from ESLint/Prettier to oxlint/oxfmt from the oxc suite. The suite is an early adopter of typescript's new tsgo compiler whose type-checking capabilities were recently declared as done, easy performance upgrade with relatively simple migration path. This project uses the react, next, typescript, import, a11y-jsx ESLint plugins. The tailwind plugin is picked up with oxfmt, which handles tailwind class sorting along with everything Prettier handles. VSCode extension is available as well.
  • Chessground: 8 -> 10
    • chessground has been deprecated, and moved to @lichess-org/chessground link to package. If the file from @react-chess/chessground is vendored, the file can be updated accordingly. Have not looked into this migration, so it might be as easy as changing the package name, or a bit more involved if there have been any breaking changes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions