
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.
universal-tree
Advanced tools
NOTE: This is a WIP and not production ready yet
Tiny wrapper around Baobab for an OOTB universal state tree.
Create your universal tree
const tree = require('universal-tree')
const state = module.exports = tree({
colors: ['yellow', 'purple'],
name: 'Glorious colors'
})
Import and just use it on the client
const state = require('./state')
state.on('update', () => render())
And import and just use it on the server
const state = require('./state')
app.locals.state = state
app.get('/article', (req, res) => {
Article.find((err, article) => {
// IMPORTANT: Make sure to only update your state all at once, right before rendering
state.set({ title: article.title })
res.render('article')
})
})
Here in lies the big exprimental gamble. We're clearing the state tree out on every event loop tick when used on the server. Since Node's HTTP servers don't handle requests synchronously, we're hoping that's enough to ensure nothing weird happens. We're also turning off Baobab's persistence, immutability, and all that other client-side-useful stuff in hopes it's enough to make performance not dramatically suffer with this approach.
Please fork the project and submit a pull request with tests. Install node modules npm install and run tests with npm test.
MIT
FAQs
Tiny wrapper around Baobab for an OOTB universal state tree
We found that universal-tree demonstrated a not healthy version release cadence and project activity because the last version was released 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.