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

tests: add tests for Node 17 and 19 #707

Merged
merged 3 commits into from
Jan 5, 2023
Merged

tests: add tests for Node 17 and 19 #707

merged 3 commits into from
Jan 5, 2023

Conversation

Belco90
Copy link
Member

@Belco90 Belco90 commented Dec 23, 2022

Checks

Changes

  • Add support for Node v19
  • Adjust Node matrix in CI to run it over most recent version

Context

n/a

@Belco90 Belco90 requested a review from a team December 23, 2022 17:19
@Belco90 Belco90 self-assigned this Dec 23, 2022
@@ -54,7 +54,8 @@ jobs:

strategy:
matrix:
node: [12.22.0, 12, 14.17.0, 14, '16.0', 16, '18.0', 18]
# The .x indicates "the most recent one"
node: [19.x, 18.x, 17.x, 16.x, 14.x, '14.17.0', 12.x, '12.22.0']
Copy link
Member Author

Choose a reason for hiding this comment

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

We only needed 14.17.0 and 12.22.0 because they are the min ones from ESLint. All remaining majors can be checked against the most recent one.

Copy link
Member

Choose a reason for hiding this comment

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

A couple of remarks:

  • There's no need to add the x, as just the number will already take the most recent one.
  • Also no need to put numbers in quotes if you have a specific patch version
  • Node 16.0.0 is a minimum version as well
  • Node 17 is EOL
Suggested change
node: [19.x, 18.x, 17.x, 16.x, 14.x, '14.17.0', 12.x, '12.22.0']
node: [12.22.0, 12, 14.17.0, 14, 16.0.0, 16, 18, 19]

Copy link
Member Author

@Belco90 Belco90 Dec 23, 2022

Choose a reason for hiding this comment

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

  • There's no need to add the x, as just the number will already take the most recent one.

Yep, but it makes it more explicit. It's confusing to see just 19 in there.

  • Also no need to put numbers in quotes if you have a specific patch version

Good point! Removed for consistency.

  • Node 16.0.0 is a minimum version as well

Not sure what this means. We are supporting the whole range for v16, v17, v18 and v19, hence testing only the latest version for simplicity. But we are supporting a restricted range for v12 and v14, hence resting both the min and the most recent version. This was inspired by ESLint CI itself.

  • Node 17 is EOL

It is indeed, but by the versions indicated in our package.json we were already providing compatibility. I'm just adding tests here to make it official and sync CI with the indicated engines. I won't drop v17 since that would be a breaking change.

Copy link
Member

Choose a reason for hiding this comment

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

But we are supporting a restricted range for v12 and v14, hence resting both the min and the most recent version

v16.0.0 is also necessary to test, as otherwise we won't know if it's failing or not (just like we do with v12 & v14)

I won't drop v17

Odd numbered Node versions shouldn't be used by the public, it's only meant for library maintainers to tests if everything is still going to work in next even major updates
We shouldn't actively support them, but also not necessary to exclude them in our engines (for now) until ESLint does so imo

Copy link
Member Author

Choose a reason for hiding this comment

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

v16.0.0 is also necessary to test, as otherwise we won't know if it's failing or not (just like we do with v12 & v14)

I don't agree. Otherwise we would have to test every single minor and patch of node versions. We only want the min one for v12 and v14 for the mentioned reasons. We can keep it simple for other majos and just test the recent one as ESLint does.

Odd numbered Node versions shouldn't be used by the public, it's only meant for library maintainers to tests if everything is still going to work in next even major updates

We shouldn't actively support them, but also not necessary to exclude them in our engines (for now) until ESLint does so imo

The point is our plugin is flagged right now as compatible with v17. I'm just adding tests for it, that's it.

Copy link
Member

Choose a reason for hiding this comment

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

v16.0.0 is a minimum version, but I'm not going to spend my day convincing you of that 😅

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry I don't get it. My point was v16 is supported entirely, so we don't need to test it in both ends; any v16 is fine.

@MichaelDeBoey MichaelDeBoey changed the title feat: add support for Node v19 tests: add tests for Node 19 Dec 23, 2022
@Belco90 Belco90 changed the title tests: add tests for Node 19 tests: add tests for Node 17 and 19 Dec 23, 2022
@Belco90 Belco90 added the chore Changes that affect the build system, CI config or other changes that don't modify src/test files label Dec 27, 2022
@Belco90 Belco90 merged commit 137dc26 into main Jan 5, 2023
@Belco90 Belco90 deleted the support_node_v19 branch January 5, 2023 18:22
@Belco90
Copy link
Member Author

Belco90 commented Jan 5, 2023

Merging after waiting for reviews for 2 weeks. I need to carry on with other tickets and I have little spare time.

@github-actions
Copy link

🎉 This PR is included in version 5.10.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link

github-actions bot commented Aug 5, 2023

🎉 This PR is included in version 6.0.0-alpha.15 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Changes that affect the build system, CI config or other changes that don't modify src/test files released on @alpha released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants