huntabyte / shadcn-svelte

shadcn/ui, but for Svelte. ✨
https://shadcn-svelte.com
MIT License
4.13k stars 259 forks source link

deprecation warning in reset script for playgrounds #1067

Closed Carlos-err406 closed 3 weeks ago

Carlos-err406 commented 4 weeks ago

Describe the bug

seems like fs.rmdir(path, { recursive: true }) is deprecated

replacing it for fs.rm(path, { recursive: true }) fixes it

Reproduction

go to any playground in /apps/

run the init command pnpm scn init

run the reset command pnpm run reset

Logs

pnpm run reset

> playground-ts@0.0.1 reset /home/omen/shadcn-svelte/apps/playground-ts
> node ./reset.js

(node:28377) [DEP0147] DeprecationWarning: In future versions of Node.js, fs.rmdir(path, { recursive: true }) will be removed. Use fs.rm(path, { recursive: true }) instead
(Use `node --trace-deprecation ...` to show where the warning was created)

System Info

System:
    OS: Linux 5.15 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)
    CPU: (16) x64 AMD Ryzen 7 6800H with Radeon Graphics
    Memory: 8.44 GB / 15.23 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 20.12.2 - ~/.nvm/versions/node/v20.12.2/bin/node
    npm: 10.5.0 - ~/.nvm/versions/node/v20.12.2/bin/npm
    pnpm: 9.0.6 - ~/.local/share/pnpm/pnpm
  npmPackages:
    @sveltejs/kit: ^2.5.2 => 2.5.2 
    lucide-svelte: ^0.378.0 => 0.378.0 
    mode-watcher: ^0.3.0 => 0.3.0 
    shadcn-svelte: workspace:^ => 0.10.4 
    svelte: ^4.2.12 => 4.2.12 
    svelte-sonner: ^0.3.22 => 0.3.22

Severity

annoyance

Carlos-err406 commented 4 weeks ago

I'd be glad to open a pr for this if wanted