From a580dd91b69f3df887859d6657e735f76e385af7 Mon Sep 17 00:00:00 2001
From: Augustin Mauroy <97875033+AugustinMauroy@users.noreply.github.com>
Date: Wed, 5 Aug 2026 23:08:22 +0200
Subject: [PATCH 1/6] feat(blog): add more codemod to migrations guides
---
.../pages/en/blog/migrations/v16-to-v18.mdx | 29 ++++++++++++++++++-
.../pages/en/blog/migrations/v22-to-v24.mdx | 10 +++++++
2 files changed, 38 insertions(+), 1 deletion(-)
diff --git a/apps/site/pages/en/blog/migrations/v16-to-v18.mdx b/apps/site/pages/en/blog/migrations/v16-to-v18.mdx
index b469c14b80ee2..6adcdd1492670 100644
--- a/apps/site/pages/en/blog/migrations/v16-to-v18.mdx
+++ b/apps/site/pages/en/blog/migrations/v16-to-v18.mdx
@@ -16,6 +16,33 @@ author: AugustinMauroy
This page provides a list of codemods to help you migrate your code from Node.js v16 to v18.
+## `dns-lookup-options-coercion`
+
+In Node.js v18, the [DEP0153](https://nodejs.org/api/deprecations.html#dep0153-dnslookup-and-dnspromiseslookup-options-type-coercion) deprecation was granted to end-of-life, which means that the `dns.lookup()` and `dnsPromises.lookup()` functions will no longer coerce option values to their proper types. This codemod will help you convert any literal option values to their proper types.
+
+The source code for this codemod can be found in the [Codemod Registry](https://app.codemod.com/registry/@nodejs/dns-lookup-options-coercion).
+
+```bash
+npx codemod run @nodejs/dns-lookup-options-coercion
+```
+
+### Examples:
+
+```diff
+ const dns = require("node:dns");
+
+- dns.lookup("example.com", { family: "4", all: 1 }, callback);
++ dns.lookup("example.com", { family: 4, all: true }, callback);
+```
+
+```diff
+ import { lookup } from "node:dns/promises";
+
+- await lookup("example.com", { family: "6", verbatim: 0 });
++ await lookup("example.com", { family: 6, verbatim: false });
+```
+
+
## `err-invalid-callback`
In Node.js v18, the [DEP0159](https://nodejs.org/api/deprecations.html#DEP0159) deprecation was introduced, which deprecated the `ERR_INVALID_CALLBACK` error code in favor of `ERR_INVALID_ARG_TYPE`. This codemod will help you replace any references to the old error code with the new one.
@@ -28,7 +55,7 @@ You can find this codemod in the [Codemod Registry](https://app.codemod.com/regi
npx codemod run @nodejs/err-invalid-callback
```
-### Example:
+### Examples:
```diff
try {
diff --git a/apps/site/pages/en/blog/migrations/v22-to-v24.mdx b/apps/site/pages/en/blog/migrations/v22-to-v24.mdx
index 63478577ac4e8..32b6cad97a369 100644
--- a/apps/site/pages/en/blog/migrations/v22-to-v24.mdx
+++ b/apps/site/pages/en/blog/migrations/v22-to-v24.mdx
@@ -69,6 +69,16 @@ Node.js' `configure` script will warn if you attempt to build Node.js with a com
Some breaking changes or End of Life (EOL) deprecations in Node.js 23 and 24 have associated codemods to help you update your codebase. Below is a list of the available codemods for this migration:
+If you wan't to run all of them at once, you can use the following command:
+
+```bash
+npx codemod run @nodejs/v22-to-v24
+```
+
+
+ As said in the introduction, this is not a complete list of codemods for this migration.
+
+
### `crypto-rsa-pss-update`
In [DEP0154](https://nodejs.org/docs/latest/api/deprecations.html#DEP0154), the `generateKeyPair` and `generateKeyPairSync` methods in the `crypto` module deprecated the `hash`, `mgf1Hash`, and `saltLength` options for the `'rsa-pss'` key type in favor of `hashAlgorithm`, `mgf1HashAlgorithm`, and `saltLength` respectively.
From d70064e3d223f733d8a687845e740428637fa6e0 Mon Sep 17 00:00:00 2001
From: Augustin Mauroy <97875033+AugustinMauroy@users.noreply.github.com>
Date: Wed, 5 Aug 2026 23:13:41 +0200
Subject: [PATCH 2/6] Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Augustin Mauroy <97875033+AugustinMauroy@users.noreply.github.com>
---
apps/site/pages/en/blog/migrations/v16-to-v18.mdx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/site/pages/en/blog/migrations/v16-to-v18.mdx b/apps/site/pages/en/blog/migrations/v16-to-v18.mdx
index 6adcdd1492670..dd1a25231f992 100644
--- a/apps/site/pages/en/blog/migrations/v16-to-v18.mdx
+++ b/apps/site/pages/en/blog/migrations/v16-to-v18.mdx
@@ -20,7 +20,7 @@ This page provides a list of codemods to help you migrate your code from Node.js
In Node.js v18, the [DEP0153](https://nodejs.org/api/deprecations.html#dep0153-dnslookup-and-dnspromiseslookup-options-type-coercion) deprecation was granted to end-of-life, which means that the `dns.lookup()` and `dnsPromises.lookup()` functions will no longer coerce option values to their proper types. This codemod will help you convert any literal option values to their proper types.
-The source code for this codemod can be found in the [Codemod Registry](https://app.codemod.com/registry/@nodejs/dns-lookup-options-coercion).
+You can find this codemod in the [Codemod Registry](https://app.codemod.com/registry/@nodejs/dns-lookup-options-coercion).
```bash
npx codemod run @nodejs/dns-lookup-options-coercion
From 891393ebdaf5fa387d50a7d4bf77e7f84d5c6c59 Mon Sep 17 00:00:00 2001
From: Augustin Mauroy <97875033+AugustinMauroy@users.noreply.github.com>
Date: Wed, 5 Aug 2026 23:13:51 +0200
Subject: [PATCH 3/6] Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Augustin Mauroy <97875033+AugustinMauroy@users.noreply.github.com>
---
apps/site/pages/en/blog/migrations/v22-to-v24.mdx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/site/pages/en/blog/migrations/v22-to-v24.mdx b/apps/site/pages/en/blog/migrations/v22-to-v24.mdx
index 32b6cad97a369..65f504fa6ef0e 100644
--- a/apps/site/pages/en/blog/migrations/v22-to-v24.mdx
+++ b/apps/site/pages/en/blog/migrations/v22-to-v24.mdx
@@ -76,7 +76,7 @@ npx codemod run @nodejs/v22-to-v24
```
- As said in the introduction, this is not a complete list of codemods for this migration.
+ As noted in the introduction, this is not a complete list of codemods for this migration.
### `crypto-rsa-pss-update`
From 64ba627f89b59e49cbd9d326c6ac47e10d82309f Mon Sep 17 00:00:00 2001
From: Augustin Mauroy <97875033+AugustinMauroy@users.noreply.github.com>
Date: Wed, 5 Aug 2026 23:14:05 +0200
Subject: [PATCH 4/6] Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Augustin Mauroy <97875033+AugustinMauroy@users.noreply.github.com>
---
apps/site/pages/en/blog/migrations/v22-to-v24.mdx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/site/pages/en/blog/migrations/v22-to-v24.mdx b/apps/site/pages/en/blog/migrations/v22-to-v24.mdx
index 65f504fa6ef0e..c16eeb7600645 100644
--- a/apps/site/pages/en/blog/migrations/v22-to-v24.mdx
+++ b/apps/site/pages/en/blog/migrations/v22-to-v24.mdx
@@ -69,7 +69,7 @@ Node.js' `configure` script will warn if you attempt to build Node.js with a com
Some breaking changes or End of Life (EOL) deprecations in Node.js 23 and 24 have associated codemods to help you update your codebase. Below is a list of the available codemods for this migration:
-If you wan't to run all of them at once, you can use the following command:
+If you want to run all of them at once, you can use the following command:
```bash
npx codemod run @nodejs/v22-to-v24
From bdbbe59152025e461730f66b6bc729297c70a164 Mon Sep 17 00:00:00 2001
From: Augustin Mauroy <97875033+AugustinMauroy@users.noreply.github.com>
Date: Wed, 5 Aug 2026 23:14:17 +0200
Subject: [PATCH 5/6] Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Augustin Mauroy <97875033+AugustinMauroy@users.noreply.github.com>
---
apps/site/pages/en/blog/migrations/v16-to-v18.mdx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/apps/site/pages/en/blog/migrations/v16-to-v18.mdx b/apps/site/pages/en/blog/migrations/v16-to-v18.mdx
index dd1a25231f992..19b5562ceb47c 100644
--- a/apps/site/pages/en/blog/migrations/v16-to-v18.mdx
+++ b/apps/site/pages/en/blog/migrations/v16-to-v18.mdx
@@ -18,7 +18,7 @@ This page provides a list of codemods to help you migrate your code from Node.js
## `dns-lookup-options-coercion`
-In Node.js v18, the [DEP0153](https://nodejs.org/api/deprecations.html#dep0153-dnslookup-and-dnspromiseslookup-options-type-coercion) deprecation was granted to end-of-life, which means that the `dns.lookup()` and `dnsPromises.lookup()` functions will no longer coerce option values to their proper types. This codemod will help you convert any literal option values to their proper types.
+In Node.js v18, the [DEP0153](https://nodejs.org/api/deprecations.html#dep0153-dnslookup-and-dnspromiseslookup-options-type-coercion) deprecation reached end-of-life, which means that the `dns.lookup()` and `dnsPromises.lookup()` functions will no longer coerce option values to their proper types. This codemod will help you convert any literal option values to their proper types.
You can find this codemod in the [Codemod Registry](https://app.codemod.com/registry/@nodejs/dns-lookup-options-coercion).
From 119e0231b045e9a4ef69a815fda01deef80d69fe Mon Sep 17 00:00:00 2001
From: Augustin Mauroy <97875033+AugustinMauroy@users.noreply.github.com>
Date: Wed, 5 Aug 2026 23:17:53 +0200
Subject: [PATCH 6/6] fix: format
---
apps/site/pages/en/blog/migrations/v16-to-v18.mdx | 1 -
apps/site/pages/en/blog/migrations/v22-to-v24.mdx | 3 ++-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/apps/site/pages/en/blog/migrations/v16-to-v18.mdx b/apps/site/pages/en/blog/migrations/v16-to-v18.mdx
index 19b5562ceb47c..62729ecb0e753 100644
--- a/apps/site/pages/en/blog/migrations/v16-to-v18.mdx
+++ b/apps/site/pages/en/blog/migrations/v16-to-v18.mdx
@@ -42,7 +42,6 @@ npx codemod run @nodejs/dns-lookup-options-coercion
+ await lookup("example.com", { family: 6, verbatim: false });
```
-
## `err-invalid-callback`
In Node.js v18, the [DEP0159](https://nodejs.org/api/deprecations.html#DEP0159) deprecation was introduced, which deprecated the `ERR_INVALID_CALLBACK` error code in favor of `ERR_INVALID_ARG_TYPE`. This codemod will help you replace any references to the old error code with the new one.
diff --git a/apps/site/pages/en/blog/migrations/v22-to-v24.mdx b/apps/site/pages/en/blog/migrations/v22-to-v24.mdx
index c16eeb7600645..a52bfba83fbab 100644
--- a/apps/site/pages/en/blog/migrations/v22-to-v24.mdx
+++ b/apps/site/pages/en/blog/migrations/v22-to-v24.mdx
@@ -76,7 +76,8 @@ npx codemod run @nodejs/v22-to-v24
```
- As noted in the introduction, this is not a complete list of codemods for this migration.
+ As noted in the introduction, this is not a complete list of codemods for this
+ migration.
### `crypto-rsa-pss-update`