Skip to content
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

[CY-2470] How are we meant to keep our dependency versions in sync with yours? #639

Closed
dwjohnston opened this issue Aug 3, 2020 · 4 comments
Labels
jira-issue Issue tracked on JIRA

Comments

@dwjohnston
Copy link

dwjohnston commented Aug 3, 2020

As I understand it:

  • We have to use the exact versions of eslint dependencies that you are, and those are the versions that are maintained in this repo.

The issue I have is - how do we keep up with dependency updates?

For example, you have issues like this one: : import-js/eslint-plugin-import#1760

Where a patch update to eslint-plugin-import causes a breaking change.

You can imagine if Codacity updates this dependency and we don't then the build pipeline fails, but only on Codaciy, and we have to go through working out what's going wrong.

One possible option that we do something like add codacity-eslint and dev dependency to our project, and make sure we update it each time in the pipeline. That way we have all of the eslint plugins at whatever version in our code base? Is that purpose of this package?

The other thing I'm wondering about - what if we are using some kind of internal custom eslint plugins - then codacity wouldn't have access to those. This is simply a use case that codacity doesn't support?

@github-actions github-actions bot changed the title How are we meant to keep our dependency versions in sync with yours? [CY-2470] How are we meant to keep our dependency versions in sync with yours? Aug 3, 2020
@github-actions
Copy link

github-actions bot commented Aug 3, 2020

Internal ticket created : CY-2470

@machadoit
Copy link
Member

machadoit commented Aug 3, 2020

This repository is a wrapper to be able to run ESLint completely isolated on Codacy side with all the dependencies installed.
We aim to have this repository updated as most as possible, and unfortunately that may cause breaking changes.

There is no easy way to guarantee the same versions at the moment, you can however consider using our CLI that will run with the same version of plugins that Codacy does (not however, that the CLI can also take some time to update, so it can also be not ideal for your use case).

Also, regarding custom eslint plugins, you are correct, they are not supported by Codacy.

We will be making some efforts in the future that can hopefully help on your use case, but unfortunately at the moment we don't have a great solution that fits perfectly on your use case.

@machadoit machadoit added the jira-issue Issue tracked on JIRA label Aug 3, 2020
@dwjohnston
Copy link
Author

@machadoit Can I suggest creating a new NPM repo, something like codacy-eslint-dependencies that contains just the various ESlint/prettier/eslint plugins that are you are using here, install that as a dependency in this project?

That way we can do the same thing, and then we'd be using the same versions.

It would be mean that we would be installing a bunch of dependencies that we don't need, but given that for us they are dev dependencies only, I don't think that should matter.

I would also suggest requiring them at fixed, rather than ^versions - as, as pointed out in the eslint-plugin-import issues even patch updates can have different behavior between versions.

@machadoit
Copy link
Member

Thanks for your suggestions! I updated the ticket internally added to community feedback so we can think about it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira-issue Issue tracked on JIRA
Projects
None yet
Development

No branches or pull requests

2 participants