1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-24 15:19:26 -05:00

fix(ext/node): add vm.constants (#25630)

This commit is contained in:
Divy Srivastava 2024-09-15 08:15:28 +05:30 committed by GitHub
parent 4655172c0b
commit db6fc12b9e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -27,7 +27,7 @@ import { ERR_INVALID_ARG_TYPE } from "ext:deno_node/internal/errors.ts";
import { primordials } from "ext:core/mod.js";
const { Symbol, ArrayPrototypeForEach } = primordials;
const { Symbol, ArrayPrototypeForEach, ObjectFreeze } = primordials;
const kParsingContext = Symbol("script parsing context");
@ -349,8 +349,22 @@ export function measureMemory(_options) {
notImplemented("measureMemory");
}
const USE_MAIN_CONTEXT_DEFAULT_LOADER = Symbol(
"USE_MAIN_CONTEXT_DEFAULT_LOADER",
);
const DONT_CONTEXTIFY = Symbol("DONT_CONTEXTIFY");
export const constants = {
__proto__: null,
USE_MAIN_CONTEXT_DEFAULT_LOADER,
DONT_CONTEXTIFY,
};
ObjectFreeze(constants);
export default {
Script,
constants,
createContext,
createScript,
runInContext,