This recipe transforms the usage ofDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/nodejs/userland-migrations/llms.txt
Use this file to discover all available pages before exploring further.
fs.truncate() to fs.ftruncate() when a file descriptor is used instead of a file path.
Deprecation
Node.js deprecated usingfs.truncate() with a file descriptor argument. Use fs.ftruncate() instead when working with file descriptors.
See DEP0081 for more details.
Usage
Run this codemod with:Before/After
What It Does
- Replaces
truncatewithftruncatewhen imported fromnode:fsorfs - Updates function calls from
truncate(fd, ...)toftruncate(fd, ...) - Applies to callback, synchronous, and promise-based APIs