Socket
Book a DemoInstallSign in
Socket

@vltpkg/rollback-remove

Package Overview
Dependencies
Maintainers
0
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vltpkg/rollback-remove

Mark paths as removed, then remove them or roll back

latest
Source
npmnpm
Version
1.0.0-rc.13
Version published
Maintainers
0
Created
Source

rollback-remove

@vltpkg/rollback-remove

A utility for removing stuff, in such a way that the removal can be rolled back on failure, or confirmed and executed in a detached background process.

Usage

The best way to use this is to not catch errors, but detect failure in a finally block and either confirm or roll back appropriately.

import { RollbackRemove } from '@vltpkg/rollback-remove'

const remover = new RollbackRemove()

let success = false
try {
  await remover.rm('some/path')
  doSomethingThatMayThrow()
  remover.confirm()
  success = true
} finally {
  if (!success) await remover.rollback()
}

FAQs

Package last updated on 19 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts