Skip to content

Conversation

@philipbrembeck
Copy link
Collaborator

@philipbrembeck philipbrembeck commented Oct 28, 2025

Summary by Sourcery

Update project to Next.js 16 and React 19.2, streamline ESLint and TypeScript configurations, enhance internationalization by adding Portuguese locale and middleware, refactor navigation API, and upgrade CI/CD (GitHub Actions and Dockerfile) to latest tooling.

New Features:

  • Add Portuguese (pt-br) locale support across routing, components, and translation files
  • Introduce proxy.ts middleware using next-intl to handle internationalized routing

Enhancements:

  • Upgrade Next.js to v16 and React to v19.2 along with related packages (next-intl, eslint-config-next, TypeScript tooling)
  • Refactor ESLint configuration to leverage combined presets and add ignore patterns
  • Switch lint scripts in package.json from next lint to direct ESLint commands
  • Refactor i18n navigation by extracting navigation helpers into a dedicated module and replacing deprecated shared pathnames API
  • Update tsconfig.json to use the react-jsx transform, include additional type paths, and improve formatting

Build:

  • Ensure corepack is installed globally in the Dockerfile before running pnpm for install and build

CI:

  • Bump GitHub Actions versions (checkout v5, setup-node v6, and Docker actions) in build and PR workflows

dependabot bot and others added 30 commits February 4, 2025 02:15
Bumps [@typescript-eslint/typescript-estree](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-estree) from 8.14.0 to 8.23.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-estree/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.23.0/packages/typescript-estree)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/typescript-estree"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
…typescript-eslint/typescript-estree-8.23.0

build(deps-dev): bump @typescript-eslint/typescript-estree from 8.14.0 to 8.23.0
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.13.0 to 6.14.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](docker/build-push-action@ca877d9...0adf995)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.18.0 to 8.25.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.25.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
…typescript-eslint/parser-8.25.0

build(deps-dev): bump @typescript-eslint/parser from 8.18.0 to 8.25.0
…s/docker/build-push-action-6.14.0

build(deps): bump docker/build-push-action from 6.13.0 to 6.14.0
Bumps [eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next) from 15.0.3 to 15.1.7.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/commits/v15.1.7/packages/eslint-config-next)

---
updated-dependencies:
- dependency-name: eslint-config-next
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
…eslint-config-next-15.1.7

build(deps-dev): bump eslint-config-next from 15.0.3 to 15.1.7
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 5.6.1 to 5.7.0.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](docker/metadata-action@369eb59...902fa8e)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
…s/docker/metadata-action-5.7.0

