-
Notifications
You must be signed in to change notification settings - Fork 174
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
update dependencies #380
update dependencies #380
Conversation
d38b22d
to
2ac73a1
Compare
- updated most dependencies to their latest version - didn't update to the last chalk version since it's in pure ESM - modified calls to cosmiconfig since it's API changed exposing different objects for sync and async calls - updated ignore to v5, and per the upgrade guide, I enabled relative paths manually. - fixed dependency versions to avoid unexpected changes in behaviour due to dependencies not respecting semver versioning
2ac73a1
to
b785614
Compare
This is great, thanks for taking the time with this. I think there are a couple of issues:
Was this motivated by a specific problem? It's generally much better to avoid pinning dependencies, and instead depend on a semver range. If a dependency or transitive dependency suddenly has a new security advisory and the fix is a new version, having the dependency declared as a semver range will let users get the new version without needing a new Solhint release. This will reduce the maintenance burden for you! Additionally, it allows installations to better deduplicate dependencies.
ESLint is used in |
This would've been caught by the e2e tests in the CI, but the PR was merged without running them: https://github.com/protofire/solhint/actions/runs/3951393216 If someone that is not part of the repository sends a pull request, the CI won't be run automatically. You need to click "Approve and run". It's not a good idea to merge a PR without checking that the CI passes. |
You're absolutely right |
sorry that I broke the e2e tests 🙃 I only just realized that they were there. I'll submit a PR fixing them and address the feedback tomorrow |
Not in this particular repository, but I've had it happen a few times. I can't
Okay, I'm semver-range-pilled, specially for the part of deduplicating dependencies.
AFAIK license-wise it's the same to copy-paste code into the repo than to use
that would be cool ✨ I peeked into the formatter's implementations and they If there's consensus, I could implement a PR which:
I planned to implement
however, I see that @dbale-altoros has uploaded #384 which both implements the |
I think this would be ideal! @dbale-altoros do you mind if we close #384 in favor of that? |
yes , sure let's do that @juanpcapurro @fvictorio beware that eslint changed fomaters path since version 6 so the solhint.js file requesting the formatters gives an error as frangio said (path is changed to the cli-engine folder in ver version 6 and 7.... in the latest i did nor search...) keep in mind that when working with eslint 5x, I had to downgrade some eslint dependences but since the commander package was updated to 10 e2e test did not pass. I downgraded commander package to the same as before and e2e are now ok in the #384 |
@juanpcapurro @fvictorio I will close #383 and #384 |
Yes, this sounds great! |
- copied the current version of eslint formatters into our codebase since they're no longer accesible from importing the `eslint` package (see discussions in protofire#380) for details - only imported those already supported, there are many other eslint formatters in the current eslint version (8.32.0) than there were in the one we were using previously (5.6.0) - dropped support for the table formatter since it was dropped from eslint in 86bb63b (I could get it back from a legacy version if anyone wants it) - made eslint a dev dependency to reduce install size, since it's only used for linting this codebase. - added some dependencies of the eslint formatters. Used 'old' strip-ansi version 6.0.1 which seems to still be maintained instead of 7.0.1 since from version 7 onwards it's a pure ESM package
- copied the current version of eslint formatters into our codebase since they're no longer accesible from importing the `eslint` package (see discussions in protofire#380) for details - only imported those already supported, there are many other eslint formatters in the current eslint version (8.32.0) than there were in the one we were using previously (5.6.0) - table formatter was dropped by the latest version of eslint, so I fetched it from 5.6.0 instead - while building this commit I realized it was possible to remove a formatter entirely and all existing tests would pass, so I created an issue for discussing that - made eslint a dev dependency to reduce install size, since it's only used for linting this codebase. - added some dependencies of the eslint formatters. Used 'old' strip-ansi version 6.0.1 which seems to still be maintained instead of 7.0.1 since from version 7 onwards it's a pure ESM package
- copied the current version of eslint formatters into our codebase since they're no longer accesible from importing the `eslint` package (see discussions in protofire#380) for details - only imported those already supported, there are many other eslint formatters in the current eslint version (8.32.0) than there were in the one we were using previously (5.6.0) - explicity attribute the formatters' authors and include ESLint's license file. - table formatter was dropped by the latest version of eslint, so I fetched it from 5.6.0 instead - while building this commit I realized it was possible to remove a formatter entirely and all existing tests would pass, so I created an issue for discussing that - made eslint a dev dependency to reduce install size, since it's only used for linting this codebase. - added some dependencies of the eslint formatters. Used 'old' strip-ansi version 6.0.1 which seems to still be maintained instead of 7.0.1 since from version 7 onwards it's a pure ESM package
- copied the current version of eslint formatters into our codebase since they're no longer accesible from importing the `eslint` package (see discussions in protofire/solhint#380) for details - only imported those already supported, there are many other eslint formatters in the current eslint version (8.32.0) than there were in the one we were using previously (5.6.0) - explicity attribute the formatters' authors and include ESLint's license file. - table formatter was dropped by the latest version of eslint, so I fetched it from 5.6.0 instead - while building this commit I realized it was possible to remove a formatter entirely and all existing tests would pass, so I created an issue for discussing that - made eslint a dev dependency to reduce install size, since it's only used for linting this codebase. - added some dependencies of the eslint formatters. Used 'old' strip-ansi version 6.0.1 which seems to still be maintained instead of 7.0.1 since from version 7 onwards it's a pure ESM package
to dependencies not respecting semver versioning