tinybench icon indicating copy to clipboard operation
tinybench copied to clipboard

Circular dependency

Open sirenkovladd opened this issue 2 years ago • 4 comments

https://github.com/tinylibs/tinybench/blob/v2.5.0/src/bench.ts#L11

https://github.com/tinylibs/tinybench/blob/v2.5.0/src/task.ts#L4

I suggest leaving only the import Task in the branch

After approval, I can create a PR (with backward compatibility, of course, as far as possible)

sirenkovladd avatar Sep 11 '23 22:09 sirenkovladd

Can you elaborate on what you are suggesting? But yeah, circular dependencies should be avoided

kibertoad avatar Sep 14 '23 12:09 kibertoad

in Task to receive an interface with the necessary parameters and implement this interface in Bench

sirenkovladd avatar Sep 14 '23 12:09 sirenkovladd

and make deprecated https://github.com/tinylibs/tinybench/blob/v2.5.1/src/task.ts#L19

and next step, (maybe in v3.0.0) remove this column

sirenkovladd avatar Sep 14 '23 12:09 sirenkovladd