You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ref(core): extract getCallingFile utility for plugins to share
The tinybench and benchmark.js plugins each carried their own
near-identical implementation of "what file called withCodSpeed()",
built on stack-trace + find-up + getGitDir to compute a path relative
to the enclosing git repository.
Move the helper into @codspeed/core (next to getGitDir, which it
already depends on), accept a `depth` argument to skip indirection
frames the way benchmark.js needs, and rewire both plugins to import
from core. Drop the now-redundant stack-trace dependency from each
plugin's package.json — it lives on core alone now.
The benchmark.js-plugin integ tests mock @codspeed/core wholesale; add
getCallingFile to the un-mocked names alongside getGitDir so the URI
derivation still works under test.
Refs COD-2721
Co-Authored-By: Claude <noreply@anthropic.com>
0 commit comments