Skip to content

Update dependencies, require react-intl v7 and use Node.js 22 - #9

Merged
ThoSap merged 5 commits into
mainfrom
upgrade-to-react-intl-v7
Jul 11, 2025
Merged

ThoSap merged 5 commits into
mainfrom
upgrade-to-react-intl-v7

Conversation

@ThoSap

@ThoSap ThoSap commented Jun 30, 2025

Copy link
Copy Markdown
Member

I'm unsure how the tests against Node.js 16 of this package worked previously in the first place, as the package-lock.json file from the last commit on main already requires at least Node.js 18.
See

"node": "^18.18.0 || >=20.0.0"

Maybe it is time to drop the Node.js v16 support if we want to use newer versions of ESLint v7 (the typescript-eslint/eslint-plugin@7.0.0 actually should not support Node 16 in the first place) or Jest.
As a workaround, I specified version 7.2.0 (downgrading from 7.3.1), which did not yet fix the Node engine to >= ^18.X.X.

See correct engines.node constraints in package.json in https://github.com/typescript-eslint/typescript-eslint/releases/tag/v7.3.0
typescript-eslint/typescript-eslint#8671

As you can see in the output of the run https://github.com/aboutbits/zod-locales-formatjs/actions/runs/15976236601/job/45059830133 of the commit 9738196, I used the "latest" compatible versions of ESLint and Jest before the force push.


Remove react-intl v6 support

The addition of "lib": ["ES2021.Intl"], is required due to
https://github.com/formatjs/formatjs/releases/tag/react-intl%407.0.0
formatjs/formatjs@4713e1b
formatjs/formatjs@31b832f

We also have to drop the support for react-intl v6, else this won't compile:
image

Due to this, we either create a new major release v1.0.0, or a new @aboutbits/zod-locales-formatjs@0.2.0 release with a breaking change notice.


Diff

diff -y before.txt after.txt  
@aboutbits/zod-locales-formatjs@0.1.0 /Users/thomas.sapelza/I   @aboutbits/zod-locales-formatjs@0.1.0 /Users/thomas.sapelza/I
├── @formatjs/cli@6.2.8                               | ├── @formatjs/cli@6.7.2
├── @formatjs/intl@2.10.1                             | ├── @formatjs/intl@3.1.6
├── @types/jest@29.5.12                               | ├── @types/jest@29.5.14
├── @types/node@18.19.26                              | ├── @types/node@22.15.34
├── @typescript-eslint/eslint-plugin@7.3.1            | ├── @typescript-eslint/eslint-plugin@7.2.0
├── @typescript-eslint/parser@7.3.1                   | ├── @typescript-eslint/parser@7.2.0
├── babel-jest@29.7.0                                   ├── babel-jest@29.7.0
├── eslint-config-prettier@9.1.0                      | ├── eslint-config-prettier@10.1.5
├── eslint-plugin-formatjs@4.12.2                     | ├── eslint-plugin-formatjs@4.13.3
├── eslint-plugin-import@2.29.1                       | ├── eslint-plugin-import@2.32.0
├── eslint-plugin-jest@27.9.0                         | ├── eslint-plugin-jest@28.14.0
├── eslint-plugin-prettier@5.1.3                      | ├── eslint-plugin-prettier@5.5.1
├── eslint-plugin-react-hooks@4.6.0                   | ├── eslint-plugin-react-hooks@4.6.2
├── eslint-plugin-react@7.34.1                        | ├── eslint-plugin-react@7.37.5
├── eslint@8.57.0                                     | ├── eslint@8.57.1
├── jest@29.7.0                                         ├── jest@29.7.0
├── json-diff@1.0.6                                     ├── json-diff@1.0.6
├── prettier@3.2.5                                    | ├── prettier@3.6.2
├── react-intl@6.6.3                                  | ├── react-intl@7.1.11
├── typescript@5.4.3                                  | ├── typescript@5.6.3
└── zod@3.22.4                                        | └── zod@3.25.67

  • Updated the Repositories Checklist

Before
image

After
image

@ThoSap ThoSap self-assigned this Jun 30, 2025
@ThoSap
ThoSap force-pushed the upgrade-to-react-intl-v7 branch from 9738196 to 3bfb772 Compare June 30, 2025 15:22
@ThoSap
ThoSap requested a review from lukasvice June 30, 2025 15:38
@ThoSap
ThoSap marked this pull request as ready for review June 30, 2025 15:46
@ThoSap
ThoSap requested a review from Copilot June 30, 2025 15:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates all dependencies to their latest compatible versions, requires React-Intl v7, and raises the minimum Node.js target to version 22.

  • Bump of core and dev dependencies (including react-intl to v7 and @types/react)
  • Added "lib": ["ES2021.Intl"] to both ESM and CJS build configs
  • Switched CI and .node-version to Node.js 22 and Ubuntu 24.04, and expanded the test matrix

Reviewed Changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tsconfig.build.esm.json Added ES2021.Intl to lib for Intl type support
tsconfig.build.cjs.json Added ES2021.Intl to lib for Intl type support
readme.md Fixed stray whitespace in import statement
package.json Updated dependencies, devDependencies, and peerDependencies
.node-version Set Node.js version to 22
.github/workflows/release.yml Updated NODE_VERSION to 22 and runner to Ubuntu 24.04
.github/workflows/main.yml Updated runners to Ubuntu 24.04 and added Node 22 to the matrix
Comments suppressed due to low confidence (1)

.github/workflows/main.yml:15

  • [nitpick] If Node.js v16 support is being removed, you may want to remove it from this test matrix to keep CI focused on supported runtimes.
        node_version: [16, 18, 20, 22]

Comment thread package.json
@@ -52,32 +52,33 @@
"postversion": "git push && git push --tags"
},
"dependencies": {

Copilot AI Jun 30, 2025

Copy link

Choose a reason for hiding this comment

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

Since Node.js v16 support is being dropped in favor of v18+ (or now v22), consider adding or updating the engines.node field in package.json to ">=18.0.0" (or ">=22.0.0") to explicitly communicate the new minimum runtime requirement.

Copilot uses AI. Check for mistakes.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We decided to drop Node.js v16 support.

@ThoSap
ThoSap merged commit ed54c46 into main Jul 11, 2025
@ThoSap
ThoSap deleted the upgrade-to-react-intl-v7 branch July 11, 2025 12:57
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