-
Notifications
You must be signed in to change notification settings - Fork 6
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
Autoreport detected issues to offending repositories #34
Comments
Glad you like the tool! I'm not sure I understand your question correctly, do you have an example of how it would be used? It's not really possible for clean-modules to determine whether or not removing a file breaks the dependency or not 💭 |
Sorry for the misunderstanding. The first paragraph was solely about my great experience with the tool, not a request in any shape or form! My question was more around a specific functionality: I would imagine that |
The idea sounds cool ... but:
GitHub does not have a draft ticket concept; only draft PRs. https://docs.github.com/en/rest/issues/issues?apiVersion=2022-11-28#create-an-issue Not every NPM package uses GitHub. Blindly opening issues would lead to spam and I would wager that a lot of repo owners do not want spam/duplicate issues. One possibility would be to just list bugs fields. Something akin to Either with a new command or as an additional (optional) field in [
{
"filePath": "/private/tmp/v/node_modules/abort-controller/LICENSE",
"bugUrl": "https://github.com/mysticatea/abort-controller/issues",
"includedByDefault": true,
"includedByGlobs": [
{
"original": "licen@(s|c)e",
"derived": "/private/tmp/v/node_modules/**/licen@(s|c)e"
}
]
},
...
{
"filePath": "/private/tmp/v/node_modules/no-bugs-set/LICENSE",
"bugUrl": null,
"includedByDefault": true,
"includedByGlobs": [
{
"original": "licen@(s|c)e",
"derived": "/private/tmp/v/node_modules/**/licen@(s|c)e"
}
]
},
... $ clean-modules bug-urls --only-urls
https://github.com/some-owner/some-repo/issues
https://gitlab.com/some-owner/some-repo/-/issues
$ clean-modules bug-urls
https://github.com/some-owner/some-repo/issues
Something to paste into the issue template
--
https://gitlab.com/some-owner/some-repo/-/issues
Something to paste into the issue template
$ clean-modules bug-urls --json
[
{
"packageName": "some-package",
"bugsUrl": "https://github.com/some-owner/some-repo/issues",
"bugText": "Something to paste into the issue template"
},
{
"packageName": "some-other-package",
"bugsUrl": "https://gitlab.com/some-owner/some-repo/-/issues",
"bugText": "Something to paste into the issue template"
},
] If one is using a good terminal application one can click on the URLs in the output. |
Yeah, my idea definitely wasn't well-thought-out! Including the bugs URL by default in the |
How about changing the output of {
"node_modules/.pnpm/[email protected]/node_modules/chai": {
"package": {
"name": "chai",
"version": "5.1.1",
"repository": {
"type": "git",
"url": "https://github.com/chaijs/chai"
},
"homepage": "http://chaijs.com",
"bugs": {
"url": "https://github.com/chaijs/chai/issues"
}
},
"files": [
{
"filePath": "/Users/daniel/Projects/private/clean-modules/node_modules/.pnpm/[email protected]/node_modules/chai/CODE_OF_CONDUCT.md",
"includedByDefault": true,
"includedByGlobs": [
{
"original": "*.@(md|mkd|markdown|mdown)",
"derived": "/Users/daniel/Projects/private/clean-modules/node_modules/**/*.@(md|mkd|markdown|mdown)"
}
]
}
]
},
"node_modules/.pnpm/[email protected]/node_modules/check-error": {
"package": {
"name": "check-error",
"version": "2.1.1",
"repository": {
"type": "git",
"url": "git+ssh://[email protected]/chaijs/check-error.git"
}
},
"files": [
{
"filePath": "/Users/daniel/Projects/private/clean-modules/node_modules/.pnpm/[email protected]/node_modules/check-error/LICENSE",
"includedByDefault": true,
"includedByGlobs": [
{
"original": "licen@(s|c)e",
"derived": "/Users/daniel/Projects/private/clean-modules/node_modules/**/licen@(s|c)e"
}
]
}
]
}
} Then it would avoid repeating the bugs URL for each file and make it a bit easier to overview. The flat file output could still be kept around behind a |
Sounds good. That would be a breaking api change though… |
Yeah, I guess the other way around and adding |
First of all, this is an amazing tool! It broke my Sveltekit application due to some commands for the dev server being dependent on
*.md
files, but it did what it's supposed to (removed 100+ MB) and worked without any issues.I generated a
clean-modules-result.json
and would probably start reporting issues to GitHub repos, but then had the idea that there must be some way to do this automatically. At least for findings with 100% certainty that they shouldn't be innode_modules
e.g.coverage
or test files.Did you consider this yet?
The text was updated successfully, but these errors were encountered: