Skip to content

Commit 692dff7

Browse files
Merge branch 'main' into blog-add-codemod
2 parents a14a5f9 + 28d264a commit 692dff7

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

apps/site/pages/en/blog/migrations/v22-to-v24.mdx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ author: AugustinMauroy, Richard Lau
1616
Missing codemods will be added over time. If you have specific needs.
1717

1818
<a href="https://github.com/nodejs/userland-migrations/issues/239">
19-
Read this issue to learn where we are in the process. And how to manually migrate your code.
19+
Read this issue to learn where we are in the process and how to manually migrate your code.
2020
</a>
2121
</AlertBox>
2222

@@ -125,6 +125,8 @@ This codemod transforms the usage of `dirent.path` to use `dirent.parentPath`.
125125

126126
See [DEP0178](https://nodejs.org/api/deprecations.html#DEP0178).
127127

128+
The source code for this codemod can be found in the [dirent-path-to-parent-path directory](https://github.com/nodejs/userland-migrations/tree/main/recipes/dirent-path-to-parent-path).
129+
128130
You can find this codemod in the [Codemod Registry](https://app.codemod.com/registry/@nodejs/dirent-path-to-parent-path).
129131

130132
```bash
@@ -180,7 +182,7 @@ npx codemod run @nodejs/fs-access-mode-constants
180182
+ fs.access('/path/to/file', fs.constants.R_OK | fs.constants.W_OK, callback);
181183
```
182184

183-
### `fs-truncate-to-ftruncate`
185+
### `fs-truncate-fd-deprecation`
184186

185187
The [`fs.truncate`](https://nodejs.org/api/fs.html#fs_fs_truncate_path_len_callback) function was deprecated ([DEP0081](https://nodejs.org/api/deprecations.html#DEP0081)) when used with a file descriptor. Use [`fs.ftruncate`](https://nodejs.org/api/fs.html#fs_fs_ftruncate_fd_len_callback) instead.
186188

@@ -252,7 +254,7 @@ const client = http2.connect("https://example.com");
252254

253255
### `process-assert-to-node-assert`
254256

255-
In Node.js v23 the [DEP0100](https://nodejs.org/api/deprecations.html#DEP0100) deprecation was grantted to End of Life, and `process.assert` was removed in favor of using the `assert` module directly. This codemod will help you replace any references to `process.assert` with the appropriate import of the `assert` module and usage of `assert()`.
257+
In Node.js v23 the [DEP0100](https://nodejs.org/api/deprecations.html#DEP0100) deprecation reached End-of-Life, and `process.assert` was removed in favor of using the `assert` module directly. This codemod will help you replace any references to `process.assert` with the appropriate import of the `assert` module and usage of `assert()`.
256258

257259
The source code for this codemod can be found in the [process-assert-to-node-assert directory](https://github.com/nodejs/userland-migrations/tree/main/recipes/process-assert-to-node-assert).
258260

@@ -272,7 +274,7 @@ npx codemod run @nodejs/process-assert-to-node-assert
272274

273275
#### Additional Notes
274276

275-
This codemod use [`fs` capability](https://docs.codemod.com/jssg/security) to read the `package.json` file and determine if the project is using ES modules or CommonJS. Based on this information, it adds the appropriate import statement for the `assert` module.
277+
This codemod uses the [`fs` capability](https://docs.codemod.com/jssg/security) to read the `package.json` file and determine if the project is using ES modules or CommonJS. Based on this information, it adds the appropriate import statement for the `assert` module.
276278

277279
### `tls-create-secure-pair-to-tls-socket`
278280

apps/site/redirects.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,10 @@
259259
{
260260
"source": "/:locale/blog/migrations/chalk-to-styletext",
261261
"destination": "/learn/userland-migrations/chalk-to-util-styletext"
262+
},
263+
{
264+
"source": "/code-and-learn-2026",
265+
"destination": "https://code-and-learn.nodejs.harperfabric.com/"
262266
}
263267
],
264268
"internal": []

0 commit comments

Comments
 (0)