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
Copy file name to clipboardExpand all lines: apps/site/pages/en/blog/migrations/v22-to-v24.mdx
+5-55Lines changed: 5 additions & 55 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,7 +81,7 @@ You can find this codemod in the [Codemod Registry](https://app.codemod.com/regi
81
81
npx codemod run @nodejs/crypto-rsa-pss-update
82
82
```
83
83
84
-
#### Example:
84
+
#### Example
85
85
86
86
```js displayName="Before"
87
87
constcrypto=require('node:crypto');
@@ -181,7 +181,7 @@ You can find this codemod in the [Codemod Registry](https://app.codemod.com/regi
181
181
npx codemod run @nodejs/fs-access-mode-constants
182
182
```
183
183
184
-
#### Example:
184
+
#### Example
185
185
186
186
```js displayName="Before"
187
187
constfs=require('node:fs');
@@ -209,7 +209,7 @@ You can find this codemod in the [Codemod Registry](https://app.codemod.com/regi
209
209
npx codemod run @nodejs/fs-truncate-fd-deprecation
210
210
```
211
211
212
-
#### Example:
212
+
#### Example
213
213
214
214
```js displayName="Before"
215
215
const { truncate, open, close } =require('node:fs');
@@ -247,7 +247,7 @@ You can find this codemod in the [Codemod Registry](https://app.codemod.com/regi
247
247
npx codemod run @nodejs/process-assert-to-node-assert
248
248
```
249
249
250
-
## Example
250
+
####Example
251
251
252
252
```js displayName="Before"
253
253
process.assert(condition, 'Assertion failed');
@@ -258,56 +258,6 @@ import assert from 'node:assert';
258
258
assert(condition, 'Assertion failed');
259
259
```
260
260
261
-
## Additional Notes
261
+
####Additional Notes
262
262
263
263
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.
264
-
265
-
#### `dirent-path-to-parent-path`
266
-
267
-
This codemod transforms the usage of `dirent.path` to use `dirent.parentPath`.
268
-
269
-
See [DEP0178](https://nodejs.org/api/deprecations.html#DEP0178).
270
-
271
-
You can find this codemod in the [Codemod Registry](https://app.codemod.com/registry/@nodejs/dirent-path-to-parent-path).
272
-
273
-
```bash
274
-
npx codemod run @nodejs/dirent-path-to-parent-path
0 commit comments