build(deps): bump docker/metadata-action from 5.6.1 to 5.7.0
Bumps [next](https://github.com/vercel/next.js) from 15.1.6 to 15.2.3.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](vercel/next.js@v15.1.6...v15.2.3)

---
updated-dependencies:
- dependency-name: next
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
…next-15.2.3

build(deps): bump next from 15.1.6 to 15.2.3
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.10.1 to 22.15.15.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 22.15.15
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
…types/node-22.15.15

build(deps): bump @types/node from 22.10.1 to 22.15.15
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6.14.0 to 6.18.0.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](docker/build-push-action@0adf995...2634353)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-version: 6.18.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 5.7.0 to 5.8.0.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](docker/metadata-action@902fa8e...c1e5197)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-version: 5.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [docker/login-action](https://github.com/docker/login-action) from 3.3.0 to 3.6.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](docker/login-action@9780b0c...5e57cd1)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: 3.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 6.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](actions/setup-node@v4...v6)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…ns/docker/login-action-3.6.0

build(deps): bump docker/login-action from 3.3.0 to 3.6.0
…s/docker/build-push-action-6.18.0

build(deps): bump docker/build-push-action from 6.14.0 to 6.18.0
…ns/actions/setup-node-6

build(deps): bump actions/setup-node from 4 to 6
…s/actions/checkout-5

build(deps): bump actions/checkout from 4 to 5
…s/docker/metadata-action-5.8.0

build(deps): bump docker/metadata-action from 5.7.0 to 5.8.0
@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@sourcery-ai
Copy link

sourcery-ai bot commented Oct 28, 2025

Reviewer's Guide

This PR reshapes the project tooling by refactoring ESLint configuration into shared presets, updating dependencies and lint scripts, bumping GitHub Actions and CI tool versions, refining TypeScript compiler settings, enhancing i18n with a new navigation API and Portuguese locale, and ensuring corepack is globally installed in Docker builds.

Entity relationship diagram for supported locales

erDiagram
  ROUTING {
    string locales
    string defaultLocale
  }
  LOCALE {
    string code
    string name
  }
  ROUTING ||--o{ LOCALE : supports
Loading

Flow diagram for updated linting process

flowchart TD
  LintScript["npm run lint"] --> ESLint["eslint ."]
  LintFixScript["npm run lint:fix"] --> ESLintFix["eslint --fix ."]
  ESLint --> ESLintConfig["eslint.config.mjs"]
  ESLintConfig --> SharedPresets["Shared ESLint presets"]
Loading

File-Level Changes

Change Details Files
Restructure ESLint configuration exports
  • Replaced manual config array with spreads of nextCoreWebVitals and nextTypescript presets
  • Added an ignores block for build artifacts and node_modules
  • Preserved existing plugin and rule settings
eslint.config.mjs
Update scripts and bump dependencies in package.json
  • Switched lint commands from next lint to plain eslint invocations
  • Upgraded type definitions, Next.js, React, Next-Intl, and ESLint-related packages
  • Adjusted pnpm overrides for @types/react and @types/react-dom
package.json
Bump GitHub Actions and CI tooling versions
  • Upgraded actions/checkout to v5 across workflows
  • Updated docker/login-action, metadata-action, and build-push-action to latest commits
  • Switched actions/setup-node from v4 to v6
.github/workflows/build.yml
.github/workflows/pr.yml
Refine TypeScript compiler settings
  • Reformatted lib and paths arrays for readability
  • Changed JSX emit mode to react-jsx
  • Added .next/dev/types to included files
tsconfig.json
Enhance i18n routing and navigation API
  • Replaced shared pathnames navigation with defineRouting in routing.ts
  • Introduced new navigation module via createNavigation
  • Updated imports in pages and components to use navigation API
  • Added Portuguese (pt-br) locale to routing, language lists, and middleware
src/i18n/routing.ts
src/i18n/navigation.ts
src/proxy.ts
src/app/[locale]/more/page.tsx
src/components/nav.tsx
src/locales/pt-br.json
Ensure corepack is globally installed in Docker builds
  • Prefixed pnpm install with npm i -g corepack@latest before enabling corepack
  • Applied same global corepack installation step to both install and build stages
Dockerfile

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sonarqubecloud
Copy link

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes - here's some feedback:

  • In eslint.config.mjs, make sure nextCoreWebVitals and nextTypescript are imported or defined before using them in the export default array.
  • The ESLint configuration uses an “ignores” key, but ESLint expects “ignorePatterns” for excluding files—please rename accordingly.
  • Review the bumped GitHub Action versions (checkout@v5, setup-node@v6, docker actions) to confirm there are no breaking changes in the workflow syntax.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In eslint.config.mjs, make sure nextCoreWebVitals and nextTypescript are imported or defined before using them in the export default array.
- The ESLint configuration uses an “ignores” key, but ESLint expects “ignorePatterns” for excluding files—please rename accordingly.
- Review the bumped GitHub Action versions (checkout@v5, setup-node@v6, docker actions) to confirm there are no breaking changes in the workflow syntax.

## Individual Comments

### Comment 1
<location> `src/app/[locale]/more/page.tsx:19` </location>
<code_context>
   { code: "fr", name: "french" },
   { code: "pl", name: "polish" },
   { code: "cz", name: "czech" },
+  { code: "pt-br", name: "portuguese-br" },
 ] as const;

</code_context>

<issue_to_address>
**suggestion:** The language name 'portuguese-br' may not match user expectations.

Use a more descriptive label, such as 'Portuguese (Brazil)', to improve clarity for users.

```suggestion
  { code: "pt-br", name: "Portuguese (Brazil)" },
```
</issue_to_address>

### Comment 2
<location> `Dockerfile:14` </location>
<code_context>
   if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
   elif [ -f package-lock.json ]; then npm ci; \
-  elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm i --frozen-lockfile; \
+  elif [ -f pnpm-lock.yaml ]; then npm i -g corepack@latest && corepack enable pnpm && pnpm i --frozen-lockfile; \
   else echo "Lockfile not found." && exit 1; \
   fi
</code_context>

<issue_to_address>
**suggestion (performance):** Installing corepack globally on every build may increase build time.

If corepack is already present in the base image, installing it again is unnecessary. Check for its existence before installing, or use a Node image with corepack pre-installed.

Suggested implementation:

```
  elif [ -f pnpm-lock.yaml ]; then (command -v corepack >/dev/null 2>&1 || npm i -g corepack@latest) && corepack enable pnpm && pnpm i --frozen-lockfile; \

```

```
  elif [ -f pnpm-lock.yaml ]; then (command -v corepack >/dev/null 2>&1 || npm i -g corepack@latest) && corepack enable pnpm && pnpm run build; \

```
</issue_to_address>

### Comment 3
<location> `src/proxy.ts:12` </location>
<code_context>
+  // - … the ones containing a dot (e.g. `favicon.ico`)
+  // matcher: "/((?!api|trpc|_next|_vercel|.*\\..*).*)",
+  // Match only internationalized pathnames
+  matcher: ["/", "/(de|en|es|fr|pl|cz|pt-br)/:path*"],
+};
</code_context>

<issue_to_address>
**suggestion:** The matcher array may not cover all edge cases for internationalized routes.

To avoid manual updates, generate the matcher from the locales array so new locales are automatically included.

Suggested implementation:

```typescript
import { routing } from "./i18n/routing";
import { locales } from "./i18n/config"; // Adjust path if needed

export default createMiddleware(routing);

const localeMatcher = [
  "/",
  ...locales.map(locale => `/${locale}/:path*`)
];

export const config = {
  // Match all pathnames except for
  // - … if they start with `/api`, `/trpc`, `/_next` or `/_vercel`
  // - … the ones containing a dot (e.g. `favicon.ico`)
  // matcher: "/((?!api|trpc|_next|_vercel|.*\\..*).*)",
  // Match only internationalized pathnames
  matcher: localeMatcher,
};

```

- Ensure that `locales` is exported as an array of strings from your i18n config (e.g., `["de", "en", "es", "fr", "pl", "cz", "pt-br"]`).
- Adjust the import path for `locales` if your i18n config file is located elsewhere.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

// matcher: "/((?!api|trpc|_next|_vercel|.*\\..*).*)",
// Match only internationalized pathnames
matcher: ["/", "/(de|en|es|fr|pl|cz|pt-br)/:path*"],
};
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Middleware Move Breaks Next.js I18n Routing

The internationalization middleware was moved from middleware.ts to proxy.ts. Next.js only recognizes middleware.ts (or .js) as its middleware entry point, so the application's i18n routing will no longer function.

Fix in Cursor Fix in Web

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is wrong.

@philipbrembeck philipbrembeck merged commit d78121a into main Oct 28, 2025
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants