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

fix: allow pre-releases of ESLint 9 #206

Closed
wants to merge 1 commit into from
Closed

Conversation

voxpelli
Copy link
Member

Fixes #183, but with the caveats mentioned in npm/rfcs#397 (comment) :

  1. It may automatically install a pre-release
  2. It only allows pre-releases of 9.0.0, not of eg. 9.0.1 or 10.0.0, making it an ever moving target

I think the automatic installation of a pre-release is less of an issue for this module than for eg eslint-community/eslint-plugin-n#197 as @eslint-community/eslint-utils is never installed by an end-user directly, only indirectly through other plugins.

For eg eslint-plugin-n it may be a deal breaker

@voxpelli voxpelli requested a review from a team March 10, 2024 14:02
@voxpelli voxpelli self-assigned this Mar 10, 2024
voxpelli added a commit to eslint-community/eslint-plugin-n that referenced this pull request Mar 10, 2024
voxpelli added a commit to eslint-community/eslint-plugin-n that referenced this pull request Mar 10, 2024
Copy link
Member

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to make a pull request to the beta branch to release it as a beta version.
However, before that, we may need to recreate the beta branch.

@voxpelli
Copy link
Member Author

@ota-meshi I think this can be merged and released in stable, shouldn't be an issue for eslint-utils?

@ota-meshi
Copy link
Member

Hmmm. I am not sure about that. I would think that anything that works with a non-stable version is not a stable version.

@voxpelli
Copy link
Member Author

Depends on what the intention of >=8.0.0 is, if it is meant to say:

We we will work with all future stable versions

Or if it is to say:

We we will work with all future versions

Sadly npm have no way to express the latter (see npm/rfcs#397), hence why this workaround is needed if the latter is what we want to convey, and that's what I think we should convey.

We should never claim to be incompatible with a future release unless we know to be incompatible, as that causes the issues that eg @fisker sees in #183

@ota-meshi
Copy link
Member

Hmm. However, I'm still not sure. eslint-plugin-unicorn (pull request) also does not include 9.0.0-0 in peerDependencies. Why does only eslint-utils need to include 9.0.0-0?

https://github.com/sindresorhus/eslint-plugin-unicorn/pull/2250/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R102

@voxpelli
Copy link
Member Author

Do you have a better solution before something like npm/rfcs#397 arrives and allows for peer dependency ranges to match all future version rather than just stable future versions?

Would of course be great to get @fisker's point of view on this solution as well, but since eslint-utils is a dependency of many plugins it makes sense that it does the first move in enabling ESLint 9 pre-releases

@voxpelli
Copy link
Member Author

I did request guidance from ESLint itself here: eslint/eslint#18093 (comment)

Maybe I should promote that into an issue on its own

@fisker
Copy link

fisker commented Mar 19, 2024

eslint-plugin-unicorn (pull request) also does not include 9.0.0-0 in peerDependencies. Why does only eslint-utils need to include 9.0.0-0?

I don't think they are the same, peerDependencies will be used when install eslint-plugin-unicorn, eslint can be installed because it's in devDependencies, and it's peerDependencies (if there are) can be satisfied, but @eslint-community/eslint-utils's peerDependencies are not.

I'm pretty sure if we release/install eslint-plugin-unicorn directly with that PR, eslint-plugin-unicorn can't be installed either.

@fisker
Copy link

fisker commented Mar 19, 2024

A reminder: npm publish --tag XXX can also
release a version from local if you have npm access.

@ota-meshi
Copy link
Member

@fisker Are you in favor of releasing eslint-utils as a beta version?

I think we have a workflow that allows us to pre-release using the beta branch.

{name: 'beta', prerelease: true},

@fisker
Copy link

fisker commented Mar 20, 2024

Are you in favor of releasing eslint-utils as a beta version?

Just need a version, not really care the number.

Copy link
Member

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since eslint-utils is a dependency of many plugins it makes sense that it does the first move in enabling ESLint 9 pre-releases

I agree with you on that. I think it would be better to pre-release eslint-utils if possible, but I'm not strongly stick to it.

@harryzcy
Copy link

harryzcy commented Apr 5, 2024

From #183 (comment)

It looks like ESLint 9 is released, so matching pre-releases is no longer necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support ESLint 9
4 participants