1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-05 09:04:41 -05:00
Commit graph

148 commits

Author SHA1 Message Date
Bartek Iwańczuk
9bd473d8ac feat: print cache location when no arg in deno info (#2752) 2019-08-11 18:43:01 -06:00
Kevin (Kun) "Kassimo" Qian
286ee1d8b6 Fix dynamic import base path problem for REPL and eval (#2757) 2019-08-09 16:33:59 -07:00
Bert Belder
6fbf2e9624
Dynamic import (#2516) 2019-08-09 01:19:45 +02:00
andy finch
56a82e72d9 Resolve worker specifiers relative to main module of host. (#2751) 2019-08-08 14:38:53 -07:00
Kevin (Kun) "Kassimo" Qian
4519f9a50d Make Deno.execPath a function (#2743)
And throws without allow-env
2019-08-06 17:05:47 -04:00
Kevin (Kun) "Kassimo" Qian
ccee2f01ba Implement Blob url support for worker (#2729) 2019-08-06 09:22:11 -04:00
Kevin (Kun) "Kassimo" Qian
ddee2dff14 Provide option to delete Deno namespace in worker (#2717) 2019-08-05 07:23:41 -04:00
Bartek Iwańczuk
2e1ab82321 refactor: cleanup compiler pipeline (#2686)
* remove fetch_source_file_and_maybe_compile_async and 
  replace it with State.fetch_compiled_module

* remove SourceFile.js_source()

* introduce CompiledModule which is basically the same as
  deno::SourceInfo and represents arbitrary file that has been 
  compiled to JS module

* introduce //cli/compilers module containing all compilers

* introduce JsCompiler which is a no-op compiler
  - output is the same as input, no compilation takes place
  - it is used for MediaType::JavaScript and MediaType::Unknown

* introduce JsonCompiler that wraps JSON in default export

* support JS-to-JS compilation using checkJs
2019-07-31 13:16:03 -04:00
Bartek Iwańczuk
e7cee29c84 Add --current-thread flag (#2702) 2019-07-31 11:02:20 -04:00
Bartek Iwańczuk
ac269beabe feat: add debug info to ModuleResolutionError (#2697) 2019-07-30 14:34:57 +00:00
Kitson Kelly
5083f5fd90 Remap stack traces of unthrown errors. (#2693) 2019-07-29 09:11:08 +00:00
Bartek Iwańczuk
729c4e9377 make importmap flag global (#2687) 2019-07-27 14:37:03 +00:00
Bartek Iwańczuk
89e6792203 cli: handle deno -v and deno --version (#2684) 2019-07-27 09:20:40 +00:00
Bartek Iwańczuk
34f212f257 fix: bring back --no-fetch flag (#2671) 2019-07-20 09:19:06 -04:00
Ryan Dahl
a37bc0088f
Remove hacky normalize_path (#2660) 2019-07-18 15:01:44 -04:00
Bartek Iwańczuk
8214b686ce Refactor DenoDir (#2636)
* rename `ModuleMetaData` to `SourceFile` and remove TS specific
  functionality

* add `TsCompiler` struct encapsulating processing of TypeScript files

* move `SourceMapGetter` trait implementation to `//cli/compiler.rs`

* add low-level `DiskCache` API for general purpose caches and use it in
  `DenoDir` and `TsCompiler` for filesystem access

* don't use hash-like filenames for compiled modules, instead use
  metadata file for storing compilation hash

* add `SourceFileCache` for in-process caching of loaded files for fast
  subsequent access

* define `SourceFileFetcher` trait encapsulating loading of local and
  remote files and implement it for `DenoDir`

* define `use_cache` and `no_fetch` flags on `DenoDir` instead of using
  in fetch methods
2019-07-17 18:15:30 -04:00
Yoshiya Hinosawa
9c45499864 Support window.onload (#2643) 2019-07-16 00:19:26 -04:00
Bartek Iwańczuk
72d9045528
cli: refactor deno_dir to use Url instead of String 2019-07-08 13:07:32 +02:00
Bert Belder
9b1997b8b6
core: clearly define when module lookup is path-based vs URL-based
The rules are now as follows:

* In `import` statements, as mandated by the WHATWG specification,
  the import specifier is always treated as a URL.
  If it is a relative URL, it must start with either / or ./ or ../

* A script name passed to deno as a command line argument may be either
  an absolute URL or a local path.
  - If the name starts with a valid URI scheme followed by a colon, e.g.
    'http:', 'https:', 'file:', 'foo+bar:', it always interpreted as a
    URL (even if Deno doesn't support the indicated protocol).
  - Otherwise, the script name is interpreted as a local path. The local
    path may be relative, and operating system semantics determine how
    it is resolved. Prefixing a relative path with ./ is not required.
2019-07-08 13:07:32 +02:00
Bert Belder
32cde32e54 core: return useful error when import path has no prefix like ./ 2019-06-30 19:46:32 +02:00
Gurwinder Singh
d7d3e9f9de Fix multiple error messages for a missing file (#2587) 2019-06-27 09:34:12 -04:00
Bartek Iwańczuk
70a9859adc refactor: use Path/PathBuf in deno dir (#2559) 2019-06-24 10:10:21 -07:00
Ryan Dahl
f2c50fae84
Fix silent failure of WebAssembly.instantiate() (#2548)
By making WASM compilation synchronous. We'll have to do more work to
make it properly async.
2019-06-20 09:04:34 -07:00
Kitson Kelly
425df50484 Combine CLI Errors (#2487) 2019-06-19 19:07:01 -07:00
Bartek Iwańczuk
01858f115a fix: use Loader::resolve in op_fetch_module_meta_data (#2519) 2019-06-18 07:23:06 -07:00
Matt Harrison
d82c1991cf Add --seed for setting RNG seed (#2483) 2019-06-11 10:34:39 -04:00
Bartek Iwańczuk
a115340288 feat: Import maps (#2360) 2019-06-09 09:08:20 -04:00
Kitson Kelly
a71305b4fe Handle compiler diagnostics in Rust (#2445) 2019-06-04 09:03:56 -04:00
Ryan Dahl
60d4522641
Compiler exit before emit if preEmitDiagnostics found (#2441) 2019-06-03 12:58:49 -04:00
Ryan Dahl
856c44213b TS compiler refactor
* Compiler no longer has its own Tokio runtime. Compiler handles one
  message and then exits.

* Uses the simpler ts.CompilerHost interface instead of
  ts.LanguageServiceHost.

* avoids recompiling the same module by introducing a hacky but simple
  `hashset<string>` that stores the module names that have been already
  compiled.

* Removes the CompilerConfig op.

* Removes a lot of the mocking stuff in compiler.ts like `this._ts`. It
  is not useful as we don't even have tests.

* Turns off checkJs because it causes fmt_test to die with OOM.
2019-05-29 07:53:39 -04:00
Ryan Dahl
2952fb5405
Rename --allow-high-precision to --allow-hrtime (#2398) 2019-05-23 19:28:29 +03:00
Ryan Dahl
160a815767
Rename HTTP benchmarks (#2350) 2019-05-14 15:22:50 -04:00
Ryan Dahl
aba952397a
Add progress bar (#2309) 2019-05-11 10:23:19 -04:00
Bartek Iwańczuk
5824e55efa fix: deno version panic (#2286) 2019-05-03 18:48:50 -04:00
Bartek Iwańczuk
f6a9d7d717 add "deno run" subcommand (#2215) 2019-05-03 17:15:16 -04:00
Kevin (Kun) "Kassimo" Qian
3608117132 feat(cli cmd): deno xeval (#2260) 2019-05-03 16:24:09 -04:00
Kevin (Kun) "Kassimo" Qian
401a5c0211 feat: support .mjs extension resolution (#2283)
Removed `extmap` and added .mjs entry in `map_file_extension`.
The assert in the compiler does not need to be updated, since it is
resolving from the compiled cache instead of elsewhere (notice the .map
is asserted next to it)
2019-05-03 15:03:10 -04:00
Bartek Iwańczuk
bf9b0c8231 Fix: deno --v8-options does not print v8 options (#2277) 2019-05-03 08:59:52 -04:00
Kitson Kelly
1a0f53a807 Add support for custom tsconfig.json (#2089)
Use `--config`
2019-04-29 07:58:31 -07:00
Ryan Dahl
9dfebbc949
Fix eslint warnings (#2151)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: LE GOFF Vincent <g_n_s@hotmail.fr>
2019-04-21 16:40:10 -04:00
Bartek Iwańczuk
cd19da62d9 Refactor CLI entry point (#2157)
Changes "deno --types" to "deno types"
and "deno --prefetch" to "deno prefetch"
2019-04-21 11:34:18 -04:00
Ryan Dahl
1a69df4a05
Fix flaky tests (#2139) 2019-04-17 13:02:32 -04:00
Ryan Dahl
1bfb443369
Implement async module loading in CLI (#2084) 2019-04-16 15:13:42 -04:00
Bartek Iwańczuk
591b5e4a7d Add deno eval subcommand (#2102) 2019-04-13 13:24:15 -04:00
Vincent LE GOFF
734cf781c6 Allow high precision performance.now() (#1977) 2019-04-08 16:22:40 -04:00
Bartek Iwańczuk
780e72ab6a Refactor CLI flag parsing (#2025) 2019-04-07 01:13:06 +03:00
andy finch
7a3df0a184 Add worker benchmarks (#2059) 2019-04-05 22:57:59 +03:00
andy finch
0e7311e171 Non-fatal compile_sync failures (#2039)
And model worker resources as Stream
2019-04-04 05:33:32 -04:00
Kevin (Kun) "Kassimo" Qian
534b8d3021 Follow redirect location as new referrers for nested module imports (#2031)
Fixes #1742
Fixes #2021
2019-04-01 21:46:40 -04:00
andy finch
b0a23beb8f Add web worker JS API (#1993)
* Refactored the way worker polling is scheduled and errors are handled.
* Share the worker future as a Shared
2019-04-01 15:09:59 -04:00