Nnodejs

nodejs/process-assert-to-node-assert

Handle DEP0100 via transforming `process.assert` to `node:assert`.

transformationmigration
Public
0 downloads
1 stars
How to Use
Run this codemod on your codebase using one of the following commands

The easiest way to run this codemod without installing anything globally:

Documentation

process.assert to node:assert DEP0100

This recipe transforms the usage of process.assert to use node:assert module.

See DEP0100.

Example

Before:

js

After:

js

Additional Notes

This codemod use fs capability 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.

Ready to contribute?

Build your own codemod and share it with the community.