
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.
A high-precision, drift-free 'delay-no-more' clock engine designed to maintain atomic accuracy under extreme main-thread rendering loads.
A high-precision, drift-free clock engine designed to maintain atomic accuracy under extreme main-thread rendering loads. Designed for React 18/19.
h:mm:ss -> 1:15:09m:ss -> 5:00s -> 60countDirection="DOWN".0 using stopAtZero={true}.autoStart={true}.In standard React applications, timers rely on the Main Thread. This is the same thread responsible for:
If any of these tasks take too long (e.g., a complex render or a heavy calculation), the Event Loop blocks. setInterval and requestAnimationFrame are delayed. This results in visual stutter, time drift, and "janky" broadcast graphics.
This Proof of Concept implements a Dual-Thread Architecture:
performance.now() for monotonic, high-resolution time measurement independent of system clock skew.OffscreenCanvas to paint the clock pixels directly from the worker thread.clock.worker.ts)The worker utilises a highly optimised render loop designed to generate zero garbage collection (GC) pauses during runtime.
requestAnimationFrame loop.The application includes a suite of tools designed to break standard React timers:
while() loop on the main thread, simulating heavy data parsing or crypto operations.This library relies on OffscreenCanvas and Web Workers.
| Browser | Version |
|---|---|
| Chrome / Edge | 69+ |
| Firefox | 105+ |
| Safari | 16.4+ |
npm install
npm run dev
import { DNMClock } from 'dnm-clock';
<DNMClock
initialSeconds={60}
countDirection="DOWN"
stopAtZero={true}
autoStart={true}
config={{
timeFormat: 'm:ss', // Displays "1:00" -> "0:59"
textColor: '#ff0000',
fontFamily: 'monospace'
}}
/>
START button. Both the "DNM Clock" (Top) and "Naive Clock" (Bottom) will begin counting.This project maintains 100% Test Coverage, including the Worker environment and OffscreenCanvas logic.
npm test
src/
├── components/
│ ├── DNMClock.tsx # The "Hero" component (Canvas + Worker glue)
│ ├── NaiveClock.tsx # The "Control" group (Standard React State)
│ ├── CpuStressTest.tsx # Main thread blocker
│ └── RenderLagSimulator.tsx # DOM thrashing tool
├── workers/
│ ├── clock.worker.ts # The actual Engine (Canvas painting logic)
│ └── timer.worker.ts # Legacy simple ticker (reference)
└── hooks/
└── useBroadcastMatchTimer.ts # Headless hook implementation
(Now - StartTime) + BaseTime on every frame. This makes it mathematically impossible for the timer to drift due to skipped frames.BaseTime and resets the StartTime anchor instantly, preserving sub-millisecond precision.useSyncExternalStore patterns and imperative Ref management to handle the non-React Worker lifecycle safely.MIT
FAQs
A high-precision, drift-free 'delay-no-more' clock engine designed to maintain atomic accuracy under extreme main-thread rendering loads.
We found that dnm-clock 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.