Skip to content

Missing well-known globals#3582

Merged
jugglinmike merged 2 commits intojshint:mainfrom
acarstoiu:master
Dec 27, 2021
Merged

Missing well-known globals#3582
jugglinmike merged 2 commits intojshint:mainfrom
acarstoiu:master

Conversation

@acarstoiu
Copy link
Copy Markdown
Contributor

@acarstoiu acarstoiu commented Nov 14, 2021

Hello,

I have no idea why this hasn't been noticed before, but some well-known globals are missing from vars.js. Here's what I've added:

  • BigInt for ES 11
  • Intl for node
  • specify and it's counterpart xspecify for mocha
  • URLSearchParams for browser and node

This change is really easy to merge and I'm looking forward to seeing it in the next release.

BigInt for ES 11
Intl for node
specify, xspecify for mocha
URLSearchParams for browser and node
@coveralls
Copy link
Copy Markdown

coveralls commented Nov 14, 2021

Coverage Status

Coverage remained the same at 100.0% when pulling 15c66bb on acarstoiu:master into 057b1c6 on jshint:master.

@jugglinmike jugglinmike merged commit cc1adf6 into jshint:main Dec 27, 2021
@jugglinmike
Copy link
Copy Markdown
Member

Thanks!

setImmediate : true, // v0.9.1+
clearImmediate : true, // v0.9.1+
URL : true, // v6.13.0+
URLSearchParams: true // v6.13.0+
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not that it matters too much, but URLSearchParams was introduced in v10.0.0+

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Damn, I really checked the history section of URLSearchParams. I saw it was introduced in v6.13.0, but didn't notice that it became a global variable only in v10.0.0.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@coolaj86 Accurate documentation matters plenty! Thanks for checking our work :) Fixed via commit 06accfa

@acarstoiu
Copy link
Copy Markdown
Contributor Author

acarstoiu commented Dec 30, 2021

⚠️ There's a problem: I've just tested with the latest release 2.13.2 and in spite of these lines

  11: {
    BigInt             : false
  }

it does not work, BigInt is reported as "not defined" ❌

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.

4 participants