1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-21 23:04:45 -05:00
denoland-deno/runtime/js
Leo Kettmeir b4aa153097
refactor: Use ES modules for internal runtime code (#17648)
This PR refactors all internal js files (except core) to be written as
ES modules.
`__bootstrap`has been mostly replaced with static imports in form in
`internal:[path to file from repo root]`.
To specify if files are ESM, an `esm` method has been added to
`Extension`, similar to the `js` method.
A new ModuleLoader called `InternalModuleLoader` has been added to
enable the loading of internal specifiers, which is used in all
situations except when a snapshot is only loaded, and not a new one is
created from it.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-02-07 20:22:46 +01:00
..
01_build.js refactor: Use ES modules for internal runtime code (#17648) 2023-02-07 20:22:46 +01:00
01_errors.js refactor: Use ES modules for internal runtime code (#17648) 2023-02-07 20:22:46 +01:00
01_version.js refactor: Use ES modules for internal runtime code (#17648) 2023-02-07 20:22:46 +01:00
06_util.js refactor: Use ES modules for internal runtime code (#17648) 2023-02-07 20:22:46 +01:00
10_permissions.js refactor: Use ES modules for internal runtime code (#17648) 2023-02-07 20:22:46 +01:00
11_workers.js refactor: Use ES modules for internal runtime code (#17648) 2023-02-07 20:22:46 +01:00
12_io.js refactor: Use ES modules for internal runtime code (#17648) 2023-02-07 20:22:46 +01:00
13_buffer.js refactor: Use ES modules for internal runtime code (#17648) 2023-02-07 20:22:46 +01:00
30_fs.js refactor: Use ES modules for internal runtime code (#17648) 2023-02-07 20:22:46 +01:00
30_os.js refactor: Use ES modules for internal runtime code (#17648) 2023-02-07 20:22:46 +01:00
40_diagnostics.js refactor: Use ES modules for internal runtime code (#17648) 2023-02-07 20:22:46 +01:00
40_files.js refactor: Use ES modules for internal runtime code (#17648) 2023-02-07 20:22:46 +01:00
40_fs_events.js refactor: Use ES modules for internal runtime code (#17648) 2023-02-07 20:22:46 +01:00
40_http.js refactor: Use ES modules for internal runtime code (#17648) 2023-02-07 20:22:46 +01:00
40_process.js refactor: Use ES modules for internal runtime code (#17648) 2023-02-07 20:22:46 +01:00
40_read_file.js refactor: Use ES modules for internal runtime code (#17648) 2023-02-07 20:22:46 +01:00
40_signals.js refactor: Use ES modules for internal runtime code (#17648) 2023-02-07 20:22:46 +01:00
40_spawn.js refactor: Use ES modules for internal runtime code (#17648) 2023-02-07 20:22:46 +01:00
40_tty.js refactor: Use ES modules for internal runtime code (#17648) 2023-02-07 20:22:46 +01:00
40_write_file.js refactor: Use ES modules for internal runtime code (#17648) 2023-02-07 20:22:46 +01:00
41_prompt.js refactor: Use ES modules for internal runtime code (#17648) 2023-02-07 20:22:46 +01:00
90_deno_ns.js refactor: Use ES modules for internal runtime code (#17648) 2023-02-07 20:22:46 +01:00
98_global_scope.js refactor: Use ES modules for internal runtime code (#17648) 2023-02-07 20:22:46 +01:00
99_main.js refactor: Use ES modules for internal runtime code (#17648) 2023-02-07 20:22:46 +01:00
README.md feat: add --location=<href> and globalThis.location (#7369) 2021-01-07 19:06:08 +01:00

Runtime JavaScript Code

This directory contains Deno runtime code written in plain JavaScript.

Each file is a plain, old script, not ES modules. The reason is that snapshotting ES modules is much harder, especially if one needs to manipulate global scope (like in case of Deno).

Each file is prefixed with a number, telling in which order scripts should be loaded into V8 isolate. This is temporary solution and we're striving not to require specific order (though it's not 100% obvious if that's feasible).

Deno Web APIs

This directory facilities Web APIs that are available in Deno.

Please note, that some implementations might not be completely aligned with specification.

Some Web APIs are using ops under the hood, eg. console, performance.

Implemented Web APIs