-
-
Notifications
You must be signed in to change notification settings - Fork 298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
List files in a less verbose way by auto-grouping them #690
Comments
I found an implementation which turns this:
Into this:
The heuristic is that we create groups with a maximum depth of
So yes, it's not folders, but "groups". A file can be a "group" in this implementation. I think that files near the root of the project are more important to have an idea of the shape of the project, compared to files that are deeper than 3 levels. And we would collapse a group when its number of files is greater than Of course, those magic numbers (maximum depth of |
Should it also check the "glob" made by this grouping doesn’t match a file that will be published? E.g. with a naive implementation:
I’m not sure if it matters, since the latter list will list the file explicitly anyway. I’m just worried that someone might get confused that a
|
I think that a depth of
I think grouping or not grouping |
Exactly, the order and the wording should be enough IMO.
Good point. To be precise, what you described in this example is a depth of
I'm just afraid that by grouping published files, we would make the feature of "showing new files that will be published for the first time" useless. Example: What if among the 10 files in In this case, either I would notice the "10 files" and would really want to know what's going to be published → in this case I'd need to check myself, so we lost a cool feature of Or I don't notice it and as a result, I may have I leaked credentials. That's why I wanted to provide a way to disable grouping in some way, and the |
Looking back on this, I think the "new published" files should be exhaustively listed. For most cases it shouldn't be too verbose, and if it is we can find ways to mitigate it in the future. Related, I think we can decide on Would you want to make a draft PR with your implementation? |
@tommy-mitchell yes, I'll do this next week-end |
Description
Having an exhaustive list of files isn't always interesting, especially when it gets too verbose.
Is the feature request related to a problem?
cf. #681 (comment)
Possible implementation
Currently, in those 2 cases all files are exhaustively listed with
util.joinList()
:np/source/ui.js
Lines 95 to 102 in eba203f
I think the 2nd case
The following new files will be published for the first time
is far more important than the 1st one because those files will end up in a package.So IMO, only the files of the 1st case
The following new files will not be part of your published package
should be auto-grouped if necessary.Alternatives
Or maybe both of the 2 cases should have auto-grouping. But the dry run would disable auto-grouping and show all the files?
The text was updated successfully, but these errors were encountered: