Bartek Iwańczuk
135053486c
fix: top-level-await module execution ( #7946 )
...
This commit changes implementation of top-level-await in "deno_core".
Previously promise returned from module evaluation was not awaited,
leading to out-of-order execution of modules that have TLA. It's been
fixed by changing "JsRuntime::mod_evaluate" to be an async function
that resolves when the promise returned from module evaluation also
resolves. When waiting for promise resolution event loop is polled
repeatedly, until there are no more dynamic imports or pending
ops.
2020-10-14 14:04:09 +02:00
Kitson Kelly
10654fa955
refactor(cli): add tsc2 ( #7942 )
...
Ref #7225
2020-10-14 10:52:49 +11:00
Ryan Dahl
374d433f1f
Remove dead code ( #7963 )
2020-10-13 18:24:40 -04:00
Nayeem Rahman
d0c2714c03
fix(op_crates/web/url): apply backslash replacement to the pathname setter ( #7937 )
2020-10-13 17:16:10 +02:00
Casper Beyer
bbf7b2ee72
feat(cli/repl): add regex based syntax highlighter ( #7811 )
...
This commit adds a simple regex replace based highlighter
to the REPL editor.
It tries to match the color palette of Deno.inspect()
2020-10-13 16:23:02 +02:00
Yoshiya Hinosawa
0dcaea72ae
feat: add alert, confirm, and prompt ( #7507 )
...
This commit adds "alert", "confirm" and "prompt" functions from web standards.
2020-10-13 15:31:59 +02:00
Bartek Iwańczuk
0bd3cea0ff
refactor(cli): rename GlobalState to ProgramState ( #7914 )
2020-10-13 13:35:35 +02:00
Kitson Kelly
000ac5c40b
reafactor(cli): use Emit enum and rename ts_build_info ( #7952 )
2020-10-13 21:54:28 +11:00
Kitson Kelly
26639b3bac
chore(cli): remove dead code ( #7941 )
2020-10-12 22:25:25 +11:00
Kitson Kelly
e877b36072
refactor(cli): move info subcommand over to new module graph ( #7892 )
2020-10-12 13:25:27 +11:00
Valentin Anger
fede13f2eb
feat(cli): support importmap flag with deno doc subcommand ( #7821 )
...
Fixes #7783
2020-10-12 10:05:46 +11:00
Nayeem Rahman
5f3028af13
fix(cli/rt/main): Add global interface objects ( #7875 )
2020-10-12 09:04:43 +11:00
Yoshiya Hinosawa
265a9fb932
fix(console): fix inspection of Function ( #7930 )
...
This commit fixes the inspection of functions. The current
implementation gets the name of the type of the function
from "f.__proto__.constructor.name", and it throws when
the prototype is set to null.
This commit checks the prototype before accessing its
constructor name and uses the generic name 'Function'
if the prototype is not available.
2020-10-11 22:04:26 +02:00
Casper Beyer
86dc55134e
fix(cli/console): only inspect getters with option ( #7830 )
2020-10-11 21:52:20 +02:00
Casper Beyer
fa80649926
refactor(cli/repl): get context id from notification ( #7864 )
...
This takes the execution context id from a notification which is sent on
Runtime.enable rather than hard-coding it to a magic value.
2020-10-11 19:49:55 +02:00
Bartek Iwańczuk
527628e186
reland JsRuntime/Worker is not a Future ( #7924 )
2020-10-11 13:20:40 +02:00
Bartek Iwańczuk
9e9ec9784a
v1.4.6
2020-10-10 12:30:55 +02:00
Ryan Dahl
08bb8b3d53
Fix 100% CPU idling problem by reverting #7672 ( #7911 )
...
* Revert "refactor: Worker is not a Future (#7895 )"
This reverts commit f4357f0ff9
.
* Revert "refactor(core): JsRuntime is not a Future (#7855 )"
This reverts commit d8879feb8c
.
* Revert "fix(core): module execution with top level await (#7672 )"
This reverts commit c7c7677825
.
2020-10-10 11:41:11 +02:00
Lively
782e6a2ed5
fix(op_crate/web): add padding on URLSearchParam ( #7905 )
...
Fixes #7888
2020-10-10 16:20:24 +11:00
Bartek Iwańczuk
f4357f0ff9
refactor: Worker is not a Future ( #7895 )
...
This commit rewrites deno::Worker to not implement Future
trait.
Instead there are two separate methods:
- Worker::poll_event_loop() - does single tick of event loop
- Worker::run_event_loop() - runs event loop to completion
Additionally some cleanup to Worker's field visibility was done.
2020-10-09 19:08:10 +02:00
Nayeem Rahman
98727b331d
fix(op_crates/fetch): Stringify and parse Request URLs ( #7838 )
...
Fixes #7837
2020-10-09 16:12:44 +11:00
crowlKats
c06fbc449d
Fix typos ( #7882 )
2020-10-08 15:40:49 -04:00
Bartek Iwańczuk
b5e4b63a88
v1.4.5
2020-10-08 14:20:18 +02:00
Kitson Kelly
9d71b0ef5b
fix: update worker types to better align to lib.dom.d.ts ( #7843 )
2020-10-08 11:43:26 +02:00
Nayeem Rahman
986ad08bce
fix(cli/rt/error_stack): Improve message line formatting ( #7860 )
2020-10-08 11:05:19 +02:00
Simon Rask
62f8d945e1
fix(cli/fs) Small change in filter expression ( #7865 )
2020-10-08 10:57:45 +02:00
Bartek Iwańczuk
d8879feb8c
refactor(core): JsRuntime is not a Future ( #7855 )
...
This commit rewrites deno_core::JsRuntime to not implement Future
trait.
Instead there are two separate methods:
- JsRuntime::poll_event_loop() - does single tick of event loop
- JsRuntime::run_event_loop() - runs event loop to completion
2020-10-07 22:30:06 +02:00
Nayeem Rahman
8bd7c936f9
fix(cli/rt/console): Don't require a prototype to detect a class instance ( #7869 )
2020-10-07 16:08:54 -04:00
Bartek Iwańczuk
46e9758962
upgrade: deno_doc, deno_lint, dprint, swc ( #7862 )
2020-10-07 20:29:12 +02:00
Bartek Iwańczuk
9b70f2f345
refactor: rename isolate to js_runtime ( #7858 )
...
This commit renames occurrences of "isolate" variable name
to "js_runtime". This was outstanding debt after renaming
deno_core::CoreIsolate to JsRuntime.
2020-10-07 17:20:20 +02:00
Bartek Iwańczuk
83f6def3c6
refactor(core): JsRuntime doesn't defer to OwnedIsolate ( #7853 )
...
Remove Deref and DeferMut implementations for JsRuntime.
2020-10-07 15:56:52 +02:00
Nayeem Rahman
c226d3af25
fix(cli/ops/fs): Don't force Windows paths separate paths with forward slash ( #7833 )
2020-10-07 14:05:43 +02:00
Kitson Kelly
99aa23b8dd
refactor(cli): remove TextDocument ( #7850 )
2020-10-07 22:43:44 +11:00
Casper Beyer
cb3a3a1e95
refactor(cli/inspector): use &str for post_message ( #7851 )
...
This changes the signature of InspectorSession.post_message to take a
&str rather than a String avoiding the need call str.to_string at each
call site.
2020-10-07 10:24:15 +02:00
Kitson Kelly
7ab645f512
refactor(cli): cleanups to new module graph ( #7846 )
2020-10-07 16:24:15 +11:00
Casper Beyer
21965e8a96
refactor(cli/repl): tightly integrate event loop ( #7834 )
2020-10-06 13:50:48 +02:00
Bartek Iwańczuk
c7c7677825
fix(core): module execution with top level await ( #7672 )
...
This commit fixes implementation of top level await in "deno_core".
Previously promise returned from module execution was ignored causing to execute
modules out-of-order.
With this commit promise returned from module execution is stored on "JsRuntime"
and event loop is polled until the promise resolves.
2020-10-06 10:18:22 +02:00
Kitson Kelly
d0f734bacc
chore: add a bundle benchmark ( #7828 )
2020-10-05 21:39:46 +11:00
Nayeem Rahman
72425810b8
perf(cli/console): Don't add redundant ANSI codes ( #7823 )
2020-10-05 11:50:49 +02:00
Kitson Kelly
f632b3b6e7
fix(core): handle unregistered errors in core better ( #7817 )
2020-10-05 20:35:51 +11:00
JavascriptMick
f377b611ba
chore: add lockfile tests ( #7816 )
...
Fixes #7653
2020-10-05 10:32:18 +11:00
tokiedokie
ec96323823
chore(std/http): rename http_bench.ts -> bench.ts ( #7509 )
2020-10-04 13:34:52 +02:00
Trivikram Kamat
d0eb179132
docs: end sentences with a period in markdown ( #7813 )
2020-10-04 07:19:11 +11:00
Nayeem Rahman
315724b856
feat(unstable): revert "enable importsNotUsedAsValues by default #7413 " ( #7800 )
...
This reverts commit fbb18d40d3
.
2020-10-03 16:40:26 +02:00
Bartek Iwańczuk
ae1ed2d166
v1.4.4
2020-10-03 14:58:10 +02:00
Casper Beyer
c191ca1aeb
fix(cli/repl): put the thread to sleep when idle ( #7804 )
2020-10-03 12:51:25 +02:00
CGQAQ
59312f3936
fix(cli): update type definitions to align to TS dom ( #7791 )
...
Fixes #7746
2020-10-03 12:57:31 +10:00
Casper Beyer
4c7f53b04b
fix(cli/repl): enable colors on inspected values ( #7798 )
2020-10-02 15:51:08 +02:00
Bartek Iwańczuk
63efa5f15d
v1.4.3
2020-10-02 14:37:48 +02:00
Bartek Iwańczuk
e5348a6a38
upgrade: swc, deno_doc, deno_lint, dprint ( #7793 )
2020-10-02 13:51:37 +02:00
Casper Beyer
5cd29b37f7
feat(cli/repl): enable await and let re-declarations ( #7784 )
...
This enables `replMode` during evaluations which allows for top level
await and let re-declarations.
2020-10-02 13:17:47 +02:00
Casper Beyer
6825d7f13d
fix(cli/repl): use a default referrer when empty ( #7794 )
...
This makes use of a default referrer when its empty in repl mode so that
dynamic imports work in the global evaluation context.
Co-authored-by: Bartek Iwanczuk <biwanczuk@gmail.com>
2020-10-02 13:13:23 +02:00
Casper Beyer
4c779b5e8c
refactor(repl): use an inspector session ( #7763 )
...
This ports the REPL over to Rust and makes use of an inspector session to run a REPL on top of any isolate which lets make full use of rustylines various things like validators and completors without having to introduce a bunch of hard to test internal ops and glue code.
An accidental but good side effect of this is that the multiple line input we previously had is now an editable multi-line input prompt that is correctly stored in the history as a single entry.
2020-10-02 01:14:55 +02:00
Kitson Kelly
e077b93d77
refactor: add concept of 'legacy' compiler to enable non-breaking refactoring ( #7762 )
2020-10-01 20:33:15 +10:00
Kitson Kelly
ef5ae4547a
chore: ensure cache is 'valid' during benchmarks ( #7770 )
2020-10-01 20:32:05 +10:00
Nayeem Rahman
b689e60b60
fix(cli/console): Catch and format getter errors ( #7766 )
2020-10-01 11:25:34 +02:00
Bartek Iwańczuk
290da280a8
refactor: improve op crate interfaces for other consumers ( #7745 )
2020-09-30 10:51:01 -04:00
Kitson Kelly
dcd0595058
fix: check cached versions during transpile ( #7760 )
...
Fixes: #7759
2020-09-30 21:46:42 +10:00
Kitson Kelly
23a7ea9c85
fix: bundle loader returns exported value ( #7764 )
...
Fixes: #7761
2020-09-30 18:51:19 +10:00
Kitson Kelly
7c62b7b043
fix(cli): use global_state file_fetcher when using SpecifierHandler ( #7748 )
...
Fixes: #7709
2020-09-30 17:22:58 +10:00
Nayeem Rahman
27ee4b2551
feat(cli/console): Add Deno.InspectOptions::colors ( #7742 )
...
Ref: https://github.com/denoland/deno/pull/7516#pullrequestreview-489567120
2020-09-30 12:59:50 +10:00
Casper Beyer
2184cf5c07
refactor(cli): extract inspector session ( #7756 )
...
This extracts the inspector session specific bits from CoverageCollector
into a standalone struct dubbed `InspectorSesssion` which can be used as
a general purpose session to communicate with the inspector on the same
thread as an isolate/inspector pair lives on.
2020-09-29 23:05:06 +02:00
crowlKats
7713274efd
fix(websocket): add missing close events and remove extra error event ( #7606 )
2020-09-29 11:42:29 +02:00
Kitson Kelly
b014a98534
refactor: improve graph and tsc_config ( #7747 )
2020-09-29 17:16:12 +10:00
Casper Beyer
970d412a08
chore(cli/coverage): remove unused runtime domain ( #7749 )
...
Previously when we used the websocket to talk to the inspector we used
the runtime domain to send a "runIfWaitingForDebugger" message.
However this is not required since we now talk to the inspector directly
and no longer send said message so this removes the enabling of the
domain entirely.
2020-09-29 00:25:54 -04:00
Casper Beyer
6587d1bce8
fix(cli/test): do not start inspector server when collecting coverage ( #7718 )
2020-09-28 12:22:29 +02:00
Bartek Iwańczuk
45d4fd44c9
refactor: move op state registration to workers ( #7696 )
2020-09-28 12:14:11 +02:00
Valentin Anger
e3adeea769
feat(unstable): add module specifier to deno info --json output ( #7725 )
2020-09-27 21:50:18 +02:00
Nayeem Rahman
8cbf0e75b2
fix: Use $deno$test.ts instead of .deno.test.ts ( #7717 )
2020-09-27 14:21:11 -04:00
Casper Beyer
5db72dcaf3
fix(cli/inspector): shutdown server gracefully on drop ( #7716 )
2020-09-27 14:19:36 -04:00
Luca Casonato
ebcb032c6b
fix: no check recognizes require ( #7720 )
2020-09-27 14:16:18 -04:00
Giorgi Rostomashvili
eaba9adb03
fix: net listen crashes on explicit undefined hostname ( #7706 )
2020-09-27 10:44:53 -04:00
David Sherret
df02e31507
feat(fmt): Sort named import and export specifiers ( #7711 )
2020-09-27 12:22:32 +02:00
Luca Casonato
c03fe284cf
docs: add jsdoc for WebAssembly namespace ( #7703 )
2020-09-26 20:33:20 +02:00
Bartek Iwańczuk
e1beebc71a
refactor: factor out check_unstable op helper ( #7695 )
2020-09-26 20:26:51 +02:00
Bartek Iwańczuk
f64a44810e
refactor: combine MainWorker::new and MainWorker::create ( #7693 )
...
* combine MainWorker::new and MainWorker::create
* remove compiler_starts fields
* make op_state types explicit for readability
2020-09-26 18:16:33 +02:00
Bartek Iwańczuk
ff785bc35a
refactor: use JsRuntime to implement TSC ( #7691 )
...
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-26 16:33:25 +02:00
Bartek Iwańczuk
18b7109f76
refactor: prune unneeded JS code ( #7689 )
2020-09-26 15:59:24 +02:00
Nayeem Rahman
0ffaaba164
fix(cli/dts): Use var instead of const and let for globals ( #7680 )
2020-09-26 07:23:35 +10:00
Bartek Iwańczuk
b6c189e88e
refactor: clean timers tests ( #7679 )
2020-09-25 18:34:20 +02:00
Bartek Iwańczuk
dacb340f8f
v1.4.2
2020-09-25 16:53:48 +02:00
Luca Casonato
3204092732
refactor: class instead of var+interface in d.ts ( #7514 )
2020-09-25 16:21:34 +02:00
Bartek Iwańczuk
83f53c6455
refactor: remove tsc/40_error_stack.js ( #7673 )
...
This commit removes cli/tsc/40_error_stack.js as it is not
needed in TSC host. All errors originating in TSC are terminal
and don't require source mapping hence we can rely on default
stack traces provided by deno_core.
Additionally tsc/06_util.js was removed and its code moved
to tsc/99_main_compiler.js
2020-09-25 14:04:51 +02:00
Kitson Kelly
fd1c913985
fix(cli): customInspect works on functions ( #7670 )
...
Fixes #7650
2020-09-25 21:36:26 +10:00
Casper Beyer
01147fab80
refactor(cli/inspector): make server optional ( #7656 )
...
This makes inspector registration with the server with optional and
explicit to allow for inspectors to exist without spinning up the
server.
As a side effect of the server being explicitly passed around it also
makes it possible to bind multiple servers.
2020-09-25 10:24:51 +02:00
Kitson Kelly
c489589e2b
refactor: new module graph used for no check ( #7621 )
2020-09-25 08:31:17 +10:00
Will
7726cfb932
Replaced legacy chrome-devtools:// scheme. ( #7659 )
...
The legacy chrome-devtools scheme was removed from the Chromium codebase. The new scheme is simply "devtools://"
6700d12448
2020-09-24 18:06:46 -04:00
Ryan Dahl
82db91372f
refactor: Simplify op_fetch_asset signature ( #7655 )
2020-09-24 15:29:18 +02:00
Nayeem Rahman
6a2ce3d91f
fix(lib.deno.shared_globals): Change the Console class to an interface ( #7646 )
...
Fixes #7494
2020-09-24 20:40:33 +10:00
Casper Beyer
6254bd41b7
fix(cli/coverage): print lines with no coverage to stdout ( #7640 )
2020-09-23 14:12:24 -04:00
Casper Beyer
e1b61d6794
fix(cli/console): quote non-alphanumeric symbols ( #7641 )
...
This quotes and escapes symbol descriptions that contains characters
outside of the basic alpha-numeric identifier range.
2020-09-23 14:10:35 -04:00
Casper Beyer
d68fb81342
fix(cli/console): enclose symbol keys in brackets ( #7642 )
...
This encloses symbol keys when used in objects with brackets (e.g
[Symbol("Symbol.iterator")]).
2020-09-23 13:58:28 +02:00
bartOssh
29dd62b08c
fix(watch): watch importmap file for changes ( #7580 )
2020-09-23 13:56:16 +02:00
Trivikram Kamat
8a6a390457
docs: ts upgrade instructions to exclude some .d.ts files ( #7638 )
2020-09-23 15:19:30 +10:00
Trivikram Kamat
49807ac4ac
feat: bump TypeScript to 4.0.3 ( #7637 )
2020-09-23 14:36:03 +10:00
Kitson Kelly
751bb45a0a
fix: ignore fileExists in tsc host ( #7635 )
...
Fixes #7630
2020-09-23 11:39:20 +10:00
Bartek Iwańczuk
68fd7a927b
refactor(core): support error stack, remove js_check ( #7629 )
...
This commit adds support for stack traces in "deno_core".
Implementation of "Display" trait for "JsError" has been updated
and in consequence "deno_core::js_check" became obsolete and
removed.
2020-09-22 23:30:03 +02:00
Bartek Iwańczuk
dd1cd4d952
fix: clearing timers race condition ( #7617 )
2020-09-22 19:33:29 +02:00
Nayeem Rahman
a43984c9cf
refactor(cli/fmt_errors): Color stack traces in Rust ( #7628 )
2020-09-22 19:01:30 +02:00
Casper Beyer
a33315aaa7
fix(cli/console): quote object symbol keys that are invalid identifiers ( #7553 )
2020-09-22 11:10:02 -04:00
Yusuke Tanaka
c30c782c2c
fix(logger): change log level to which prefix added ( #7582 )
2020-09-22 11:08:10 -04:00
Casper Beyer
cca8856fbf
refactor(cli/coverage): remove dependency on global state ( #7616 )
...
This removes the dependency on global state and instead relies on the
runtime's internal state to get the script sources it saw when it
collected code coverage for them.
2020-09-22 13:59:02 +10:00
Casper Beyer
9caeff3208
fix(cli/repl): interpret object literals as expressions ( #7591 )
2020-09-21 16:09:53 -04:00
Luca Casonato
5c2e499c3a
fix: Response.arrayBuffer() doesn't return promise ( #7618 )
2020-09-21 22:07:41 +02:00
Bartek Iwańczuk
92edc36442
refactor: use futures and serde_json from deno_core ( #7614 )
2020-09-21 18:36:37 +02:00
William Perron
42772845f6
fix(info): add --importmap flag ( #7424 )
2020-09-21 15:07:19 +02:00
Casper Beyer
e06875e9f7
refactor(cli/coverage): await for inspector message response ( #7584 )
2020-09-21 15:02:58 +02:00
tokiedokie
c4ed3fb7e7
chore: add copyright ( #7593 )
2020-09-21 08:26:41 -04:00
Luca Casonato
dc6571909b
fix: make --watch and --inspect conflicting args ( #7610 )
2020-09-21 14:01:54 +02:00
Bartek Iwańczuk
d1b88510cf
refactor: remove GlobalState::compile_lock ( #7598 )
2020-09-21 11:41:51 +02:00
Nayeem Rahman
0a9d7e4e39
fix(cli/installer): Don't reload by default ( #7596 )
2020-09-20 14:05:11 +02:00
Yusuke Tanaka
db5004f200
fix(fmt,lint): do not print number of checked files when --quiet
is enabled ( #7579 )
2020-09-20 13:49:22 +02:00
Nayeem Rahman
51019dc267
fix(cli/flags): Make --unstable a global flag ( #7585 )
2020-09-20 13:45:00 +02:00
Bartek Iwańczuk
b657d743a2
refactor: remove CliState, use OpState, add CliModuleLoader ( #7588 )
...
- 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-20 01:17:35 +02:00
Nayeem Rahman
aaa5e6613a
fix(cli/rt): make some web API constructors illegal at runtime ( #7468 )
2020-09-19 23:30:59 +02:00
Casper Beyer
d3cce36701
refactor(cli/coverage): use json and error check protocol responses ( #7577 )
2020-09-19 14:01:56 +02:00
Bert Belder
d6f3de6feb
v1.4.1
2020-09-18 21:28:11 +02:00
Bartek Iwańczuk
f44522eac9
refactor: move fields from CliState to OpState ( #7558 )
...
- move rng to OpState
- move GlobalTimer to OpState
- move Metrics to OpState
2020-09-18 20:39:47 +02:00
Nayeem Rahman
4fcfff0393
fix(bundle, eval, repl): Add missing flags ( #7414 )
...
Restructures flag helpers and applies them consistently.
2020-09-18 13:09:11 -04:00
Ryan Dahl
526d668102
Use reqwest from deno_fetch export ( #7562 )
2020-09-18 13:07:09 -04:00
tokiedokie
4c2920ddd7
fix(cli/fmt): canonicalize files in current dir ( #7508 )
2020-09-18 13:03:37 -04:00
Casper Beyer
de95fbebc4
fix(cli/repl): format evaluation results with the object specifier ( #7561 )
2020-09-18 12:47:08 -04:00
Ryan Dahl
8edf099485
publish deno_fetch during CI ( #7557 )
2020-09-18 12:31:30 -04:00
Casper Beyer
93e8e59a7e
fix(cli/console): surround non alpha-numeric object keys with quotes ( #7550 )
2020-09-18 11:25:09 -04:00
Bartek Iwańczuk
ec174170ba
refactor: move FileReader to op_crates/web ( #7554 )
2020-09-18 16:01:50 +02:00
Casper Beyer
38196f7850
fix(cli/console): always quote and escape inspected strings ( #7546 )
2020-09-18 09:28:30 -04:00
Bartek Iwańczuk
7845740637
refactor: deno_fetch op crate ( #7524 )
2020-09-18 09:20:55 -04:00
Pig Fang
e4188f7dfb
fix(cli/fmt): make fmt output more readable ( #7534 )
2020-09-17 21:48:08 -04:00
Bartek Iwańczuk
d245ececb6
fix: disable rustyline logs ( #7535 )
2020-09-17 20:38:57 +02:00
Bartek Iwańczuk
6453cb7567
refactor: Move URL to op_crates/web ( #7544 )
2020-09-17 19:13:20 +02:00
Casper Beyer
a6f4559174
fix(cli/console): escape non printable characters in object entries ( #7533 )
2020-09-17 13:07:57 -04:00
Bartek Iwańczuk
c307e3e4be
refactor: use Symbol.for instead of Symbol in cli/rt/ ( #7537 )
2020-09-17 18:42:36 +02:00
Bartek Iwańczuk
bda9379385
refactor: move op_resources and op_close to deno_core ( #7539 )
...
Moves op_close and op_resources to deno_core::ops and exports them.
Adds serde dependency to deno_core and reexports it.
Moves JS implementation of those ops to Deno.core and reexports them in Deno.
2020-09-17 18:09:50 +02:00
Bartek Iwańczuk
3421f4dbbd
refactor: disable URL.createObjectUrl ( #7543 )
2020-09-17 17:35:05 +02:00
Ryan Dahl
3e98d9091f
fix: Use Buffer.writeSync in MultipartBuilder ( #7542 )
2020-09-17 17:03:05 +02:00
Ryan Dahl
46bf660e36
refactor: make fetch use op_fetch_read instead of op_read ( #7529 )
2020-09-17 16:11:55 +02:00
Bartek Iwańczuk
6c4da0e429
refactor: remove dispatch_json.js from cli/rt and cli/tsc ( #7521 )
...
Instead use Deno.core.jsonOpSync and Deno.core.jsonOpAsync
2020-09-16 22:22:43 +02:00
Ryan Dahl
104aebdfb5
Re-export deno_core::url ( #7525 )
...
Also re-exports deno_core::futures and deno_core::serde_json but these are not yet used in the CLI.
2020-09-16 14:28:07 -04:00
Ryan Dahl
c3ef358c01
Remove unnecessary extern statements
2020-09-16 13:29:42 -04:00
Ryan Dahl
0cb64cef76
Remove unnecessary serde_derive dependency
2020-09-16 13:29:42 -04:00
Bert Belder
21f2e45b0d
Revert "feat(install): bundle before installation" ( #7522 )
...
This reverts the changes introduced by PR #5276 , which made
`deno install «script»` automatically bundle the script's dependencies.
It broke the `deno install` command for a large number of scripts.
This reverts commit 34e98fa59c
.
Closes: #7492
2020-09-16 18:41:58 +02:00
Ryan Dahl
f58b10ec64
simplify global properties ( #7502 )
2020-09-16 12:41:01 -04:00
bartOssh
81ca7096c5
refactor(unstable): deno info --json output ( #7417 )
...
Provide flat JSON structured output.
Fix BrokenPipe error when piping out to "head".
2020-09-16 15:38:38 +02:00
Bartek Iwańczuk
d4a24c870e
Revert "fix(cli/http_utils): accept a single key-multiple values headers ( #7375 )" ( #7515 )
...
This reverts commit f5c84920c2
.
2020-09-16 13:34:16 +02:00
Ryan Dahl
0715803b7f
Remove http_client from CliState, store in OpState directly ( #7497 )
2020-09-15 16:15:01 -04:00
Ryan Dahl
b2fa903d64
cli/msg.rs -> cli/media_type.rs
2020-09-15 11:55:51 -04:00
Ryan Dahl
68099acbc6
Don't expose ErrWithV8Handle from deno_core
2020-09-15 11:55:51 -04:00
tokiedokie
f5c84920c2
fix(cli/http_utils): accept a single key-multiple values headers ( #7375 )
2020-09-15 07:18:48 +02:00
tokiedokie
04d3472257
refactor(cli/tests): change std_path to root_path in std_tests() ( #7438 )
2020-09-15 06:26:57 +02:00
Ryan Dahl
055dfe2ff4
Make JsRuntimeState private ( #7484 )
2020-09-14 23:49:12 -04:00
Bartek Iwańczuk
7023263b30
refactor(core): remove JsRuntime::set_js_error_create_fn ( #7478 )
...
Instead use RuntimeOptions.js_error_create_fn
2020-09-14 21:23:48 -04:00
Ryan Dahl
70f070706d
Rename deno::state::State to deno::state::CliState ( #7480 )
2020-09-14 21:22:32 -04:00
Ryan Dahl
192b8f4b99
Remove unnecessary wildcard from ts_decorators test ( #7485 )
2020-09-14 21:22:03 -04:00
Bert Belder
f5b40c918c
refactor: use the 'anyhow' crate instead of 'ErrBox' ( #7476 )
2020-09-15 01:50:52 +02:00
Bert Belder
3da20d19a1
chore: fix clippy warnings ( #7476 )
2020-09-15 00:11:20 +02:00
Kitson Kelly
5248a711ff
chore: add some traits to ast.rs ( #7479 )
2020-09-14 23:59:49 +02:00
Bartek Iwańczuk
a65bcadcf2
test: reenable TS decorator test ( #7471 )
2020-09-14 18:59:54 +02:00
Kitson Kelly
a6f34d4722
refactor: use ParsedModule and improve MediaTypes enum ( #7456 )
2020-09-14 14:27:44 +02:00
tokiedokie
e688a701e2
test(cli/tests/https_import): use ts file in localhost instead of remote ( #7431 )
2020-09-14 13:18:00 +02:00
Nayeem Rahman
f874b83aa0
test(cli/tests/unit): Enable color for js_unit_tests ( #7443 )
2020-09-14 12:46:50 +02:00
Kitson Kelly
4baf61993c
chore: add no_check_hello benchmark ( #7458 )
2020-09-14 12:25:06 +02:00
Bert Belder
530f48d2fd
Upgrade Rust crates, pin 'webpki-roots' to version 0.19.0 ( #7454 )
2020-09-14 00:20:56 +02:00
Bartek Iwańczuk
b3fa81f867
v1.4.0
2020-09-13 16:35:31 +02:00
Casper Beyer
755cfa98eb
feat(unstable): deno test --coverage ( #6901 )
...
This commit adds basic support for collecting coverage
data using "deno test".
Currently the report is only a text added to the end
of output from "deno test".
2020-09-13 15:01:30 +02:00
Bartek Iwańczuk
b216d48e5f
upgrade: deno_doc, deno_lint, dprint, swc ( #7434 )
...
upgrades:
- swc_ecmascript 0.7.7
- dprint-plugin-typescript 0.31.3
- deno_lint 0.2.0
- deno_doc 0.1.9
Split std_lint test into std_lint and unit_test_lint.
Added lint ignores to CommonJS files in std/node.
2020-09-13 14:15:38 +02:00
Bert Belder
bf70442b08
upgrade: rusty_v8 0.10.0 / V8 8.7.75 ( #7429 )
2020-09-13 13:43:50 +02:00
Luca Casonato
daa780e2cf
fix(WebSocket): no panic on failed connect + handle promise rejection via error event ( #7437 )
2020-09-13 11:52:20 +02:00
Luca Casonato
82d0f7ec84
chore: remove --no-check from deno info ( #7439 )
2020-09-12 23:34:54 +02:00
Luca Casonato
d048f58f05
chore: add systemMemoryInfo unstable diagnostic ( #7435 )
2020-09-12 16:12:14 +02:00
Kitson Kelly
10fbfcbc79
refactor: improve tsc diagnostics ( #7420 )
2020-09-12 11:53:57 +02:00
Nayeem Rahman
5276cc8592
refactor: Improve placeholder module names ( #7430 )
2020-09-12 11:33:51 +02:00
Bartek Iwańczuk
60dbc6b294
Revert "feat(unstable): Support data: urls ( #5157 )" ( #7432 )
...
This reverts commit e3319f34a6
.
2020-09-12 11:08:00 +02:00
Valentin Anger
e3319f34a6
feat(unstable): Support data: urls ( #5157 )
2020-09-11 22:40:48 +02:00
Bartek Iwańczuk
a3282aa9ed
feat(unstable): deno run --watch ( #7382 )
...
Co-authored-by: Sebastian Seedorf <mail@sebse.de>
2020-09-11 18:19:49 +02:00
Luca Casonato
fbb18d40d3
feat(unstable): enable importsNotUsedAsValues by default ( #7413 )
2020-09-11 16:22:10 +02:00
Bartek Iwańczuk
0d1f626edd
refactor(core): JsRuntime initialization ( #7415 )
...
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-11 15:18:49 +02:00
Ryan Dahl
7c2e7c6608
Use gotham-like state for ops ( #7385 )
...
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-10 09:57:45 -04:00
Nayeem Rahman
6f70e6e72b
feat(console): support CSS styling with "%c" ( #7357 )
2020-09-10 12:49:47 +02:00
Akshat Agarwal
c1b4ff61c9
feat(unstable): Add Deno.systemMemoryInfo() ( #7350 )
...
Co-authored-by: marcopacini <pacinim88@gmail.com>
Co-authored-by: Casper Beyer <caspervonb@pm.me>
2020-09-10 10:38:17 +02:00
Bartek Iwańczuk
2423a867c0
fix: panic on process.kill() after run ( #7405 )
...
This commit fixes panic caused by "unimplemented!()"
calls for some variants of "nix::errno::Errno".
Catch-all variant now returns "Error" class name
instead of panicking.
Co-authored-by: Bert Belder <bertbelder@gmail.com>
2020-09-09 22:40:16 +02:00
Bert Belder
839c59b14f
fix(cli): suppress 'WSANOTINITIALIZED' error on Deno exit ( #7408 )
...
Unblocks: #6901
2020-09-09 21:37:59 +02:00
Yusuke Tanaka
857f9b32e0
feat(fmt, lint): show number of checked files ( #7312 )
2020-09-09 16:45:31 +02:00
Bartek Iwańczuk
1fcbf9cb8a
upgrade: swc, deno_doc, deno_lint, dprint ( #7402 )
...
- deno_doc - 0.1.6
- deno_lint - 0.1.29
- dprint-plugin-typescript 0.31.1
- swc_ecmascript 0.7.3
2020-09-09 15:35:40 +02:00
Nayeem Rahman
b17a5fbcfa
fix(op_crates/web): Use "deno:" URLs for internal script specifiers ( #7383 )
2020-09-09 14:23:57 +02:00
Bartek Iwańczuk
c14436a424
fix(tsc): config resolution using relative paths ( #7392 )
2020-09-09 13:37:22 +02:00
uki00a
ac455050ee
feat(console): print proxy details ( #7139 )
2020-09-08 16:06:26 +02:00
Luca Casonato
6ff9395532
feat(unstable): enable isolatedModules by default ( #7327 )
2020-09-08 15:28:42 +02:00
Bartek Iwańczuk
241d228104
upgrade: deno_doc to 0.1.5 ( #7391 )
2020-09-08 13:02:14 +02:00
EathonYe
05c46f5969
fix(cli): colors mismatch ( #7367 )
2020-09-08 12:04:02 +02:00
David Sherret
ab7f93caf1
upgrade: dprint-plugin-typescript 0.31.0 ( #7381 )
2020-09-08 11:58:17 +02:00
Casper Beyer
1d0f1ed446
fix: Empty Response body returns 0-byte array ( #7387 )
2020-09-08 11:46:15 +02:00
KrisChambers
1cd2267500
feat(info): Dependency count and sizes ( #6786 )
...
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-07 15:59:47 +02:00
Bartek Iwańczuk
f57a2c1e85
refactor(core): rename CoreIsolate to JsRuntime ( #7373 )
...
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-06 21:44:29 +02:00
Bartek Iwańczuk
803bdd37c7
refactor(core): merge CoreIsolate and EsIsolate ( #7370 )
2020-09-06 16:50:49 +02:00
Bert Belder
c821e8f2f1
Move JSON ops to deno_core ( #7336 )
2020-09-06 02:34:02 +02:00
crowlKats
8c880d3261
feat: Implement WebSocket API ( #7051 )
2020-09-05 10:39:25 -04:00
Yoshiya Hinosawa
34e98fa59c
feat(install): bundle before installation ( #5276 )
2020-09-05 13:31:14 +02:00
Bartek Iwańczuk
a14b3c9e30
v1.3.3
2020-09-04 18:15:24 +02:00
Ryan Dahl
e7147786f4
run cargo update ( #7348 )
2020-09-04 11:24:23 -04:00
Kitson Kelly
9e50b3ee61
fix: don't expose globalThis.__bootstrap ( #7344 )
2020-09-04 07:52:19 -04:00
迷渡
c44c45a334
docs: fix anchor link ( #7346 )
2020-09-04 06:43:51 -04:00
Ryan Dahl
a10339cb20
fix: Handle bad redirects more gracefully ( #7342 )
2020-09-04 06:43:20 -04:00
Bartek Iwańczuk
2b43ce65ae
fix: regex for TS refereces and deno-types ( #7333 )
2020-09-04 10:44:31 +02:00
tokiedokie
fcee4265c6
support env_logger / RUST_LOG ( #7142 )
2020-09-03 16:16:49 -04:00
Bartek Iwańczuk
dbd941148c
refactor: use dependency analyzer from SWC ( #7334 )
2020-09-03 17:11:30 +02:00
Bartek Iwańczuk
c6ccaf064a
upgrade: swc, deno_doc, deno_lint, dprint ( #7332 )
2020-09-03 13:29:02 +02:00
Ryan Dahl
a4439800e6
Remove unnecessary stdout pipes in tests ( #7322 )
2020-09-02 18:31:22 +02:00
YellowBird
5db200b6ab
fix(docs): replace "eslint-ignore-" with "eslint-disable-" ( #7319 )
2020-09-02 12:03:35 +02:00
Luca Casonato
fe47da9f23
chore: multi line deno_lint diagnostics ( #7303 )
2020-09-02 11:39:20 +02:00
Bartek Iwańczuk
b21f318e68
fix: support missing features in --no-check ( #7289 )
...
This commit adds "EmitTranspileOptions" to "transpile()" function,
that allows to configure transpilation process based on the
currently loaded "tsconfig.json".
2020-09-02 11:12:18 +02:00
Ryan Dahl
050c865af4
deno_web 0.6.0 ( #7317 )
2020-09-02 00:02:05 +02:00
Ryan Dahl
ce63806c64
simplify deno_web init ( #7313 )
2020-09-01 16:32:07 -04:00
Yoshiya Hinosawa
b3563e8569
fix(URLSearchParams): fix handling of + character ( #7314 )
2020-09-01 20:34:41 +02:00
Casper Beyer
87e513ffc5
fix: use millisecond precision for Deno.futime and Deno.utime ( #7299 )
2020-09-01 10:03:07 -04:00
Casper Beyer
644190eed8
test(std): ensure mod.ts modules have a test coverage ( #7264 )
2020-08-31 22:26:55 -04:00
Casper Beyer
94d38eee4c
replace utime crate with filetime ( #7268 )
2020-08-31 22:24:17 -04:00
Michael Kurze
b751122e10
fix(doc): fix some typos in cli docs ( #7292 )
2020-08-31 22:18:06 -04:00
Ryan Dahl
4b5d8bdbaf
set maximum size of thread pool to 31 ( #7290 )
2020-08-31 17:38:25 -04:00
Casper Beyer
32de714dc7
feat(unstable): add Deno.futime and Deno.futimeSync ( #7266 )
2020-08-31 14:29:43 -04:00
Bartek Iwańczuk
c82c3b982e
refactor: Compiler config in Rust ( #7228 )
...
* 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-31 20:12:24 +02:00
Yusuke Tanaka
71f0171ab0
fix no-inner-declaration lint rule ( #7287 )
2020-08-31 14:11:17 -04:00
Trivikram Kamat
0071dfdc5c
update actions to run on ubuntu-18.04 ( #7160 )
2020-08-31 11:48:58 -04:00
Yusuke Tanaka
fa65e49bc6
feat(lint): Add support for reading input from stdin ( #7263 )
2020-08-31 13:53:42 +02:00
Casper Beyer
a451a97486
fix(cli): use upstream type definitions for WebAssembly ( #7216 )
2020-08-31 12:04:47 +02:00
Bartek Iwańczuk
5c23388f6d
upgrade: swc, deno_doc, deno_lint, dprint ( #7276 )
2020-08-31 11:48:44 +02:00
Yusuke Tanaka
7799b797d1
chore: remove unreachable code to pass linter ( #7270 )
2020-08-31 11:10:28 +02:00
Bartek Iwańczuk
d761246e16
refactor: remove dead code in tsc ( #7277 )
2020-08-31 11:02:13 +02:00
Bartek Iwańczuk
ac705b7936
v1.3.2
2020-08-29 09:53:13 -04:00
Yusuke Tanaka
0d11f3504b
fix(lint): use recommended rules set ( #7222 )
2020-08-29 12:58:20 +02:00
Nayeem Rahman
d6dc797d15
fix(URL): Add missing part assignment ( #7239 )
2020-08-29 10:12:10 +02:00
Yoshiya Hinosawa
00b6762412
test(cli/flags): restore disabled test cases ( #7236 )
2020-08-28 19:20:57 -04:00
Bartek Iwańczuk
7e946858a4
refactor: migrate ops to new dispatch wrapper ( #7118 )
2020-08-28 17:08:24 +02:00
Valentin Anger
31f32ed8c4
Move benchmarks to Rust ( #7134 )
...
All benchmarks are done in Rust and can be invoked with
`cargo bench`.
Currently this has it's own "harness" that behaves like
`./tools/benchmark.py` did.
Because of this tests inside `cli/bench` are currently not run.
This should be switched to the language provided harness
once the `#[bench]` attribute has been stabilized.
2020-08-28 09:03:50 -04:00
Nayeem Rahman
3d23208019
fix(deno install): Strip "@..." suffixes from inferred names ( #7223 )
2020-08-27 16:55:58 -04:00
Yusuke Tanaka
6d964fc607
test(url_test): disable no-self-assign
rule here ( #7204 )
2020-08-26 15:01:03 -04:00
Bartek Iwańczuk
4a0bc747dd
upgrade: swc, deno_doc, deno_lint, dprint ( #7194 )
2020-08-26 20:43:24 +02:00
Luca Casonato
a7fd3a4f58
fix(cli): revert "never type check deno info #6978 " ( #7199 )
2020-08-26 20:27:06 +02:00
Bert Belder
c8b5f1e454
Simplify ErrBox-to-class mapping & hook it up to core json ops ( #7195 )
2020-08-26 18:48:04 +02:00
Bert Belder
aead9dc91e
Remove some more unnecessary 'to_string()' calls ( #7190 )
2020-08-26 01:13:20 +02:00
Bert Belder
9bfb0df805
refactor: remove OpError, use ErrBox everywhere ( #7187 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2020-08-26 00:22:15 +02:00
Kitson Kelly
c4d5b01acf
feat: update to TypeScript 4.0 ( #6514 )
2020-08-24 19:43:54 -04:00
Tuan Le
545ea8e217
fix(console): handle escape sequences when logging objects ( #7171 )
2020-08-24 12:38:21 -04:00
Rob Palmer
0cbf9bdbbd
Fix incorrect comment on useDefineForClassFields ( #6386 )
2020-08-24 18:37:30 +02:00
Casper Beyer
dcc7348090
test(cli): use assertThrows and assertThrowsAsync for chown tests ( #7106 )
2020-08-24 18:21:56 +02:00
Yoshiya Hinosawa
111a2fbe3e
refactor(cli/build.rs): extract ts version ( #7127 )
2020-08-24 17:52:05 +02:00
Bartek Iwańczuk
2600d5ac09
fix(doc): stack overflow for .d.ts files ( #7167 )
2020-08-23 15:48:35 +02:00
Bartek Iwańczuk
c1558beffb
upgrade: swc, dprint, deno_lint, deno_doc ( #7162 )
2020-08-23 13:57:09 +02:00
Nayeem Rahman
d444bd89db
fix(URL): Don't encode "'" in non-special query strings ( #7152 )
2020-08-21 22:35:34 -04:00
Bartek Iwańczuk
999e5cf3d4
v1.3.1
2020-08-21 18:11:33 +02:00
迷渡
9eca347f73
fix(docs): remove Deno.dir ( #7144 )
2020-08-21 15:56:12 +02:00