deno/cli
Kenta Moriuchi b2cd254c35
fix: strict type check for cross realms (#21669)
Deno v1.39 introduces `vm.runInNewContext`. This may cause problems when
using `Object.prototype.isPrototypeOf` to check built-in types.

```js
import vm from "node:vm";

const err = new Error();
const crossErr = vm.runInNewContext(`new Error()`);

console.assert( !(crossErr instanceof Error) );
console.assert( Object.getPrototypeOf(err) !== Object.getPrototypeOf(crossErr) );
```

This PR changes to check using internal slots solves them.

---

current: 

```
> import vm from "node:vm";
undefined
> vm.runInNewContext(`new Error("message")`)
Error {}
> vm.runInNewContext(`new Date("2018-12-10T02:26:59.002Z")`)
Date {}
```

this PR:

```
> import vm from "node:vm";
undefined
> vm.runInNewContext(`new Error("message")`)
Error: message
    at <anonymous>:1:1
> vm.runInNewContext(`new Date("2018-12-10T02:26:59.002Z")`)
2018-12-10T02:26:59.002Z
```

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-01-04 09:42:38 +05:30
..
args fix(cli): respect exclude option for deno check command (#21779) 2024-01-03 20:43:17 -05:00
bench chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
cache chore: update to Rust 1.75 (#21731) 2024-01-01 23:22:48 +01:00
js fix: strict type check for cross realms (#21669) 2024-01-04 09:42:38 +05:30
lsp fix(lsp): support test code lens for Deno.test.{ignore,only}() (#21775) 2024-01-03 16:34:21 +00:00
napi chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
npm chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
ops chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
schemas feat: precompile JSX (#20962) 2023-11-01 20:30:23 +00:00
standalone chore: upgrade deno_core to 0.241.0 (#21765) 2024-01-03 01:34:41 +00:00
tests fix: strict type check for cross realms (#21669) 2024-01-04 09:42:38 +05:30
tools fix(jupyter): error message when install fails due to jupyter command not being on PATH (#21767) 2024-01-03 14:45:10 +00:00
tsc chore: update to Rust 1.75 (#21731) 2024-01-01 23:22:48 +01:00
util chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
auth_tokens.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
build.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
Cargo.toml Revert "fix(runtime): Make native modal keyboard interaction consistent with browsers" (#21739) 2024-01-02 09:36:05 +05:30
cdp.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
deno.ico
deno_std.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
emit.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
entitlements.plist chore: start codesigning mac release builds (#21303) 2023-11-23 15:30:26 -07:00
errors.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
factory.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
file_fetcher.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
graph_util.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
http_util.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
js.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
main.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
module_loader.rs fix(cli): respect exclude option for deno check command (#21779) 2024-01-03 20:43:17 -05:00
node.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
README.md
resolver.rs fix(unstable/byonm): support using an import map with byonm (#21786) 2024-01-04 09:20:58 +05:30
version.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
worker.rs chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00

Deno CLI Crate

crates

This provides the actual deno executable and the user-facing APIs.

The deno crate uses the deno_core to provide the executable.