Registry / observability / rollup-timer

rollup-timer

JSON →
library0.3.4jsnpmunverified

Times Rollup plugins by monkey-patching plugin API functions. Version 0.3.4 is stable with no recent updates; it works with Rollup <1 and is incompatible with rollup-plugin-commonjs. Differentiator: simple drop-in timing for Rollup builds, with support for both promise and stream-based rollup invocations.

npm install rollup-timer
INSTALL
IMPORT
SIG · ROLLUP-TIMER
R
rollup-timer
observabilityjavascriptv0.3.4
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

time
import time from 'rollup-timer'
const time = require('rollup-timer')
Default export is the time() function; CommonJS require returns the module object, not the function directly.
RollupTimer
import { RollupTimer } from 'rollup-timer'
import RollupTimer from 'rollup-timer'
RollupTimer is a named export, not default.
time (named import)
import * as timer from 'rollup-timer'; timer.default()
import { time } from 'rollup-timer'
There is no named export 'time'; using named import incorrectly yields undefined.

Monkey-patches Rollup to time plugin execution and outputs timing information.

const rollup = require('rollup'); const time = require('rollup-timer').default; time(rollup); const options = { input: 'src/index.js', plugins: [] }; rollup.rollup(options).then(bundle => bundle.write({ file: 'dist/bundle.js' })).catch(err => console.error(err));
Debug
Known issues
gotcharollup-timer is incompatible with rollup-plugin-commonjs; timings for that plugin will be incomplete.
fix
Avoid using rollup-timer with rollup-plugin-commonjs, or expect inaccurate timing data.
affects: >=0.0.0
deprecatedThe package monkey-patches internal Rollup API and may break with future Rollup versions. Last updated for Rollup 0.x; not tested with Rollup 1+.
fix
Consider using Rollup's built-in timing support or other profiling tools.
affects: >=0.0.0
gotchaPlugin 'name' property required for readable reports; if a plugin lacks name, the report falls back to numeric index.
fix
Ensure plugins provide a 'name' property; submit PRs to plugin authors if missing.
affects: >=0.0.0
Errors
Common errors & fixes
TypeError: (0 , _rollupTimer2.default) is not a function
Using named import 'time' instead of default import.
fix
Use 'import time from 'rollup-timer''
time is not a function
Incorrectly importing as named export or using CommonJS without .default.
fix
Use 'const time = require('rollup-timer').default'
Upgrade
Version history
0.3.4latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
21 hits · last 30 days
node
18
OpenAI (training)
2
Resources
rollup-timer — npm install rollup-timer · libregistry