/
githubmirror
/
deno
Обзор
Документация
Войти
/
githubmirror
/
deno
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
tests/specs/remove/node_modules_cleanup/__test__.jsonc
42 строки
3 KB
Fibi
fix(npm): clean node_modules after deno remove (#34110)
01 июн 2026, 16:00
Не верифицирован
01 июн 2026, 16:00
81cdb68
Код
Авторство
О чём код?
{ "tempDir": true, "tests": { "remove_cleans_node_modules": { "steps": [ { "args": "install", "output": "[WILDCARD]" }, { "args": [ "eval", "const exists = (path) => { try { Deno.statSync(path); return true; } catch { return false; } }; const denoEntries = Array.from(Deno.readDirSync('node_modules/.deno')).filter(e => !e.name.startsWith('.')).map(e => e.name); console.log(JSON.stringify({ addCache: denoEntries.some(e => e.includes('@denotest+add@1.0.0')), chalkCache: denoEntries.some(e => e.includes('chalk@5.0.1')), addRoot: exists('node_modules/@denotest/add'), chalkRoot: exists('node_modules/chalk') }));" ], "output": "{\"addCache\":true,\"chalkCache\":true,\"addRoot\":true,\"chalkRoot\":true}\n" }, { "args": "remove add", "output": "[WILDCARD]" }, { "args": [ "eval", "const exists = (path) => { try { Deno.statSync(path); return true; } catch { return false; } }; const denoEntries = Array.from(Deno.readDirSync('node_modules/.deno')).filter(e => !e.name.startsWith('.')).map(e => e.name); console.log(JSON.stringify({ addCache: denoEntries.some(e => e.includes('@denotest+add@1.0.0')), chalkCache: denoEntries.some(e => e.includes('chalk@5.0.1')), addRoot: exists('node_modules/@denotest/add'), chalkRoot: exists('node_modules/chalk') }));" ], "output": "{\"addCache\":false,\"chalkCache\":true,\"addRoot\":false,\"chalkRoot\":true}\n" }, { "args": "remove chalk", "output": "[WILDCARD]" }, { "args": [ "eval", "const exists = (path) => { try { Deno.statSync(path); return true; } catch { return false; } }; const denoEntries = Array.from(Deno.readDirSync('node_modules/.deno')).filter(e => !e.name.startsWith('.')).map(e => e.name); const config = JSON.parse(Deno.readTextFileSync('deno.json')); const lock = JSON.parse(Deno.readTextFileSync('deno.lock')); console.log(JSON.stringify({ addCache: denoEntries.some(e => e.includes('@denotest+add@1.0.0')), chalkCache: denoEntries.some(e => e.includes('chalk@5.0.1')), addRoot: exists('node_modules/@denotest/add'), chalkRoot: exists('node_modules/chalk'), imports: config.imports ?? null, npm: lock.npm ?? null }));" ], "output": "{\"addCache\":false,\"chalkCache\":false,\"addRoot\":false,\"chalkRoot\":false,\"imports\":null,\"npm\":null}\n" } ] } } }