summaryrefslogtreecommitdiff
path: root/cli/tsc.rs
AgeCommit message (Collapse)Author
2020-09-26refactor: combine MainWorker::new and MainWorker::create (#7693)Bartek Iwańczuk
* combine MainWorker::new and MainWorker::create * remove compiler_starts fields * make op_state types explicit for readability
2020-09-26refactor: use JsRuntime to implement TSC (#7691)Bartek Iwańczuk
This commits removes "CompilerWorker" in favor of using "JsRuntime". "cli/ops/compiler.rs" has been removed in favor of inline registration of ops in "cli/tsc.rs"
2020-09-25refactor: new module graph used for no check (#7621)Kitson Kelly
2020-09-21refactor: use futures and serde_json from deno_core (#7614)Bartek Iwańczuk
2020-09-20refactor: remove CliState, use OpState, add CliModuleLoader (#7588)Bartek Iwańczuk
- remove "CliState.workers" and "CliState.next_worker_id", instead store them on "OpState" using type aliases. - remove "CliState.global_timer" and "CliState.start_time", instead store them on "OpState" using type aliases. - remove "CliState.is_internal", instead pass it to Worker::new - move "CliState::permissions" to "OpState" - move "CliState::main_module" to "OpState" - move "CliState::global_state" to "OpState" - move "CliState::check_unstable()" to "GlobalState" - change "cli_state()" to "global_state()" - change "deno_core::ModuleLoader" trait to pass "OpState" to callbacks - rename "CliState" to "CliModuleLoader"
2020-09-16Re-export deno_core::url (#7525)Ryan Dahl
Also re-exports deno_core::futures and deno_core::serde_json but these are not yet used in the CLI.
2020-09-15cli/msg.rs -> cli/media_type.rsRyan Dahl
2020-09-14Rename deno::state::State to deno::state::CliState (#7480)Ryan Dahl
2020-09-15refactor: use the 'anyhow' crate instead of 'ErrBox' (#7476)Bert Belder
2020-09-14refactor: use ParsedModule and improve MediaTypes enum (#7456)Kitson Kelly
2020-09-12refactor: improve tsc diagnostics (#7420)Kitson Kelly
2020-09-12refactor: Improve placeholder module names (#7430)Nayeem Rahman
2020-09-12Revert "feat(unstable): Support data: urls (#5157)" (#7432)Bartek Iwańczuk
This reverts commit e3319f34a6ece36eab3138eae83c8d0e18fcc07c.
2020-09-11feat(unstable): Support data: urls (#5157)Valentin Anger
2020-09-11feat(unstable): enable importsNotUsedAsValues by default (#7413)Luca Casonato
2020-09-11refactor(core): JsRuntime initialization (#7415)Bartek Iwańczuk
Removes: - "deno_core::StartupData" - "deno_core::Script" - "deno_core::OwnedScript" Changes to "JsRuntime": - remove "new_with_loader()" - remove "with_heap_limits()" - rename "IsolateOptions" to "RuntimeOptions" and make public - "JsRuntime::new()" takes "RuntimeOptions" as a single param
2020-09-10Use gotham-like state for ops (#7385)Ryan Dahl
Provides a concrete state type that can be dynamically added. This is necessary for op crates. * renames BasicState to OpState * async ops take `Rc<RefCell<OpState>>` * sync ops take `&mut OpState` * removes `OpRegistry`, `OpRouter` traits * `get_error_class_fn` moved to OpState * ResourceTable moved to OpState
2020-09-09upgrade: swc, deno_doc, deno_lint, dprint (#7402)Bartek Iwańczuk
- deno_doc - 0.1.6 - deno_lint - 0.1.29 - dprint-plugin-typescript 0.31.1 - swc_ecmascript 0.7.3
2020-09-09fix(op_crates/web): Use "deno:" URLs for internal script specifiers (#7383)Nayeem Rahman
2020-09-08feat(unstable): enable isolatedModules by default (#7327)Luca Casonato
2020-09-07feat(info): Dependency count and sizes (#6786)KrisChambers
This commit changes "deno info" subcommand logic. - Modules are no longer loaded into V8 isolate - analysis is done using ModuleGraph. - Removed deno_core::Deps structure. - Modules are no longer type-checked and transpiled - "compiled" file is shown only if it is already available. - Added number of unique dependencies for root module. - Changed tree output: - file size is shown next to the dependency - repeated dependencies are marked with "*" - used less spaces in prefix to save terminal width
2020-09-06refactor(core): rename CoreIsolate to JsRuntime (#7373)Bartek Iwańczuk
deno_core/ - rename core_isolate.rs to runtime.rs - rename CoreIsolate to JsRuntime - rename JSError to JsError - rename JSStackFrame to JsStackFrame cli/ - update references from deno_core::CoreIsolate to deno_core::JsRuntime - rename deno_core::JSError to deno_core::JsError - rename fmt_errors::JSError to fmt_errors::JsError
2020-09-06Move JSON ops to deno_core (#7336)Bert Belder
2020-09-04fix: regex for TS refereces and deno-types (#7333)Bartek Iwańczuk
2020-09-03refactor: use dependency analyzer from SWC (#7334)Bartek Iwańczuk
2020-09-02fix: support missing features in --no-check (#7289)Bartek Iwańczuk
This commit adds "EmitTranspileOptions" to "transpile()" function, that allows to configure transpilation process based on the currently loaded "tsconfig.json".
2020-08-31refactor: Compiler config in Rust (#7228)Bartek Iwańczuk
* port tsc_config.rs * cleanup options * bring back allowNonTsExtension * try * fix test * fix test2 * move config for bundling * remove Transpile compile request * remove dead code * remove more dead code * remove checkJs regex * fix * handle config str for runtime APIs * lint * runtimeCompile config in Rust * runtimeCompile and runtimeTranspile config in Rust * fix * remove lint supression * upgrade: jsonc-parser 0.13.0 * remove unneeded to_string() * upgrade: jsonc-parser 0.14.0 * remove AsRef<str>
2020-08-26refactor: remove OpError, use ErrBox everywhere (#7187)Bert Belder
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2020-08-19refactor: move cli/doc/ to separate crate (#7103)Bartek Iwańczuk
2020-08-19Make Rc/Arc wrapper around State/GlobalState visible (#7104)Bert Belder
2020-08-03fix(cli): add support for non-UTF8 source files (#6789)Maayan Hanin
Fixes: #5542
2020-07-31upgrade: deno_lint, dprint, swc (#6928)Bartek Iwańczuk
This commit upgrades: deno_lint 0.1.20 dprint-plugin-typescript 0.25.0 swc_ecmascript 0.1.0 SWC is no longer reexported from dprint nor deno_lint.
2020-07-28refactor: Use SWC to strip types for "--no-check" flag (#6895)Bartek Iwańczuk
2020-07-28fix: downcast from SwcDiagnosticBuffer to OpError (#6909)Bartek Iwańczuk
2020-07-28chore: use matches macro for bool matches (#6904)Kitson Kelly
2020-07-23refactor: remove more compiler runtime code (#6841)Bartek Iwańczuk
2020-07-15fix: panic for runtime error in TS compiler (#6758)Bartek Iwańczuk
2020-07-11fix: harden pragma and reference parsing in module analysis (#6702)Bartek Iwańczuk
2020-07-11chore: upgrade deno_lint, remove direct dprint dep (#6679)Bartek Iwańczuk
This PR removes direct dependency on dprint-plugin-typescript and swc_ecma_visit. Both of these dependencies have been pushed out to deno_lint crate. This should make it a bit easier to do the upgrades and prevent having conflicting crate requirements.
2020-07-08feat: add --no-check option (#6456)Kitson Kelly
This commit adds a "--no-check" option to following subcommands: - "deno cache" - "deno info" - "deno run" - "deno test" The "--no-check" options allows to skip type checking step and instead directly transpiles TS sources to JS sources. This solution uses `ts.transpileModule()` API and is just an interim solution before implementing it fully in Rust.
2020-07-07feat: add lockfile support to bundle (#6624)Takahiko Inayama
2020-06-30refactor: Improvements to TsCompiler and its tests (#6576)Kitson Kelly
2020-06-29refactor: util functions take slices instead of heap values (#6547)Valentin Anger
2020-06-26'Compile' messages changed to 'Check' messages (#6504)Ryan Dahl
2020-06-26fix: Omit buildinfo when --reload passed (#6489)Kitson Kelly
2020-06-24Incremental compilation for TypeScript (#6428)Bartek Iwańczuk
This commit adds incremental compilation capabilities to internal TS compiler. Instead of using "ts.createProgram()" API for compilation step (during deno startup), "ts.createIncrementalProgram()" API is used instead. Thanks to TS' ".tsbuildinfo" file that already stores all necessary metadata for compilation I was able to remove our own invention that is ".graph" file. ".tsbuildinfo" file is stored alongside compiled source and is used to cache-bust outdated dependencies, facilitated by the "version" field. The value for "version" field is computed in Rust during loading of module graph and is basically a hash of the file contents. Please keep in mind that incremental compilation is only used for initial compilation (or dynamic imports compilation) - bundling and runtime compiler APIs haven't been changed at all. Due to problems with source map I changed compilation settings to inline source map (inlineSourceMap instead of sourceMap).
2020-06-24Add ability to output compiler performance information (#6434)Kitson Kelly
2020-06-19refactor(compiler): split code paths for compile and bundle (#6304)Bartek Iwańczuk
* refactor "compile" and "runtimeCompile" in "compiler.ts" and factor out separate methods for "compile" and "bundle" operations * remove noisy debug output from "compiler.ts" * provide "Serialize" implementations for enums in "msg.rs" * rename "analyze_dependencies_and_references" to "pre_process_file" and move it to "tsc.rs" * refactor ModuleGraph to use more concrete types and properly annotate locations where errors occur * remove dead code from "file_fetcher.rs" - "SourceFile.types_url" is no longer needed, as type reference parsing is done in "ModuleGraph" * remove unneeded field "source_path" from ".meta" files stored for compiled source file (towards #6080)
2020-06-10fix: several regressions in TS compiler (#6177)Bartek Iwańczuk
This commit fixes several regressions in TS compiler: * double compilation of same module during same process run * compilation of JavaScript entry point with non-JS imports * unexpected skip of emit during compilation Additional checks were added to ensure "allowJs" setting is used in TS compiler if JavaScript has non-JS dependencies.
2020-06-05ci: upgrade to Rust 1.44.0 (#6113)Bert Belder