Skip to content

Upgrade to Ajv version 8 #13888

Closed
Closed

Description

@epoberezkin

The version of ESLint you are using.

7.14

The problem you want to solve.

Migrate eslint to Ajv version 7 at the time it is released in December as the main version, to ensure that the users migrating to Ajv v7 and using eslint (that depends on Ajv version 6) do not have any version conflicts.

Your take on the correct solution to problem.

Upgrade in eslint:

  • Ajv and other related dependencies versions (e.g. ajv-keywords)
  • any Ajv API/options changes
  • JSON Schema to draft-07 - Ajv v7 removed support for draft-04 (which is 4 versions old), the change logs are here: https://github.com/ajv-validator/ajv/releases

My concern that any plugins that rely on JSON Schema draft-04 specific features may need to be upgraded too, but nothing has been reported so far; although not too many users started using Ajv v7 beta, it is growing judging by ajv-formats downloads that was split from Ajv in v7: https://www.npmjs.com/package/ajv-formats

Either way, it most likely should be a major version change in eslint too to avoid any issues for the users - do you agree?

I am planning a release candidate version 7.0.0-rc.0 some time next week, and the main version release within a couple of weeks this year; I think I should make a PR to eslint once 7.0.0-rc.0 is released.

Let me know if you have any concerns / comments / questions

Are you willing to submit a pull request to implement this change?

Yes

Activity

  1. added
    coreRelates to ESLint's core APIs and features
    enhancementThis change enhances an existing feature of ESLint
    triageAn ESLint team member will look at this issue soon
    on Nov 28, 2020
  2. aladdin-add commented on Nov 30, 2020

    @aladdin-add
    Member

    Either way, it most likely should be a major version change in eslint too to avoid any issues for the users - do you agree?

    would it be possible to release in a minor version (if no breaking changes introduced 😄 )? -- it will take a long while before releasing a major version, as we are working on some big features (e.g. #13481).

  3. added
    evaluatingThe team will evaluate this issue to decide whether it meets the criteria for inclusion
    and removed
    triageAn ESLint team member will look at this issue soon
    on Nov 30, 2020
  4. epoberezkin commented on Dec 1, 2020

    @epoberezkin
    Author

    @aladdin-add thank you. There shouldn’t be any breaking changes in eslint for the end users, but I’m not sure how configuration validation implemented in plugins - do they do it independently or do they depend on eslint? I’ll probably see it as I do the PR - but if the latter they may need to be upgraded too - that’s why I thought it might have to be a major version... I will comment as I make some progress.

  5. eslint-deprecated commented on Jan 1, 2021

    @eslint-deprecated

    Unfortunately, it looks like there wasn't enough interest from the team
    or community to implement this change. While we wish we'd be able to
    accommodate everyone's requests, we do need to prioritize. We've found
    that issues failing to reach accepted status after 21 days tend to
    never be accepted, and as such, we close those issues.
    This doesn't mean the idea isn't interesting or useful, just that it's
    not something the team can commit to.

    Thanks for contributing to ESLint and we appreciate your understanding.

  6. self-assigned this
    on Jan 5, 2021
  7. 20 remaining items

  8. removed
    breakingThis change is backwards-incompatible
    on May 19, 2021
  9. btmills commented on May 19, 2021

    @btmills
    Member

    Now that this doesn't have to be a breaking change anymore, I've removed the "breaking" label and removed this issue from the v8.0.0 project so that we can land it whenever it's ready. @epoberezkin thanks for your work on ajv and figuring out how to eliminate breakage in ESLint's plugin ecosystem!

  10. epoberezkin commented on May 19, 2021

    @epoberezkin
    Author

    You're welcome! I will probably release ajv 8.5 and the draft-04 support by the ajv event tomorrow (a promotion :) - will mention it then.

  11. epoberezkin commented on May 20, 2021

    @epoberezkin
    Author

    Draft-04 support is released: https://github.com/ajv-validator/ajv-draft-04 (it'll be 1.0.0 when it lands here).

    Will update this PR over the weekend.

  12. added
    breakingThis change is backwards-incompatible
    on Jun 3, 2021
  13. mdjermanovic commented on Jul 1, 2021

    @mdjermanovic
    Member

    In today's TSC meeting, we have decided to stay on Ajv 6.

    The additional validations in Ajv 8 are a very nice feature, but Ajv 8 brings many other changes and it's difficult to predict the overall impact on the ESLint ecosystem of plugins.

    As for the maintenance concerns, Ajv 6 seems very stable and works perfectly well for ESLint's use case. ESLint has been using Ajv 6 for years and we've never had any Ajv-related issues.

    For all these reasons, we have come to the conclusion that in this case risks outweigh the benefits, so I'm closing this issue per the TSC decision.

  14. fisker commented on Aug 8, 2021

    @fisker
    SponsorContributor
  15. locked and limited conversation to collaborators on Dec 29, 2021
  16. moved this to Complete in Triageon Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

acceptedThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionbreakingThis change is backwards-incompatiblecoreRelates to ESLint's core APIs and featuresenhancementThis change enhances an existing feature of ESLint

Type

No type

Projects

  • Status
    Complete

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions