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

test(versions): Restrict Node versions allowed in JavaScript category #4264

Closed
wants to merge 1 commit into from

Conversation

ExE-Boss
Copy link
Contributor

@ExE-Boss ExE-Boss commented Jun 7, 2019

This ensures that in the JavaScript category, only the Node release that introduced a new V8 version is allowed.

Caveats:

  • Node.js v8.5.0 introduced the ‑‑experimental‑modules flag, but didn’t ship a new V8 version, so it has to be special cased.
  • Node.js v13.0.0 completed I18n support and introduced experimental support for WeakRefs behind the ‑‑harmony‑weak‑refs flag, but didn’t ship a new V8 version, so it also has to be special cased.

I’ve also added the Node versions from #3160.

@ExE-Boss ExE-Boss requested a review from Elchi3 as a code owner June 7, 2019 19:45
@ExE-Boss ExE-Boss force-pushed the test/versions/nodejs-v8-engine branch from 17c5775 to 3c645b8 Compare June 7, 2019 19:48
@queengooborg queengooborg added the linter Issues or pull requests regarding the tests / linter of the JSON files. label Jun 7, 2019
@queengooborg
Copy link
Contributor

I haven't really looked too deep into this PR, but right off the bat, I can see that this includes some changes that are beyond the scope of the title, such as the addition of Node versions, and code styling changes that have no relevance or alteration in functionality. Can we make sure that we're cherry-picking changes into their own individual PRs?

@freaktechnik
Copy link
Contributor

The inclusion of the node versions was actually requested in #3160 (comment) to be in this change.

@queengooborg
Copy link
Contributor

Huh, that seems odd for them to request. Personally, I would expect two separate PRs -- one for the versions, and one for the test -- to get a better-looking commit log.

Regardless, there are the formatting alterations that I feel should be omitted, both since they don't change the functionality of the program and all the other tests follow along with the existing formatting style. Not that I'm against them in general, but it makes the git blame a little cleaner. 😛

@ExE-Boss
Copy link
Contributor Author

ExE-Boss commented Jun 7, 2019

I haven't really looked too deep into this PR, but right off the bat, I can see that this includes some changes that are beyond the scope of the title, such as the addition of Node versions, and code styling changes that have no relevance or alteration in functionality.

All code changes are required by this, eg. the addition of hasCategorySpecificData is needed to display a better error message for Node versions in the JavaScript category.

Similarly, I don’t want to re‑do the (slightly expensive) getValidBrowserVersions(…) call for every SimpleSupportStatement, so I cache the result at the first moment it’s required.

As for findSupport(…), that has to keep track of the category to allow the Node versions to be restricted in the JavaScript category.

@freaktechnik
Copy link
Contributor

Pretty sure the "code style changes" are a reference to the chalk coloring changes.

@Elchi3
Copy link
Member

Elchi3 commented Sep 5, 2019

This is really hard to review as it adds even more complexity to test-versions. I'd prefer if we first think about making test-versions less of a monolithic function and have tests for it. Otherwise, this will need an in-depth reviewing for both the new functionality and to make sure nothing is regressed.

@ddbeck
Copy link
Collaborator

ddbeck commented Sep 9, 2019

Another thought on this: can we break out the new Node.js data itself? #3160 has been blocked on that for some time.

@ghost ghost added the data:browsers Data about browsers (versions, release dates, etc). This data is used for validation. label Sep 19, 2019
@queengooborg queengooborg removed the data:browsers Data about browsers (versions, release dates, etc). This data is used for validation. label Oct 10, 2019
@ExE-Boss ExE-Boss force-pushed the test/versions/nodejs-v8-engine branch from 41d7df5 to 87f643d Compare September 17, 2020 23:35
  This ensures that in the JavaScript category, only the Node releases
which introduced a new V8 version are allowed.

- Node.js v8.5.0 introduced the `‑‑experimental‑modules` flag,
  but didn’t ship a new V8 version, so it has to be special cased.
- Node.js v13.0.0 completed I18n support and introduced experimental
  support for `WeakRef`s behind the `‑‑harmony‑weak‑refs` flag,
  but didn’t ship a new V8 version, so it also has to be special cased.
@ddbeck ddbeck self-assigned this Oct 27, 2020
@saschanaz
Copy link
Contributor

I don't think this is always valid, for example Node 14.8.0 didn't introduce a new V8 version but it did enable unflagged top level await. https://nodejs.org/en/blog/release/v14.8.0/

@Elchi3 Elchi3 removed their request for review February 18, 2021 17:17
Base automatically changed from master to main March 24, 2021 12:53
@ddbeck ddbeck self-requested a review as a code owner March 24, 2021 12:53
@ddbeck
Copy link
Collaborator

ddbeck commented May 19, 2021

This has been open a long time and seems to have never really come up as a data quality issue. Given #4264 (comment), this probably can't be enforced without continuing to monitor for exceptions, too. For both of those reasons, I'm going to close it. Nevertheless, thank you for your effort here!

@ddbeck ddbeck closed this May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linter Issues or pull requests regarding the tests / linter of the JSON files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants