-
Notifications
You must be signed in to change notification settings - Fork 120
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
chore(deps): Remove unused dependencies #415
base: master
Are you sure you want to change the base?
Conversation
@@ -38,17 +38,12 @@ | |||
"commander": "^13.1.0", | |||
"link-check": "^5.4.0", | |||
"markdown-link-extractor": "^4.0.2", | |||
"needle": "^3.3.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only found that xmlbuilder2 is not used in this project. The others are used https://github.com/tcort/markdown-link-check/blob/master/markdown-link-check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will double check later.
I was running the following after removing each to check for no apparent change in behaviour...
rm -rf package-lock.json node_modules && npm install && npm run test && ./markdown-link-check --verbose --progress test
I think this is perhaps adding to the case for more comprehensive test coverage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just had a look to the package-lock.json and for example the removal of needle works because this package is also needed by the link-check dependency
markdown-link-check/package-lock.json
Line 2238 in cca7acb
"needle": "^3.3.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forgot about the extensionless markdown-link-check
file and filtered by .js
extension when searching the code 🙄
Probably should explicitly include needle
as we use it directly. Same for proxy-agent
.
I have restored them.
"eslint": "^9.14.0", | ||
"expect.js": "^0.3.1", | ||
"express": "^4.21.1", | ||
"globals": "^15.12.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
used in
markdown-link-check/eslint.config.mjs
Line 4 in f6bc588
export default [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that comes with eslint/eslintrc
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
markdown-link-check/eslint.config.mjs
Line 2 in f6bc588
import globals from "globals"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
}, | ||
"devDependencies": { | ||
"@eslint/js": "^9.14.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used
markdown-link-check/eslint.config.mjs
Line 1 in f6bc588
import js from "@eslint/js"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now it is, but it's also recommended to separately install it as part of the docs https://eslint.org/docs/latest/use/getting-started#manual-set-up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I've added that back.
"eslint": "^9.14.0", | ||
"expect.js": "^0.3.1", | ||
"express": "^4.21.1", | ||
"globals": "^15.12.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
markdown-link-check/eslint.config.mjs
Line 2 in f6bc588
import globals from "globals"; |
It occurred to me that we could reduced security risk by removing unused dependencies...
Some of those were false positives because, like Stryker, depcheck does not check markdown-link-check because it has no file extension.