
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
temporal-db
Advanced tools
A lightweight, versioned JSON database with branching, merging, and time-travel capabilities.
npm install temporal-db
// Initialize
const db = new TemporalDB();
await db.init();
// Save data
await db.commit('main', {
users: [{ id: 1, name: 'Alice' }],
settings: { theme: 'light' }
}, 'Initial commit');
// Get data
const data = await db.getData();
console.log(data);
// Initialize editor database
const db = new TemporalDB();
await db.init();
// Save initial document
await db.commit('main', {
title: 'My Document',
content: 'Hello world',
lastEdited: new Date().toISOString()
}, 'First draft');
// Make edits
async function saveChanges(newContent) {
const doc = await db.getData();
doc.content = newContent;
doc.lastEdited = new Date().toISOString();
await db.commit('main', doc, 'Updated content');
}
// View revision history
function getHistory() {
return db.getHistory('main');
}
// Restore old version
async function restoreVersion(timestamp) {
const oldDoc = await db.getDataAt('main', timestamp);
await db.commit('main', oldDoc, 'Restored old version');
return oldDoc;
}
// Create experimental branch
async function createExperiment() {
await db.branch('experiment', 'main');
await db.checkout('experiment');
// Try new formatting
const doc = await db.getData();
doc.content = doc.content.toUpperCase();
await db.commit('experiment', doc, 'ALL CAPS experiment');
}
// If experiment works, bring changes back to main
async function applyExperiment() {
await db.checkout('main');
await db.merge('experiment', 'main');
}
// Create a branch for experiments
await db.branch('experimental', 'main');
await db.checkout('experimental');
// Make changes on this branch only
const data = await db.getData();
data.settings.theme = 'dark';
await db.commit('experimental', data, 'Try dark theme');
// Go back to main branch
await db.checkout('main');
// Bring in changes from experimental branch
await db.merge('experimental', 'main');
// Get data from a specific time
const oldData = await db.getDataAt('main', '2023-04-01T12:00:00Z');
// See all your changes
const history = await db.getHistory('main');
db.init() – Start the databasedb.commit(branch, data, message) – Save data with a commit messagedb.getData() – Get current data statedb.branch(newBranch, source) – Create a new branch from sourcedb.checkout(branch) – Switch to a different branchdb.merge(source, target) – Merge source branch into targetdb.getDataAt(branch, time) – Retrieve data at a given timestampdb.getHistory(branch) – List commit history for a branchMIT
FAQs
Git-like versioning for application data
We found that temporal-db demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.