Skip to content

Commit

Permalink
[[FIX]] Add missing well-known globals (#3582)
Browse files Browse the repository at this point in the history
* Added some missing well-known globals

BigInt for ES 11
Intl for node
specify, xspecify for mocha

* Added another global variable

URLSearchParams for browser and node
  • Loading branch information
acarstoiu committed Dec 27, 2021
1 parent 057b1c6 commit cc1adf6
Showing 1 changed file with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions src/vars.js
Expand Up @@ -66,6 +66,9 @@ exports.ecmaIdentifiers = {
8: {
Atomics : false,
SharedArrayBuffer : false
},
11: {
BigInt : false
}
};

Expand Down Expand Up @@ -419,6 +422,7 @@ exports.browser = {
TimeEvent : false,
top : false,
URL : false,
URLSearchParams : false,
WebGLActiveInfo : false,
WebGLBuffer : false,
WebGLContextEvent : false,
Expand Down Expand Up @@ -505,21 +509,23 @@ exports.node = {
global : false,
module : false,
require : false,
Intl : false,

// These globals are writeable because Node allows the following
// usage pattern: var Buffer = require("buffer").Buffer;

Buffer : true,
console : true,
exports : true,
process : true,
setTimeout : true,
clearTimeout : true,
setInterval : true,
clearInterval : true,
setImmediate : true, // v0.9.1+
clearImmediate: true, // v0.9.1+
URL : true // v6.13.0+
Buffer : true,
console : true,
exports : true,
process : true,
setTimeout : true,
clearTimeout : true,
setInterval : true,
clearInterval : true,
setImmediate : true, // v0.9.1+
clearImmediate : true, // v0.9.1+
URL : true, // v6.13.0+
URLSearchParams: true // v6.13.0+
};

exports.browserify = {
Expand Down Expand Up @@ -761,10 +767,12 @@ exports.mocha = {
// BDD
describe : false,
xdescribe : false,
it : false,
xit : false,
context : false,
xcontext : false,
it : false,
xit : false,
specify : false,
xspecify : false,
before : false,
after : false,
beforeEach : false,
Expand Down

1 comment on commit cc1adf6

@yahyyya1234
Copy link

Choose a reason for hiding this comment

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

nice one

Please sign in to comment.