denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
97.81k stars 5.38k forks source link

suggestion: check for circular dependencies in `deno publish --dry-run` #23599

Open iuioiua opened 6 months ago

iuioiua commented 6 months ago

Currently, deno publish checks for circular dependencies between packages within the same workspace project. It'd be nice if deno publish --dry-run did this too. In std, we compensate for this lack of functionality in deno publish --dry-run by using our own circular dependencies check. image

alexgleason commented 3 weeks ago

Why limit it to deno publish? I would like to check for circular imports in my CI and fail the pipeline if any are found. I think making it a rule in deno lint would be really awesome, if that's possible. Or if not, maybe something like deno graph --circular src

(I tried using madge but it's outdated and not designed for Deno.)