You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The source code for this codemod can be found in the [util-print-to-console-log directory](https://github.com/nodejs/userland-migrations/tree/main/recipes/util-print-to-console-log).
53
+
54
+
### Registry Link
55
+
56
+
You can find this codemod in the [Codemod Registry](https://app.codemod.com/registry/@nodejs/util-print-to-console-log).
Copy file name to clipboardExpand all lines: apps/site/pages/en/blog/migrations/v14-to-v16.mdx
+38-5Lines changed: 38 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
date: '2025-09-26T12:00:00.000Z'
2
+
date: '2025-10-10T12:00:00.000Z'
3
3
category: migrations
4
4
title: Node.js v14 to v16
5
5
layout: blog-post
@@ -8,10 +8,11 @@ author: AugustinMauroy
8
8
9
9
# Node.js v14 to v16
10
10
11
-
<AlertBox
12
-
level="warning"
13
-
title="This article cover a part of the migration from Node.js v14 to v16. The userland migrations team is working on more codemods to help you with the migration."
14
-
/>
11
+
<AlertBoxlevel="warning"title="!">
12
+
This article cover a part of the migration from Node.js v14 to v16. The
13
+
userland migrations team is working on more codemods to help you with the
14
+
migration.
15
+
</AlertBox>
15
16
16
17
This page provides a list of codemods to help you migrate your code from Node.js v14 to v16.
The source code for this codemod can be found in the [create-require-from-path directory](https://github.com/nodejs/userland-migrations/tree/main/recipes/create-require-from-path).
46
+
47
+
### Registry Link
48
+
49
+
You can find this codemod in the [Codemod Registry](https://app.codemod.com/registry/@nodejs/create-require-from-path).
50
+
42
51
## `process-main-module`
43
52
44
53
The `process.mainModule` property was deprecated in favor of `require.main`. This codemod will help you replace the old `process.mainModule` usage with the new `require.main` usage.
@@ -67,6 +76,14 @@ if (require.main === 'mod.js') {
67
76
}
68
77
```
69
78
79
+
### Source Code
80
+
81
+
The source code for this codemod can be found in the [process-main-module directory](https://github.com/nodejs/userland-migrations/tree/main/recipes/process-main-module).
82
+
83
+
### Registry Link
84
+
85
+
You can find this codemod in the [Codemod Registry](https://app.codemod.com/registry/@nodejs/process-main-module).
86
+
70
87
## `process-mainModule-to-require-main`
71
88
72
89
The [`process.mainModule`](https://nodejs.org/api/process.html#process_process_mainmodule) property was deprecated ([DEP0144](https://nodejs.org/api/deprecations.html#DEP0144)) in favor of [`require.main`](https://nodejs.org/api/modules.html#modules_accessing_the_main_module). This codemod replaces calls of the deprecated property with the modern alternative mentioned.
The source code for this codemod can be found in the [rmdir directory](https://github.com/nodejs/userland-migrations/tree/main/recipes/rmdir).
146
+
147
+
### Registry Link
148
+
149
+
You can find this codemod in the [Codemod Registry](https://app.codemod.com/registry/@nodejs/rmdir).
150
+
126
151
## `tmpDir-to-tmpdir`
127
152
128
153
The `tmpDir` function was renamed to `tmpdir` in Node.js v16. This codemod will help you replace all instances of `tmpDir` with `tmpdir`.
@@ -146,3 +171,11 @@ import { tmpdir } from 'node:os';
146
171
147
172
constfoo=tmpdir();
148
173
```
174
+
175
+
### Source Code
176
+
177
+
The source code for this codemod can be found in the [tmpdir-to-tmpdir directory](https://github.com/nodejs/userland-migrations/tree/main/recipes/tmpdir-to-tmpdir).
178
+
179
+
### Registry Link
180
+
181
+
You can find this codemod in the [Codemod Registry](https://app.codemod.com/registry/@nodejs/tmpDir-to-tmpdir).
importjsonDatafrom'./data.json' with { type: 'json' };
39
39
```
40
+
41
+
### Source Code
42
+
43
+
The source code for this codemod can be found in the [import-assertions-to-attributes directory](https://github.com/nodejs/userland-migrations/tree/main/recipes/import-assertions-to-attributes).
44
+
45
+
### Registry Link
46
+
47
+
You can find this codemod in the [Codemod Registry](https://app.codemod.com/registry/@nodejs/import-assertions-to-attributes).
Copy file name to clipboardExpand all lines: apps/site/pages/en/blog/migrations/v22-to-v24.mdx
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
date: '2025-09-26T12:00:00.000Z'
2
+
date: '2025-10-10T12:00:00.000Z'
3
3
category: migrations
4
4
title: Node.js v22 to v24
5
5
layout: blog-post
@@ -157,3 +157,11 @@ crypto.generateKeyPair(
157
157
}
158
158
);
159
159
```
160
+
161
+
### Source Code
162
+
163
+
The source code for this codemod can be found in the [crypto-rsa-pss-update directory](https://github.com/nodejs/userland-migrations/tree/main/recipes/crypto-rsa-pss-update).
164
+
165
+
### Registry Link
166
+
167
+
You can find this codemod in the [Codemod Registry](https://app.codemod.com/registry/@nodejs/crypto-rsa-pss-update).
The [Codemod registry](https://codemod.link/nodejs-official) provides a list of available codemods for Node.js.
43
43
Some codemods may not be included in the following resources but are still available because they are not related to a specific migration to a Node.js version. Since we only list codemods for EoL deprecations, you may need to explore the registry for other codemods that could be useful for your migrations.
44
44
45
+
> Please note that if you are logged into the Codemod platform, you can like these posts. This shows us that our work is valuable.
46
+
45
47
## Feedback
46
48
47
49
If you have any feedback or suggestions for improvements, please open an issue on the [Node.js Userland Migrations repository](https://github.com/nodejs/userland-migrations/issues).
- Status (backlog, todo, in progress, done, not planned) _If you want to contribute, please check the "todo" column_
60
+
61
+
## Migrations guides
62
+
63
+
You can find all migrations guide on the [migration guides section](/blog/migrations).
64
+
65
+
Please also note that migration guides for major-major releases only contain end-of-life [deprecations](https://nodejs.org/docs/latest/api/deprecations.html) and breaking changes.
0 commit comments