mirror of
https://github.com/denoland/deno.git
synced 2024-11-27 16:10:57 -05:00
75209e12f1
This PR changes Node.js/npm compatibility layer to use polyfills for built-in Node.js embedded in the snapshot (that are coming from "ext/node" extension). As a result loading `std/node`, either from "https://deno.land/std@<latest>/" or from "DENO_NODE_COMPAT_URL" env variable were removed. All code that is imported via "npm:" specifiers now uses code embedded in the snapshot. Several fixes were applied to various modules in "ext/node" to make tests pass. --------- Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com> Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
10 lines
333 B
TypeScript
10 lines
333 B
TypeScript
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
|
|
|
const { ops } = globalThis.__bootstrap.core;
|
|
|
|
export type OSType = "windows" | "linux" | "darwin" | "freebsd";
|
|
|
|
export const osType: OSType = ops.op_node_build_os();
|
|
|
|
export const isWindows = osType === "windows";
|
|
export const isLinux = osType === "linux";
|