SIGN IN SIGN UP
denoland / deno UNCLAIMED

A modern runtime for JavaScript and TypeScript.

0 0 16 Rust

fix(npm): clean node_modules after deno remove (#34110)

Fixes denoland/deno#34073.

This updates the local npm installer cleanup path so `deno remove` can
reconcile an existing managed `node_modules` even when the updated npm
resolution has zero packages. It also cleans scoped package entries in
both isolated and hoisted layouts.

The regression spec now uses npm imports in `deno.json` with
`nodeModulesDir: "auto"`, removes a scoped package, then removes the
last package and checks `node_modules`, `deno.json`, and `deno.lock`.

---------

Co-authored-by: fibibot <fibibot@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
F
Fibi committed
81cdb683ba00bdbc948baf8315d93ed05f217df4
Parent: b46f9dd
Committed by GitHub <noreply@github.com> on 6/1/2026, 1:00:37 PM