Bartek Iwańczuk
636af2850c
refactor(cli): rename fs module to fs_util ( #8380 )
...
This commit renames "fs" module in "cli/" to "fs_util". This is purely
cosmetic change; there were a few places which aliased "crate::fs"
to "deno_fs" which was very confusing with "fs" module in ops.
2020-11-16 20:48:50 +01:00
Mark Tiedemann
dd9c204884
Improve Deno.version type declaration ( #8391 )
2020-11-16 14:36:00 -05:00
Bartek Iwańczuk
ab7b8ba8d1
v1.5.3
2020-11-16 11:14:00 +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
Bartek Iwańczuk
2cbf5c26ac
feat(lint): support --rules --json ( #8384 )
...
This commit adds support for "--json" flag in combination
with "--rules". List of rules is serialized to JSON and printed.
2020-11-14 20:51:30 +01:00
Yusuke Tanaka
9029003046
build: update dlint to v0.2.10 ( #8284 )
...
Update prebuilt "dlint" binary to v0.2.10 and fix diagnostics
for "require-await" rule.
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2020-11-14 20:27:37 +01:00
Benjamin Gruenbaum
3d65e57d7c
fix: fix various global objects constructor length ( #8373 )
...
This commit changes various Web APIs constructors to
match their signature in the browser.
2020-11-14 13:10:23 +01:00
Yusuke Tanaka
3a0ebff641
fix(fmt, lint): Make sure that target paths are not directory ( #8375 )
...
This commit merges implementations of "collect_files" and "files_in_subtree",
leaving only the former. Additionally it was ensured that directories are not yielded
from this function.
2020-11-14 13:05:26 +01:00
Divy Srivastava
d5661f677e
refactor: deno_crypto op crate ( #7956 )
...
This commit factors out "deno_crypto" op crate.
"rand" crate dependency was consequently moved to
"deno_crypto" crate and reexported.
2020-11-13 22:01:57 +01:00
KNnut
2c8439bc1e
refactor(cli+core): various cleanups in Rust ( #8336 )
2020-11-13 09:17:31 +11:00
Max Drosdo.www
444c2cda4f
refactor(cli): minor cleanup of main.rs ( #8362 )
2020-11-13 08:49:59 +11:00
Akshat Agarwal
c744ee2756
fix(cli): don't walk the subdirectory twice when using the --ignore
flag ( #8040 )
...
This commit reworks "collect_files" utility to accept "ignore" parameter
which allows to filter out files in a single iteration instead of walking
file tree second time to excude "ignored" files.
2020-11-11 20:53:55 +01:00
Benjamin Gruenbaum
a55e689e38
fix(op_crates/web): FileReader event handler order ( #8348 )
2020-11-11 16:59:49 +01:00
Benjamin Gruenbaum
b255a05f18
fix(web/worker) define event handlers in DOM order ( #8334 )
2020-11-10 07:15:42 -05:00
Andrew Mitchell
97a9620a01
test(cli/upgrade): remove test_compose_url_to_exec ( #8329 )
2020-11-10 10:41:33 +01:00
Benjamin Gruenbaum
94b68f9069
fix(cli/rt): dom handler order in websocket ( #8320 )
2020-11-10 14:34:42 +11:00
Kitson Kelly
0982056ff6
tests(cli): check ignores dynamic import errors ( #8323 )
...
Closes #6618
2020-11-10 10:18:43 +11:00
Kitson Kelly
c1fa8fbeba
fix(cli): allow root modules be .mjs/.cjs ( #8310 )
...
Fixes #6176
2020-11-10 10:10:41 +11:00
Kitson Kelly
b402b75c1d
fix(cli): allow setting of importsNotUsedAsValues in Deno.compile() ( #8306 )
...
Fixes #6663
2020-11-10 06:50:33 +11:00
Kitson Kelly
5375bf2e3f
fix(cli): allow declaration emits for Deno.compile() ( #8303 )
...
Fixes #8289
2020-11-10 06:49:15 +11:00
Scott Olson
57c2608e98
fix(cli): Use safe shell escaping in deno install
( #7613 )
2020-11-09 14:08:12 -05:00
KNnut
aaf7166a9d
refactor(cli): remove unnecessary format! calls ( #8315 )
2020-11-09 15:38:29 +01:00
Kitson Kelly
293cae5e1f
fix(cli): do not write tsbuildinfo when diagnostics are emitted ( #8311 )
...
Fixes #8309
2020-11-09 21:21:49 +11:00
Kitson Kelly
71d7482577
v1.5.2 ( #8301 )
2020-11-09 10:58:21 +11:00
Bartek Iwańczuk
a269dffe17
chore: remove dead code ( #8298 )
2020-11-08 23:35:36 +01:00
Bartek Iwańczuk
6743383d2e
upgrade: deno_doc, deno_lint, dprint, swc ( #8292 )
2020-11-08 23:27:36 +01:00
crowlKats
5995c58e63
refactor: auto detect target triples for upgrade ( #8286 )
2020-11-08 11:54:35 +01:00
Mo
ccc95bc9b9
refactor: rewrite permission_test to not depend on Python ( #8291 )
2020-11-08 11:50:27 +01:00
Kitson Kelly
e9edc05bed
fix(cli): ensure that transitory dependencies are emitted ( #8275 )
...
Fixes #8111
2020-11-08 07:00:42 +11:00
Kitson Kelly
88c4d3145b
fix(cli): allow remapping to locals for import map ( #8262 )
...
Fixes #7723
2020-11-07 15:04:22 +11:00
Kitson Kelly
4f67f0cc60
fix(cli): properly handle type checking root modules with type defini… ( #8263 )
2020-11-07 06:53:37 +11:00
Kitson Kelly
5f7c80986f
fix(cli): correct libs sent to tsc for unstable worker ( #8260 )
...
Fixes #8257
2020-11-06 12:10:19 +11:00
Kitson Kelly
96e03e0b93
refactor(cli): refactor file_fetcher ( #8245 )
2020-11-06 11:38:21 +11:00
Bartek Iwańczuk
791119d4af
build: rewrite tools/ scripts to deno ( #8247 )
...
This commit rewrites scripts in "tools/" directory
to use Deno instead of Python. In return it allows
to remove huge number of Python packages in "third_party/".
2020-11-05 15:53:21 +01:00
ali ahmed
e7cfd90b0f
fix(cli/repl): Fixing syntax highlighting ( #8202 )
...
Fixes #8240
2020-11-05 14:08:01 +11:00
Ryan Dahl
ea8a598f7b
Remove dead code ( #8235 )
2020-11-03 13:22:33 -05:00
Bartek Iwańczuk
8e914be742
build: migrate to dlint ( #8176 )
...
This commit migrates repository from using "eslint"
to "dlint" for linting JavaScript code.
2020-11-03 16:19:29 +01:00
Yoshiya Hinosawa
e736d0f60f
fix(prompt): fix display of non-ASCII characters on Windows ( #8199 )
2020-11-03 01:15:29 +01: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
Trivikram Kamat
40cd4db974
feat(cli): bump TypeScript to 4.0.5 ( #8138 )
2020-11-03 06:39:39 +11:00
Yoshiya Hinosawa
397fec63d1
fix(op_crates/web): fix URLSearchParams, malformed url handling ( #8092 )
...
Co-authored-by: Evan <c4t@tuta.io>
2020-11-02 18:58:29 +01:00
Benjamin Gruenbaum
a8ca9fe7bb
test(op_crates/web): add EventTarget tests ( #8205 )
2020-11-02 18:42:22 +01:00
Yoshiya Hinosawa
0e5c8c03ac
add commit hash and target to long_version output ( #8133 )
2020-11-02 12:40:33 -05:00
Kitson Kelly
272e9b82eb
fix(cli): inject helpers when transpiling via swc ( #8221 )
...
Fixes #8212
2020-11-02 22:33:43 +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
Benjamin Gruenbaum
9397cf508e
fix(op_crates/web): make TextEncoder work with forced non-strings ( #8206 )
...
Fixes: #8201
2020-11-02 10:57:18 +11:00
Nayeem Rahman
d9b8778c45
refactor(cli/permissions): Cleanup Flags to Permissions conversion ( #8213 )
2020-10-31 23:44:42 +01:00
Luca Casonato
03769f11b5
v1.5.1
2020-10-31 15:32:43 +01:00
Bartek Iwańczuk
2a36e2f892
upgrade: deno_doc, deno_lint, dprint, swc ( #8197 )
...
- deno_doc 0.1.14
- deno_lint 0.2.7
- dprint-plugin-typescript 0.32.7
- swc_bundler 0.14.1
- swc_ecmascript 0.13.1
2020-10-30 20:39:53 +01:00
Bartek Iwańczuk
ce75101e3e
fix: Deno.fdata(), Deno.fdatasync() ( #8193 )
...
These APIs were stabilized in 1.5.0, but were
never added to the "stable" Deno namespace. This
commit fixes that.
2020-10-30 13:06:09 +01:00
Bartek Iwańczuk
4f57ca0daf
fix: panic in bundler ( #8168 )
...
This commit fixes panic in bundler which was caused
by not setting thread-local slots.
2020-10-30 12:19:49 +01:00
Nayeem Rahman
6be6c517d0
fix(cli/fmt): Strip "\\?\" prefix when displaying Windows paths ( #8135 )
2020-10-30 03:19:03 +01:00
Sander Hahn
1854c6f73b
fix(cli): prompt works with windows eol and eof ( #8149 )
2020-10-29 18:35:58 +01:00
Luca Casonato
8d99adb6c4
refactor: don't spin up V8 for deno cache
( #8186 )
2020-10-29 14:19:55 +01:00
Kitson Kelly
b0482400c9
fix(cli): make hashes of tsconfig deterministic ( #8167 )
...
Fixes #8163
2020-10-29 21:18:18 +11:00
Yusuke Tanaka
bfce376c68
refactor(watch): create single watcher for whole process ( #8083 )
...
This commit rewrites file watcher used with --watch flag.
Instead of creating new watcher after each restart, only a single
watcher is created for whole process. Additionally debouncing
mechanism has been added to prevent infinite restart loops
if multiple files were changed in quick succession.
Co-authored-by: bartossh <lenart.consulting@gmail.com>
2020-10-28 12:41:18 +01:00
Kevin (Kun) "Kassimo" Qian
07359b7957
fix(repl): don't hang on unpaired braces ( #8151 )
...
Previously, entering a single ']' would cause repl to forever accepting
new lines, due to that `ValidationResult::Invalid` would actually be
consumed by the editor itself while continue building the lines. Instead
we should mark it as `Valid` and send the bad input for evaluation to
get the proper error from V8.
Before:
```
> ]
(you can keep entering new line here, and it will never consume input
until you Ctrl-C)
```
After:
```
> ]
Uncaught SyntaxError: Unexpected token ']'
>
```
2020-10-28 06:03:17 -04:00
Kitson Kelly
e01664d0ae
fix(cli): module graph handles redirects properly ( #8159 )
...
Fixes #8154
2020-10-28 20:38:09 +11:00
Kitson Kelly
6844caa9a5
fix(cli): restore tripleslash lib refs support ( #8157 )
...
Fixes #8147
2020-10-28 11:52:20 +11:00
Bartek Iwańczuk
dd01f206da
v1.5.0
...
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2020-10-27 16:00:23 +01:00
Ross Weir
60cd7695ef
fix(cli): handle URL paths in Deno.mkdir() ( #8140 )
2020-10-27 13:21:32 +01:00
Kitson Kelly
5af1dcfe29
fix(cli): do not throw on empty typescript files ( #8143 )
...
Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2020-10-27 13:19:27 +01:00
Ross Weir
9fb4931a95
fix(op_crates/web): Expose event properties in console output ( #8103 )
...
Fixes #8073
2020-10-27 09:22:03 +11:00
Kitson Kelly
b03f4a4a1c
fix(cli): restore permission check on workers ( #8123 )
...
Fixes #8120
2020-10-27 06:56:00 +11:00
Luca Casonato
acc201625f
chore: add bundle_no_check benchmark ( #8130 )
2020-10-26 19:57:29 +01:00
Ryan Dahl
c4d33e8d77
fix: Use -rw-r--r-- for cache files ( #8132 )
2020-10-26 12:58:58 -04:00
Tim Reichen
ae86cbb551
rename(std/testing): rename assert*Contains to assert*Includes ( #7951 )
...
This commit renames two assertion functions to better align with JS API:
- assertStringContains -> assertStringIncludes
- assertArrayContains -> assertArrayIncludes
2020-10-26 16:03:30 +01:00
Elias Sjögreen
305a9c04ba
feat(unstable): add Deno.systemCpuInfo() ( #7774 )
2020-10-26 10:54:27 -04:00
Kid
4c41ba5ad7
fix(op_crates/fetch): ensure Request.method to be string ( #8100 )
...
Ensure "Request.method" to be the default value ("GET") if
"init.method" is not defined, which follows browser's behavior.
2020-10-26 15:02:08 +01:00
Bartek Iwańczuk
57cad53945
refactor(cli): rewrite Deno.transpileOnly() to use SWC ( #8090 )
...
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
2020-10-26 14:03:03 +01:00
Bartek Iwańczuk
aebbdd5cc2
Revert "feat(lint): stabilize "deno lint" subcommand ( #8075 )" ( #8128 )
...
This reverts commit c5c48f845a
.
2020-10-26 13:36:13 +01:00
Nayeem Rahman
822e5b6536
fix(core/runtime): Indicate exceptions in promises ( #8124 )
...
Fixes #4879
2020-10-26 14:34:00 +11:00
Ross Weir
ece1e1d5f1
feat(cli): pass script args for test command ( #8121 )
...
Closes #8096
2020-10-26 11:25:43 +11:00
Kitson Kelly
3d19fb493b
fix(cli): properly handle roots with extensions that don't match media type ( #8114 )
2020-10-26 07:17:58 +11:00
Bartek Iwańczuk
95854b88ad
refactor(run): use new module graph for run --watch ( #8085 )
...
This commit changes how "deno run --watch" is implemented
by migrating to use ModuleGraph2.
2020-10-25 01:27:00 +02:00
Kitson Kelly
dd952818bc
test(cli): ensure modules can export typed JS files ( #8101 )
...
Closes #5935
2020-10-25 07:05:33 +11:00
Kitson Kelly
117fcf61f0
test(cli): dynamic imports not evaluated until runtime ( #8102 )
...
Closes #7997
2020-10-25 07:02:11 +11:00
Bartek Iwańczuk
35f184cdcc
refactor: use of lock file in ModuleGraph2 ( #8087 )
2020-10-23 23:01:54 +02:00
Bartek Iwańczuk
9d36331278
Revert "feat(cli): Add deno cache --test and --worker ( #7920 )" ( #8089 )
...
This reverts commit be15cf285d
.
2020-10-23 16:56:25 +02:00
Nayeem Rahman
be15cf285d
feat(cli): Add deno cache --test and --worker ( #7920 )
2020-10-23 13:31:49 +02:00
Toan Nguyen
29e05bb014
fix: typos in cli and core ( #8082 )
2020-10-23 13:19:37 +02:00
Kitson Kelly
ab898556a4
refactor(cli): move bundle check to new infrastructure ( #8071 )
2020-10-23 22:05:41 +11:00
Nayeem Rahman
a3024a6dc5
BREAKING(cli/tsc): Enable isolatedModules by default ( #8050 )
2020-10-23 12:38:35 +02:00
Nikolai Vavilov
f56c7868ab
docs(cli): update link to dprint-plugin-typescript ( #8052 )
2020-10-23 12:21:02 +11: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
Bartek Iwańczuk
c5c48f845a
feat(lint): stabilize "deno lint" subcommand ( #8075 )
...
This commit stabilizes "deno lint" by removing
the need to pass --unstable flag.
--unstable is still required when using --json flag.
2020-10-22 21:52:37 +02:00
Bartek Iwańczuk
9b20cfbee8
upgrade: deno_doc, deno_lint, dprint, swc ( #8077 )
...
- deno_doc 0.1.13
- deno_lint 0.2.5
- dprint-plugin-typescript 0.32.6
- swc_bundler 0.12.0
- swc_ecmascript 0.11.1
2020-10-22 20:36:06 +02:00
Divy Srivastava
d592c128cf
chores(cli/fmt): make --ignore stable ( #7922 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2020-10-22 19:04:35 +02:00
nerix
0a2f0fe7f2
fix(cli/rt/websockets): Only add Sec-WebSocket-Protocol if it's not empty ( #7936 )
2020-10-22 17:09:44 +02:00
Akshat Agarwal
d6c824a6c3
refactor(cli): use PathBuf instead of String for lint and fmt subcommands ( #8042 )
2020-10-21 13:12:01 +02:00
Kitson Kelly
0fb39f9176
feat(cli): add types for WeakRef/FinalizationRegistry ( #8056 )
...
Fixes #8051
2020-10-21 21:57:01 +11:00
Ryan Dahl
9e2e2dfb20
bump versions for op crates ( #8048 )
2020-10-20 10:31:20 -04:00
Casper Beyer
dfe19c5c75
feat: stabilize Deno.fsync and Deno.fdatasync ( #8038 )
2020-10-20 09:52:10 -04: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
aca
9cf06f76fd
fix(op_crates/web): TextEncoder should return error message with original input ( #8005 )
2020-10-20 13:47:38 +02:00
Casper Beyer
d9ae74019e
fix(cli): use rid getter for stdio ( #8014 )
...
This changes the rid of Deno.stdin, Deno.stdout, Deno.stderr from a
mutable property into a getter to match the rid semantics of Deno.File.
2020-10-20 13:20:17 +02:00
Nayeem Rahman
7aba07cc77
fix(cli/worker): Print error stacks from the origin Worker ( #7987 )
...
Fixes #4728
2020-10-20 15:05:42 +11:00
Kitson Kelly
57e95032c8
feat(cli): add support for bundle --no-check ( #8023 )
...
Fixes #6686
2020-10-20 14:10:42 +11:00
Jesse Jackson
992c2a436e
fix(cli/rt/performance): check for object props in startOrMeasureOptions before throwing ( #7884 )
...
Fixes #7876
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2020-10-20 13:43:29 +11:00
Leonard Ginters
623ac9e6df
fix(op_crates/web): TextEncoder should throw RangeError ( #8039 )
...
This commit changes error type thrown by TextEncoder, when
provided encoding is not supported matching Chromium behavior.
2020-10-19 23:56:29 +02:00
Absebo
1474d5d76d
fix(cli): Handling of relative importmaps while using watch ( #7950 )
2020-10-19 23:53:39 +02:00
Casper Beyer
c488468b32
feat(cli/repl): add tab completion ( #7827 )
...
This commit adds tab completion in REPL.
Currently it works only for global identifiers and object properties.
2020-10-19 21:25:21 +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
Casper Beyer
9d664f8375
fix(cli/repl): ignore pair matching inside literals ( #8037 )
2020-10-19 19:13:23 +02:00
Luca Casonato
08441b855d
fix(op_crates/fetch): Body.body should be stream of Uint8Array ( #8030 )
2020-10-19 17:01:36 +02:00
Casper Beyer
35028db5e5
fix(cli/repl): unterminated string literal should invalidate ( #7896 )
...
This adds the grave character to the pair matching so that template
string literals trigger multi-line edits.
2020-10-19 16:54:50 +02:00
vwkd
e432db70e9
docs: readTextFile / readTextFileSync throw when reading directory ( #7999 )
2020-10-19 15:06:04 +02:00
Casper Beyer
8eb44537ec
fix(cli/repl): keyboard interrupt should continue ( #7960 )
...
This changes the behavior of keyboard interrupts (ctrl+c) to continue,
clearing the current line instead of exiting.
Exit can still be done with ctrl+d or by calling close().
2020-10-19 14:06:21 +02:00
Casper Beyer
f5c23f8058
fix(cli/repl): write all results to stdout ( #7893 )
...
This writes all evaluaton results to stdout regardless if the result is
an error or not.
This matches the behavior of other read-eval-print-loops like Node.
2020-10-19 13:41:25 +02:00
Ryan Dahl
fb2cae9687
deno_core 0.64.0 ( #8025 )
2020-10-19 06:35:09 -04:00
Bartek Iwańczuk
8f9da368f7
refactor(lint): show hint for lint errors ( #8016 )
...
This commit adds formatting of optional "hint" that
can be present in lint diagnostic.
2020-10-18 16:26:05 +02:00
Casper Beyer
b33e8d5d42
refactor(cli/repl): extract is_closing to a function ( #8015 )
...
This extracts is closing into a function so that it can easily be used
as the condition for the loop.
2020-10-18 16:19:47 +02:00
Bartek Iwańczuk
c1c7601304
upgrade: deno_doc, deno_lint, dprint, swc ( #8009 )
2020-10-17 17:08:23 +02:00
William Perron
943b0980c7
feat(cli/ops): add the sleep_sync op ( #7974 )
2020-10-15 21:06:31 -04:00
Kitson Kelly
bbe4474d39
fix(cli): ModuleGraph2 properly handles redirects ( #7981 )
2020-10-16 10:34:55 +11:00
Bartek Iwańczuk
bd0c64b9ae
Reland feat(cli/console): inspect with colors regardless of Deno.noColor ( #7976 )
2020-10-15 12:32:03 +02:00
Bartek Iwańczuk
81635c59e6
Revert "feat(cli/console): inspect with colors regardless of Deno.noColor ( #7778 )" ( #7973 )
...
This reverts commit f75bd89aff
.
2020-10-14 18:54:29 +02:00
TTtie
f75bd89aff
feat(cli/console): inspect with colors regardless of Deno.noColor ( #7778 )
...
This commit adds the ability for users to inspect items stylized
with ANSI colors regardless of the value of Deno.noColor.
2020-10-14 17:51:56 +02:00
vwkd
f9489e9acb
fix typos ( #7964 )
2020-10-14 10:28:21 -04:00
Bartek Iwańczuk
12e700bddf
fix(test): return error when awaiting unresolved promise ( #7968 )
...
This commit fixes test runner by awaitning "Deno.runTests()" call,
which ensures proper error is returned when there's an unresolved
promise that's being awaited.
2020-10-14 15:19:13 +02:00
Yoshiya Hinosawa
e9f02c2314
fix(console): fix the test cases of function inspections ( #7965 )
2020-10-14 15:01:03 +02:00
Casper Beyer
e2a1a7c937
refactor(cli/repl): clean up prelude injection ( #7967 )
...
This extracts prelude injection into a helper function and moves the
prelude string literal into a top level static string to help trim some
of the fat out of the run function.
2020-10-14 14:34:05 +02:00
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