mirror of
https://github.com/denoland/deno.git
synced 2025-10-02 23:24:37 +00:00
refactor: move op_resources and op_close to deno_core (#7539)
Moves op_close and op_resources to deno_core::ops and exports them. Adds serde dependency to deno_core and reexports it. Moves JS implementation of those ops to Deno.core and reexports them in Deno.
This commit is contained in:
parent
3421f4dbbd
commit
bda9379385
20 changed files with 85 additions and 97 deletions
|
@ -1,13 +1,13 @@
|
|||
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
||||
|
||||
((window) => {
|
||||
const core = window.Deno.core;
|
||||
const { gray, green, italic, red, yellow } = window.__bootstrap.colors;
|
||||
const { exit } = window.__bootstrap.os;
|
||||
const { Console, inspectArgs } = window.__bootstrap.console;
|
||||
const { stdout } = window.__bootstrap.files;
|
||||
const { exposeForTest } = window.__bootstrap.internals;
|
||||
const { metrics } = window.__bootstrap.metrics;
|
||||
const { resources } = window.__bootstrap.resources;
|
||||
const { assert } = window.__bootstrap.util;
|
||||
|
||||
const disabledConsole = new Console(() => {});
|
||||
|
@ -64,9 +64,9 @@ finishing test case.`,
|
|||
fn,
|
||||
) {
|
||||
return async function resourceSanitizer() {
|
||||
const pre = resources();
|
||||
const pre = core.resources();
|
||||
await fn();
|
||||
const post = resources();
|
||||
const post = core.resources();
|
||||
|
||||
const preStr = JSON.stringify(pre, null, 2);
|
||||
const postStr = JSON.stringify(post, null, 2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue