1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 07:14:47 -05:00
A modern runtime for JavaScript and TypeScript. https://deno.com/
Find a file
Bartek Iwańczuk 9d63772fe5
refactor: rewrite TS dependency analysis in Rust (#5029)
This commit completely overhauls how module analysis is 
performed in TS compiler by moving the logic to Rust.

In the current setup module analysis is performed using 
"ts.preProcessFile" API in a special TS compiler worker 
running on a separate thread.

"ts.preProcessFile" allowed us to build a lot of functionality
in CLI including X-TypeScript-Types header support 
and @deno-types directive support. Unfortunately at the 
same time complexity of the ops required to perform 
supporting tasks exploded and caused some hidden 
permission escapes.

This PR introduces "ModuleGraphLoader" which can parse
source and load recursively all dependent source files; as 
well as declaration files. All dependencies used in TS 
compiler and now fetched and collected upfront in Rust 
before spinning up TS compiler.

To achieve feature parity with existing APIs this commit 
includes a lot of changes:

* add "ModuleGraphLoader"
  - can fetch local and remote sources
  - parses source code using SWC and extracts imports, exports, file references, special 
     headers
  - this struct inherited all of the hidden complexity and cruft from TS version and requires 
     several follow up PRs
* rewrite cli/tsc.rs to perform module analysis upfront and send all required source code to 
  TS worker in one message
* remove op_resolve_modules and op_fetch_source_files from cli/ops/compiler.rs
* run TS worker on the same thread
2020-05-18 12:59:29 +02:00
.cargo Statically link the C runtime library on Windows (#4469) 2020-03-23 20:31:29 +01:00
.github ci: don't fail-fast on tag build (#5189) 2020-05-10 12:39:27 -04:00
cli refactor: rewrite TS dependency analysis in Rust (#5029) 2020-05-18 12:59:29 +02:00
core Miscellaneous documentation and spelling improvements (#5527) 2020-05-17 19:24:39 +02:00
deno_typescript Fix typos across the repo (#5295) 2020-05-14 06:38:42 +02:00
docs Miscellaneous documentation and spelling improvements (#5527) 2020-05-17 19:24:39 +02:00
std docs(std): Fix typo (#5582) 2020-05-18 12:10:19 +02:00
test_plugin Change plugin interface to prevent segfaults when unloading plugin (#5210) 2020-05-11 22:39:13 +02:00
third_party@9ad53352a9 Update to TypeScript 3.9 (#4510) 2020-05-13 08:03:04 -04:00
tools Remove dead code: tools/sha256sum.py (#5502) 2020-05-16 20:37:41 +02:00
.editorconfig editorconfig: Don't insert final newline in .out files (#1686) 2019-02-07 11:31:49 -05:00
.eslintignore feat: dprint formatter (#3820) 2020-01-29 21:16:48 -05:00
.eslintrc.json Add no-async-promise-executor lint rule (#4809) 2020-04-20 11:29:37 +02:00
.gitattributes Upgrade node_modules, change tagline, clean up root directory (#3247) 2019-10-31 19:33:27 -07:00
.gitignore Statically link the C runtime library on Windows (#4469) 2020-03-23 20:31:29 +01:00
.gitmodules Replace libdeno with rusty_v8 (#3556) 2020-01-05 09:19:29 -05:00
.prettierignore Loader: support .wasm imports (#3328) 2019-11-14 08:31:39 -05:00
.prettierrc.json tools/format: format markdown files with prettier 2018-10-04 02:02:23 -07:00
.rustfmt.toml change copyrights from 2019 to 2020 (#3733) 2020-01-21 10:01:55 -05:00
Cargo.lock Update to dprint 0.18.3 and the latest version of swc (#5509) 2020-05-17 18:56:22 +02:00
Cargo.toml feat: first pass at native plugins (#3372) 2019-12-05 15:30:20 -05:00
LICENSE change copyrights from 2019 to 2020 (#3733) 2020-01-21 10:01:55 -05:00
README.md chore: remove typedoc (#5497) 2020-05-16 16:02:03 +02:00
Releases.md Fix a bunch of spelling errors (#5314) 2020-05-16 00:36:49 +02:00

Deno

A secure runtime for JavaScript and TypeScript.

Build Status

Deno aims to provide a productive and secure scripting environment for the modern programmer. It is built on top of V8, Rust, and TypeScript.

Please read the introduction for more specifics.

Website

Manual

Install

API Reference

Style Guide

Module Repository

Releases

Chat

More links