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:
Bartek Iwańczuk 2020-09-17 18:09:50 +02:00 committed by GitHub
parent 3421f4dbbd
commit bda9379385
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 85 additions and 97 deletions

View file

@ -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);