} from '../babelUtils'
import { advancePositionWithClone, isSimpleIdentifier } from '../utils'
import {
- isGloballyWhitelisted,
+ isGloballyAllowed,
makeMap,
hasOwn,
isString,
if (isSimpleIdentifier(rawExp)) {
const isScopeVarReference = context.identifiers[rawExp]
- const isAllowedGlobal = isGloballyWhitelisted(rawExp)
+ const isAllowedGlobal = isGloballyAllowed(rawExp)
const isLiteral = isLiteralWhitelisted(rawExp)
if (!asParams && !isScopeVarReference && !isAllowedGlobal && !isLiteral) {
// const bindings exposed from setup can be skipped for patching but
function canPrefix(id: Identifier) {
// skip whitelisted globals
- if (isGloballyWhitelisted(id.name)) {
+ if (isGloballyAllowed(id.name)) {
return false
}
// special case for webpack compilation
import {
EMPTY_OBJ,
hasOwn,
- isGloballyWhitelisted,
+ isGloballyAllowed,
NOOP,
extend,
isString,
return PublicInstanceProxyHandlers.get!(target, key, target)
},
has(_: ComponentRenderContext, key: string) {
- const has = key[0] !== '_' && !isGloballyWhitelisted(key)
+ const has = key[0] !== '_' && !isGloballyAllowed(key)
if (__DEV__ && !has && PublicInstanceProxyHandlers.has!(_, key)) {
warn(
`Property ${JSON.stringify(
import { makeMap } from './makeMap'
-const GLOBALS_WHITE_LISTED =
+const GLOBALS_ALLOWED =
'Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,' +
'decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,' +
'Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console'
-export const isGloballyWhitelisted = /*#__PURE__*/ makeMap(GLOBALS_WHITE_LISTED)
+export const isGloballyAllowed = /*#__PURE__*/ makeMap(GLOBALS_ALLOWED)
export * from './patchFlags'
export * from './shapeFlags'
export * from './slotFlags'
-export * from './globalsWhitelist'
+export * from './globalsAllowList'
export * from './codeframe'
export * from './normalizeProp'
export * from './domTagConfig'