0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-31 09:14:20 -04:00
Commit graph

43 commits

Author SHA1 Message Date
Kitson Kelly
281c4cd8fc
feat(cli): support "types" when type checking (#10999)
Fixes #10677
2021-06-22 07:18:32 +10:00
Nayeem Rahman
2ea41d3ac1
fix(core/modules): Prepare modules only once per runtime (#11015)
This commit changes module loading implementation in "deno_core"
to call "ModuleLoader::prepare" hook only once per entry point.

This is done to avoid multiple type checking of the same code
in case of duplicated dynamic imports.

Relevant code in "cli/module_graph.rs" was updated as well.
2021-06-19 16:14:43 +02:00
Bartek Iwańczuk
6091ea098a
refactor: merge deno_file crate into deno_web (#10914)
This refactor makes it so there's one less crate to publish on each release.
2021-06-10 15:26:10 +02:00
Bartek Iwańczuk
e5beb800c9
refactor: move JsRuntimeInspector to deno_core (#10763)
This commit moves implementation of "JsRuntimeInspector" to "deno_core" crate.

To achieve that following changes were made:

* "Worker" and "WebWorker" no longer own instance of "JsRuntimeInspector",
instead it is now owned by "deno_core::JsRuntime".

* Consequently polling of inspector is no longer done in "Worker"/"WebWorker",
instead it's done in "deno_core::JsRuntime::poll_event_loop".

* "deno_core::JsRuntime::poll_event_loop" and "deno_core::JsRuntime::run_event_loop",
now accept "wait_for_inspector" boolean that tells if event loop should still be 
"pending" if there are active inspector sessions - this change fixes the problem 
that inspector disconnects from the frontend and process exits once the code has
stopped executing.
2021-05-26 21:07:12 +02:00
Ben Noordhuis
af1546391c feat(extensions): BroadcastChannel WPT conformance
Replaces the file-backed provider by an in-memory one because proper
file locking is a hard problem that detracts from the proof of concept.

Teach the WPT runner how to extract tests from .html files because all
the relevant tests in test_util/wpt/webmessaging/broadcastchannel are
inside basics.html and interface.html.
2021-05-23 15:16:42 +02:00
Luca Casonato
5151afa123
fix: static import permissions in dynamic imports
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-05-17 09:45:54 +02:00
Bartek Iwańczuk
ce48b32979
refactor(cli): replace loading file for --config flag with generic structure (#10481)
Currently file passed to --config file is parsed using TsConfig structure
that does multiple things when loading the file. Instead of relying on that
structure I've introduced ConfigFile structure that can be updated to
sniff out more fields from the config file in the future.
2021-05-10 18:16:39 +02:00
Satya Rohith
89b61b5d05
fix(cli): give context when failed to load import map (#10478) 2021-05-04 14:27:20 +02:00
Casper Beyer
c455c28b83
feat(test): run test modules in parallel (#9815)
This commit adds support for running test in parallel.

Entire test runner functionality has been rewritten
from JavaScript to Rust and a set of ops was added to support reporting in Rust.

A new "--jobs" flag was added to "deno test" that allows to configure 
how many threads will be used. When given no value it defaults to 2.
2021-04-28 20:17:04 +02:00
Bartek Iwańczuk
baf7092ea2
remove --unstable flag from CLI features (#10190) 2021-04-27 12:44:36 +02:00
crowlKats
fefe93c91b
feat(runtime/permissions): prompt fallback (#9376)
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-04-12 11:15:43 +09:00
Luca Casonato
966ce7de8a
feat: blob URL support (#10045)
This commit adds blob URL support. Blob URLs are stored in a process
global storage, that can be accessed from all workers, and the module
loader. Blob URLs can be created using `URL.createObjectURL` and revoked
using `URL.revokeObjectURL`.

This commit does not add support for `fetch`ing blob URLs. This will be
added in a follow up commit.
2021-04-07 15:22:14 +02:00
Ryan Dahl
f46e39c5c5
remove macro_use (#9884) 2021-03-26 12:34:25 -04:00
Yusuke Tanaka
e7954413e1
upgrade: Rust 1.51.0 (#9895) 2021-03-25 19:17:37 +01:00
Bartek Iwańczuk
0dc89c0a79
feat: stabilise import maps (#9526)
This commit stabilises import maps by removing requirement
on "--unstable" flag when "--import-map" flag is used.
2021-03-01 12:41:22 +01:00
Ryan Dahl
c7dabc99ee
Make ModuleSpecifier a type alias, not wrapper struct (#9531) 2021-02-17 13:47:18 -05:00
Bartek Iwańczuk
f6d6b24506
feat: support loading import map from URL (#9519)
This commit adds support for loading import maps from URLs,
both remote and local.

This feature is supported in CLI flag as well as in runtime
compiler API.
2021-02-17 14:32:57 +01:00
Nayeem Rahman
0cac243a83
fix(cli): check for inline source maps before external ones (#9394)
Fixes #6965
2021-02-08 10:14:05 +11:00
Yusuke Tanaka
84f8b87f1b
chore: make all tests annotated with #[cfg(test)] (#9347) 2021-02-01 10:55:23 -05:00
Yusuke Tanaka
d8fd71afdf
chore: update copyright to 2021 (#9092) 2021-01-11 18:13:41 +01:00
Luca Casonato
a44349dfdf
feat: denort binary (#9041)
This commit adds new binary target called "denort".

It is a "lite" version of "deno" binary that can only execute
code embedded inside the binary itself.

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-01-08 03:08:51 +01:00
Kitson Kelly
54240c22af
feat(cli): support data urls (#8866)
Closes: #5059

Co-authored-by: Valentin Anger <syrupthinker@gryphno.de>
2021-01-06 13:22:38 +11:00
Luca Casonato
39bbbbce70
fix: use inline source maps when present in js (#8995) 2021-01-06 00:10:36 +01:00
Nayeem Rahman
cbc2108525
feat(cli/standalone): support runtime flags for deno compile (#8738) 2021-01-05 00:15:52 +01:00
Mo
3e5a3daf59
BREAKING(unstable): remove CreateHttpClientOptions.caFile (#8928) 2021-01-04 16:55:20 +01:00
Kitson Kelly
8011eced14
feat(lsp): add cache command (#8911) 2020-12-30 15:17:17 +11:00
Casper Beyer
3078fcf55a
feat(unstable): record raw coverage into a directory (#8642) 2020-12-21 14:04:25 +01:00
Kitson Kelly
63a821b78b
fix(cli): make dynamic import errors catchable (#8750)
Fixes #6259
2020-12-15 16:52:55 +11:00
Bartek Iwańczuk
2e74f164b6
refactor: deno_runtime crate (#8640)
This commit moves Deno JS runtime, ops, permissions and
inspector implementation to new "deno_runtime" crate located
in "runtime/" directory.

Details in "runtime/README.md".

Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2020-12-13 19:45:53 +01:00
Bartek Iwańczuk
31935c6b8d
refactor(cli): more options on Worker (#8724) 2020-12-12 00:36:18 +01:00
Bartek Iwańczuk
65e72b68ac
refactor(cli): decouple ops from ProgramState and Flags (#8659)
This commit does major refactor of "Worker" and "WebWorker",
in order to decouple them from "ProgramState" and "Flags".
The main points of interest are "create_main_worker()" and
"create_web_worker_callback()" functions which are responsible
for creating "Worker" and "WebWorker" in CLI context.
As a result it is now possible to factor out common "runtime"
functionality into a separate crate.
2020-12-11 18:49:26 +01:00
Kitson Kelly
37fbbf8101
fix(cli): local sources are not cached in memory (#8328)
Fixes #4743
Closes #5253
Fixes #5631
Fixes #6116

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
2020-11-16 13:19:31 +11:00
Kitson Kelly
96e03e0b93
refactor(cli): refactor file_fetcher (#8245) 2020-11-06 11:38:21 +11:00
Bartek Iwańczuk
c3dd19c5d3
refactor(cli): remove ProgramState::permissions (#8228)
This commit removes ProgramState::permissions field.

Having permissions parsed from CLI flags stored on globally
accessible state object made it easy to mistakenly use these
permissions in situations which required "runtime" permissions.
2020-11-02 23:37:55 +01:00
Kitson Kelly
d672e1405d
refactor(cli): cleanup compiler snapshot and tsc/module_graph (#8220) 2020-11-03 06:41:20 +11:00
Kitson Kelly
fdcc78500c
refactor(cli): migrate runtime compile/bundle to new infrastructure (#8192)
Fixes #8060
2020-11-02 13:51:56 +11:00
Kitson Kelly
6844caa9a5
fix(cli): restore tripleslash lib refs support (#8157)
Fixes #8147
2020-10-28 11:52:20 +11:00
Kitson Kelly
b03f4a4a1c
fix(cli): restore permission check on workers (#8123)
Fixes #8120
2020-10-27 06:56:00 +11:00
Bartek Iwańczuk
35f184cdcc
refactor: use of lock file in ModuleGraph2 (#8087) 2020-10-23 23:01:54 +02:00
Kitson Kelly
7e2c7fb6c5
refactor(cli): migrate run and cache to new infrastructure (#7996)
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2020-10-23 11:50:15 +11:00
Nayeem Rahman
070d99645f
chore: Rename --importmap to --import-map (#7032)
--importmap still works as an alias to --import-map
but is not visible in CLI help output.
2020-10-20 14:30:59 +02:00
Nayeem Rahman
3f5513758d
feat(cli/installer): Add missing flags for deno install (#7601)
This commit adds support for following flags:
- deno install --importmap
- deno install --no-remote
- deno install --lock
- deno install --lock-write
- deno install --cached-only
- deno install --v8-flags
- deno install --seed
2020-10-19 21:19:20 +02:00
Bartek Iwańczuk
0bd3cea0ff
refactor(cli): rename GlobalState to ProgramState (#7914) 2020-10-13 13:35:35 +02:00
Renamed from cli/global_state.rs (Browse further)