mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
24bf1adacc
In case the exported module is a proxy that has the `getPrototypeOf` or `setPrototypeOf` trap, skip the circular dependencies check. It would otherwise be triggered by the check itself. Fixes: https://github.com/nodejs/node/issues/33334 Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de> PR-URL: https://github.com/nodejs/node/pull/33338 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>
18 lines
792 B
JavaScript
18 lines
792 B
JavaScript
module.exports = new Proxy({}, {
|
|
get(_target, prop) { throw new Error(`get: ${String(prop)}`); },
|
|
getPrototypeOf() { throw new Error('getPrototypeOf'); },
|
|
setPrototypeOf() { throw new Error('setPrototypeOf'); },
|
|
isExtensible() { throw new Error('isExtensible'); },
|
|
preventExtensions() { throw new Error('preventExtensions'); },
|
|
getOwnPropertyDescriptor() { throw new Error('getOwnPropertyDescriptor'); },
|
|
defineProperty() { throw new Error('defineProperty'); },
|
|
has() { throw new Error('has'); },
|
|
set() { throw new Error('set'); },
|
|
deleteProperty() { throw new Error('deleteProperty'); },
|
|
ownKeys() { throw new Error('ownKeys'); },
|
|
apply() { throw new Error('apply'); },
|
|
construct() { throw new Error('construct'); }
|
|
});
|
|
|
|
require('./warning-skip-proxy-traps-b.js');
|