CLI features to better analyze your app #62567
stephanrotolante
started this conversation in
Ideas
Replies: 2 comments 2 replies
-
Hi, You can use https://www.npmjs.com/package/dependency-cruiser to map out and even apply rules to how imports/exports should behave. There's also ESLINT rules for that, https://eslint.org/docs/latest/rules/no-restricted-imports. I think the dependency-cruiser people also made this tool, https://www.npmjs.com/package/watskeburt which can show, changed stuff, and direct and indirectly affected modules: |
Beta Was this translation helpful? Give feedback.
1 reply
-
I checked your project out and I think it's awesome 😎 ! Good stuff! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Goals
Background
I have worked on NextJS apps where QA teams are wasting valuable time doing full regression test for flows that are not affected by the new feature work. This time could be better spent focused on testing the flows were directly affected by the newly introduced code. With that knowledge teams could stream line their whole UAT process. Potentially change the way they ship code.
Using Typescript or JSDoc are great ways to migrate risk when ensuring no build errors; however this isn't a 100% guarantee that your app will work at runtime, as these static checks can be fooled + values aren't guaranteed in JS land.
Another way to migrate risk is a proper automated testing strategy; whether that is unit, integration, or e2e flows. Not all devs team can implement that or have a mature enough flow for it
I am not sure if there already exists a tool to do a file dependency check of each nextjs page, but I built a little poc.
Proposal
I wrote a little POC of doing the dependency check:
https://github.com/stephanrotolante/scout
It would be nice to integrate something this into the nextjs cli. I think dev teams would greatly benefit
Beta Was this translation helpful? Give feedback.
All reactions