Skip to content

feat: handle fs.rmdir(path, { recursive: true }) deprecation #104

@AugustinMauroy

Description

@AugustinMauroy

Description

Since fs.rmdir(path, { recursive: true }) is deprecated in Node.js v16.0.0, we should provide a codemod to replace it.

Examples

Before:

// Using fs.rmdir with the recursive option
fs.rmdir(path, { recursive: true }, callback);

// Using fs.rmdirSync with the recursive option
fs.rmdirSync(path, { recursive: true });

// Using fs.promises.rmdir with the recursive option
fs.promises.rmdir(path, { recursive: true });

After:

// Using fs.rm with recursive and force options
fs.rm(path, { recursive: true, force: true }, callback);

// Using fs.rmSync with recursive and force options
fs.rmSync(path, { recursive: true, force: true });

// Using fs.promises.rm with recursive and force options
fs.promises.rm(path, { recursive: true, force: true });

REFS

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    🏗 In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions