Skip to content

Commit

Permalink
Merge branch 'deprecate_node_compat_tests' of https://github.com/Moha…
Browse files Browse the repository at this point in the history
…mmadSu1/my_deno into deprecate_node_compat_tests
  • Loading branch information
MohammadSu1 committed Sep 12, 2024
2 parents c6d7538 + a9bf901 commit 1ab2f79
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ext/node/polyfills/console.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.

// TODO(petamoriken): enable prefer-primordials for node polyfills
// deno-lint-ignore-file prefer-primordials

import { primordials } from "ext:core/mod.js";
import { Console } from "ext:deno_node/internal/console/constructor.mjs";
import { windowOrWorkerGlobalScope } from "ext:runtime/98_global_scope_shared.js";
// Don't rely on global `console` because during bootstrapping, it is pointing
// to native `console` object provided by V8.
const console = windowOrWorkerGlobalScope.console.value;

Object.assign(console, { Console });
const { ObjectAssign } = primordials;

ObjectAssign(console, { Console });

export default console;

Expand Down

0 comments on commit 1ab2f79

Please sign in to comment.