mirror of
https://github.com/nodejs/node.git
synced 2026-12-06 08:18:52 -05:00
PR-URL: https://github.com/nodejs/node/pull/27670 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Refael Ackermann (רפאל פלחי) <refack@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
111 lines
2.3 KiB
JavaScript
111 lines
2.3 KiB
JavaScript
/**
|
|
* @fileoverview Defines environment settings and globals.
|
|
* @author Elan Shanker
|
|
*/
|
|
"use strict";
|
|
|
|
//------------------------------------------------------------------------------
|
|
// Requirements
|
|
//------------------------------------------------------------------------------
|
|
|
|
const globals = require("globals");
|
|
|
|
//------------------------------------------------------------------------------
|
|
// Public Interface
|
|
//------------------------------------------------------------------------------
|
|
|
|
/** @type {Map<string, import("../lib/shared/types").Environment>} */
|
|
module.exports = new Map(Object.entries({
|
|
builtin: {
|
|
globals: globals.es5
|
|
},
|
|
browser: {
|
|
globals: globals.browser
|
|
},
|
|
node: {
|
|
globals: globals.node,
|
|
parserOptions: {
|
|
ecmaFeatures: {
|
|
globalReturn: true
|
|
}
|
|
}
|
|
},
|
|
commonjs: {
|
|
globals: globals.commonjs,
|
|
parserOptions: {
|
|
ecmaFeatures: {
|
|
globalReturn: true
|
|
}
|
|
}
|
|
},
|
|
"shared-node-browser": {
|
|
globals: globals["shared-node-browser"]
|
|
},
|
|
worker: {
|
|
globals: globals.worker
|
|
},
|
|
amd: {
|
|
globals: globals.amd
|
|
},
|
|
mocha: {
|
|
globals: globals.mocha
|
|
},
|
|
jasmine: {
|
|
globals: globals.jasmine
|
|
},
|
|
jest: {
|
|
globals: globals.jest
|
|
},
|
|
phantomjs: {
|
|
globals: globals.phantomjs
|
|
},
|
|
jquery: {
|
|
globals: globals.jquery
|
|
},
|
|
qunit: {
|
|
globals: globals.qunit
|
|
},
|
|
prototypejs: {
|
|
globals: globals.prototypejs
|
|
},
|
|
shelljs: {
|
|
globals: globals.shelljs
|
|
},
|
|
meteor: {
|
|
globals: globals.meteor
|
|
},
|
|
mongo: {
|
|
globals: globals.mongo
|
|
},
|
|
protractor: {
|
|
globals: globals.protractor
|
|
},
|
|
applescript: {
|
|
globals: globals.applescript
|
|
},
|
|
nashorn: {
|
|
globals: globals.nashorn
|
|
},
|
|
serviceworker: {
|
|
globals: globals.serviceworker
|
|
},
|
|
atomtest: {
|
|
globals: globals.atomtest
|
|
},
|
|
embertest: {
|
|
globals: globals.embertest
|
|
},
|
|
webextensions: {
|
|
globals: globals.webextensions
|
|
},
|
|
es6: {
|
|
globals: globals.es2015,
|
|
parserOptions: {
|
|
ecmaVersion: 6
|
|
}
|
|
},
|
|
greasemonkey: {
|
|
globals: globals.greasemonkey
|
|
}
|
|
}));
|