mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 12:19:12 +00:00
refactor: remove Deno.core (#16881)
This commit removes "Deno.core" namespace. It is strictly private API that has no stability guarantees, we were supposed to remove it long time ago. Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
This commit is contained in:
parent
1084027d50
commit
abd9610530
43 changed files with 104 additions and 89 deletions
|
@ -485,8 +485,14 @@ delete Intl.v8BreakIterator;
|
|||
},
|
||||
});
|
||||
|
||||
const finalDenoNs = {
|
||||
// FIXME(bartlomieju): temporarily add whole `Deno.core` to
|
||||
// `Deno[Deno.internal]` namespace. It should be removed and only necessary
|
||||
// methods should be left there.
|
||||
ObjectAssign(internals, {
|
||||
core,
|
||||
});
|
||||
|
||||
const finalDenoNs = {
|
||||
internal: internalSymbol,
|
||||
[internalSymbol]: internals,
|
||||
resources: core.resources,
|
||||
|
@ -524,7 +530,6 @@ delete Intl.v8BreakIterator;
|
|||
// Setup `Deno` global - we're actually overriding already existing global
|
||||
// `Deno` with `Deno` namespace from "./deno.ts".
|
||||
ObjectDefineProperty(globalThis, "Deno", util.readOnly(finalDenoNs));
|
||||
ObjectFreeze(globalThis.Deno.core);
|
||||
|
||||
util.log("args", runtimeOptions.args);
|
||||
}
|
||||
|
@ -625,8 +630,14 @@ delete Intl.v8BreakIterator;
|
|||
},
|
||||
});
|
||||
|
||||
const finalDenoNs = {
|
||||
// FIXME(bartlomieju): temporarily add whole `Deno.core` to
|
||||
// `Deno[Deno.internal]` namespace. It should be removed and only necessary
|
||||
// methods should be left there.
|
||||
ObjectAssign(internals, {
|
||||
core,
|
||||
});
|
||||
|
||||
const finalDenoNs = {
|
||||
internal: internalSymbol,
|
||||
[internalSymbol]: internals,
|
||||
resources: core.resources,
|
||||
|
@ -660,7 +671,6 @@ delete Intl.v8BreakIterator;
|
|||
// Setup `Deno` global - we're actually overriding already
|
||||
// existing global `Deno` with `Deno` namespace from "./deno.ts".
|
||||
ObjectDefineProperty(globalThis, "Deno", util.readOnly(finalDenoNs));
|
||||
ObjectFreeze(globalThis.Deno.core);
|
||||
}
|
||||
|
||||
ObjectDefineProperties(globalThis, {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue