Documentation 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.
This recipe transforms tmpDir function calls to tmpdir to handle Node.js DEP0022.
What It Does
This codemod updates:
- Function calls from
tmpDir() to tmpdir()
- Import/require statements to use the correct function name
Before/After
Before:import { tmpDir } from 'node:os';
const foo = tmpDir();
After:import { tmpdir } from 'node:os';
const foo = tmpdir();
Before:const { tmpDir } = require('node:os');
const foo = tmpDir();
After:const { tmpdir } = require('node:os');
const foo = tmpdir();
Usage
Run this codemod on your project:
npx codemod node/userland/tmpdir-to-tmpdir
This is a simple naming change where tmpDir() (with capital ‘D’) was deprecated in favor of the lowercase tmpdir() to maintain consistency with Node.js naming conventions.