Gathering detailed insights and metrics for rollback
Gathering detailed insights and metrics for rollback
Gathering detailed insights and metrics for rollback
Gathering detailed insights and metrics for rollback
@wheatstalk/cdk-intrinsic-validator
Make deployments safer by adding intrinsic validation to your stacks
@vltpkg/rollback-remove
Mark paths as removed, then remove them or roll back
@kitsuyui/intended-rollback
Provide rollback for transactional operations
mcp-rollback-server
Production-ready MCP Rollback Server with HTTPS security, Cursor integration, and comprehensive CLI for managing rollback operations across multiple platforms
npm install rollback
Typescript
Module System
Min. Node Version
Node Version
NPM Version
TypeScript (97.39%)
JavaScript (2.61%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
4 Stars
370 Commits
1 Forks
2 Watchers
27 Branches
2 Contributors
Updated on Mar 04, 2023
Latest Version
0.2.16
Package Id
rollback@0.2.16
Unpacked Size
77.37 kB
Size
17.47 kB
File Count
26
NPM Version
6.14.4
Node Version
10.20.1
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Rollback the rock!
Undo pesky file system mutations with ease.
npm i -s rollback
Both typescript and javascript support come out of the box.
Take a snapshot of a directory.
1import { snapshot } from 'rollback'; 2import { writeFileSync } from 'fs'; 3 4snapshot({ 5 path: '/some/directory' 6}).then(snap => { 7 // make some changes 8 writeFileSync('/some/directory/myFile', 'some updates'); 9 // then rollback all the changes 10 return snap.rollback(); 11});
Take a snapshot of a file.
1import { snapshotFile } from 'rollback'; 2import { writeFileSync } from 'fs'; 3 4snapshotFile({ 5 path: '/some/file.txt' 6}).then(snap => { 7 // make some changes 8 writeFileSync('/some/file.txt', 'some updates'); 9 // then rollback all the changes 10 return snap.rollback(); 11});
Take a snapshot of a directory.
1import { snapshotSync } from 'rollback'; 2import { writeFileSync } from 'fs'; 3 4const snap = snapshotSync({ 5 path: '/some/directory' 6}); 7writeFileSync('/some/directory/myFile', 'some updates'); 8snap.rollbackSync();
Take a snapshot of a file.
1import { snapshotFileSync } from 'rollback'; 2import { writeFileSync } from 'fs'; 3 4const snap = snapshotFileSync({ 5 path: '/some/file.txt' 6}); 7writeFileSync('/some/file.txt', 'some updates'); 8snap.rollbackSync();
Rollback exposes four base methods: snapshot
, snapshotSync
, snapshotFile
, and snapshotFileSync
.
All methods accept all configuration options exposed by tmp.
Additionally the following options from fs-extra's copy are supported:
preserveTimestamps, filter, recursive
(recursive
is only supported for snapshot
and snapshotSync
)
snapshot
and snapshotFile
return a Promise which resolves with a Snapshot
object.
snapshotSync
and snapshotFileSync
return a Snapshot
directly.
A Snapshot
object has the following properties:
property | type | description |
---|---|---|
path | string | the path of the temporary directory |
cleanup | () => void | manually cleans up the temporary directory |
rollback | (options?: RollbackOptions) => Promise<void> | asynchronously rolls back any changes to the snapshot |
rollbackSync | (options?: RollbackOptions) => void | synchronously rolls back any changes to the snapshot |
RollbackOptions
takes the following form:
1interface RollbackOptions { 2 preserveTimestamps?: boolean; 3 recursive?: boolean; // only supported if the snapshot is of a directory 4}
The default for rollback options is whatever was specified in the snapshot
, snapshotSync
, snapshotFile
, or snapshotFileSync
invocation that generated the Snapshot
object.
Licensed under MIT
No vulnerabilities found.
Reason
security policy file detected
Details
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 13/14 approved changesets -- score normalized to 9
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
39 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-14
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More