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

324 commits

Author SHA1 Message Date
David Sherret
73504d76b2
fix(task): resolve deno configuration file first from specified --cwd arg (#15257) 2022-07-20 10:36:14 -04:00
David Sherret
0ab262b901
feat: emit files on demand and fix racy emit (#15220) 2022-07-19 11:58:18 -04:00
Leo Kettmeir
2eb27c92db
fix: WebSocketStream ping event causes pending promises (#15235) 2022-07-18 22:49:49 +02:00
Roj
70d1ecaeaa
feat(cli): support configuring the test tool in the config file (#15079) 2022-07-18 15:12:19 -04:00
Bartek Iwańczuk
999cbfb52b
feat: import.meta.resolve() (#15074)
This commit adds new "import.meta.resolve()" API which
allows to resolve specifiers relative to the module the API
is called in. This API supports resolving using import maps.
2022-07-18 20:05:26 +02:00
David Sherret
0d73eb3dd9
chore: fix flaky captured_output (#15234) 2022-07-18 13:20:15 -04:00
Mark Ladyshau
ee0c0586b3
feat(cli/test): add DENO_JOBS env variable for test subcommand (#14929) 2022-07-15 10:29:55 -04:00
Bartek Iwańczuk
f9b692e68e
Revert "feat: add "unhandledrejection" event support (#12994) (#15080)" (#15210)
This reverts commit 1a7259b04b.
2022-07-15 01:06:20 +02:00
Bartek Iwańczuk
1a7259b04b
feat: add "unhandledrejection" event support (#12994) (#15080)
Relanding #12994 

This commit adds support for "unhandledrejection" event.

This event will trigger event listeners registered using:

"globalThis.addEventListener("unhandledrejection")
"globalThis.onunhandledrejection"
This is done by registering a default handler using
"Deno.core.setPromiseRejectCallback" that allows to
handle rejected promises in JavaScript instead of Rust.

This commit will make it possible to polyfill
"process.on("unhandledRejection")" in the Node compat
layer.

Co-authored-by: Colin Ihrig <cjihrig@gmail.com>
2022-07-14 22:39:20 +02:00
Rafael Ávila de Espíndola
a34ed568e9
fix(cli): expand tsc roots when using checkJs (#15164)
A JS file can still point to a TS file, so we need to expand the roots
in the checkJs case too.

Fixes: #15163
2022-07-14 10:40:47 -04:00
2shiori17
0aca3f0690
fix(cli): Improve error message in watch mode (#15184) 2022-07-13 22:01:09 +02:00
David Sherret
667812a297
fix(cli): synchronize async stdio/file reads and writes (#15092)
Fixes a regression where async writes and reads could get out of order.
2022-07-13 11:16:42 -04:00
David Sherret
944d708e3c
chore: fix pty_complete_imports test on linux/mac (#15191) 2022-07-13 10:49:14 -04:00
David Sherret
3a4e95c431
fix(repl): do not panic for import completions when the import specifier is empty (#15177) 2022-07-12 21:56:48 -04:00
David Sherret
0c87dd1e98
perf: use emit from swc instead of tsc (#15118) 2022-07-12 18:58:39 -04:00
David Sherret
2ff3e8a6c5
chore: fix repl::pty_emoji test on linux (#15166) 2022-07-12 11:05:56 -04:00
Kitson Kelly
5db16d1229
fix(lsp): enable auto imports (#15145)
Fixes: #15111
2022-07-12 09:35:18 +10:00
Nayeem Rahman
989c723130
perf(cli/proc_state): Get error source lines from memory (#15031) 2022-07-11 20:43:47 +02:00
Bartek Iwańczuk
06934db883
Revert "feat: add "unhandledrejection" event support (#12994)" (#15075)
This reverts commit f7af0b01a5.
2022-07-04 23:34:39 +02:00
Bartek Iwańczuk
f7af0b01a5
feat: add "unhandledrejection" event support (#12994)
This commit adds support for "unhandledrejection" event.

This event will trigger event listeners registered using:

"globalThis.addEventListener("unhandledrejection")
"globalThis.onunhandledrejection"
This is done by registering a default handler using
"Deno.core.setPromiseRejectCallback" that allows to
handle rejected promises in JavaScript instead of Rust.

This commit will make it possible to polyfill
"process.on("unhandledRejection")" in the Node compat
layer.

Co-authored-by: Colin Ihrig <cjihrig@gmail.com>
2022-07-04 21:14:58 +02:00
Bartek Iwańczuk
b8b82c3ea4
chore: use Rust 1.62.0 (#15028) 2022-07-01 15:28:06 +02:00
David Sherret
e46584a75a
fix(vendor): ignore import map in output directory instead of erroring (#14998) 2022-06-29 20:41:48 -04:00
Colin Ihrig
0f6a5c5fc2
feat(web): add beforeunload event (#14830)
This commit adds the 'beforeunload' event.

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-06-28 10:49:30 -04:00
Andreu Botella
38505db391
fix(modules): Immediately resolve follow-up dyn imports to a dyn imported module (#14958)
When a dynamically imported module gets resolved, any code that comes after an
await import() to that module will continue running. However, if that is the
last code in the evaluation of another dynamically imported module, that second
module will not resolve until the next iteration of the event loop, even though
it does not depend on the event loop at all.

When the event loop is being blocked by a long-running operation, such as a
long-running timer, or by an async op that might never end, such as with workers
or BroadcastChannels, that will result in the second dynamically imported module
not being resolved for a while, or ever.

This change fixes this by running the dynamic module loading steps in a loop
until no more dynamic modules can be resolved.
2022-06-25 20:56:29 +02:00
Bartek Iwańczuk
d39094913e
fix: don't error if Deno.bench() or Deno.test() are used in run subcommand (#14946) 2022-06-24 12:00:53 +02:00
Nayeem Rahman
ef7bc5e0a6
fix(check): ignore TS2306 (#14940)
Fixes a regression where this type checking error was being surfaced in certain scenarios.
2022-06-23 12:18:32 -04:00
Bartek Iwańczuk
1e3713c3bc
fix(fmt): ignore node_modules directory (#14943) 2022-06-23 01:17:49 +02:00
David Sherret
3455f16079
chore(test_util): add new string assertion macros (#14928) 2022-06-21 15:25:07 -04:00
sigmaSd
ac2cf2cb3e
fix(repl): accept tab when previous character is whitespace (#14898) 2022-06-20 18:47:25 -04:00
David Sherret
a7a64438e2
fix: do not panic running .d.cts and .d.mts files (#14917) 2022-06-20 11:20:52 -04:00
David Sherret
f564497630
fix(fmt): should fail --check on parse error (#14907) 2022-06-18 12:44:43 -04:00
Nayeem Rahman
845d4754c6
fix(check): use "moduleDetection": "force" (#14875) 2022-06-15 12:26:43 -04:00
cjihrig
b2109a12aa fix(url): properly indent when inspecting URLs (#14867)
This commit updates the custom inspect function for URL objects
to pass the inspect options through so that the context is
propagated and the resulting indentation is correct.

Fixes: https://github.com/denoland/deno/issues/14171
2022-06-15 09:52:28 -04:00
Mark Ladyshau
d4f609d8e7
feat(test): update test summary report (#14629) 2022-06-14 20:51:49 +02:00
David Sherret
443041c23e
feat(vendor): support using an existing import map (#14836) 2022-06-14 10:05:37 -04:00
Bartek Iwańczuk
fc3a966a2d
Deno.exit() is an alias to self.close() in worker contexts (#14826)
This commit changes Deno.exit() to be an alias to self.close() in worker contexts,
and the provided exit code becomes is ignored.
2022-06-13 23:53:04 +02:00
Bartek Iwańczuk
4a0a412d7c
feat: no type-check by default (#14691)
This commit changes default default behavior of type checking
for several subcommands.

Instead of type checking and reporting type errors only for local
files, the type checking is skipped entirely. Type checking can
still be enabled using the "--check" flag.

Following subcomands are affected:
- deno cache
- deno install
- deno eval
- deno run
2022-06-13 23:13:16 +02:00
Mark Ladyshau
decdc59071
fix(cli): add config flag to deno info (#14706) 2022-06-13 20:09:04 +02:00
David Sherret
3dd981e199
feat(fmt): support formatting cjs, cts, mjs, and mts files (#14837) 2022-06-09 19:55:04 -04:00
Kayla Washburn
94068b7109
feat(task): add --cwd flag for configuring the working directory (#14823) 2022-06-08 15:30:16 -06:00
Bartek Iwańczuk
2769d60250
fix: watch dynamic imports in --watch (#14775)
Fix dynamic imports being watched in the watcher when using `--watch`.
2022-06-08 12:07:25 +02:00
Nayeem Rahman
e3eae662f3
fix: Format non-error exceptions (#14604)
This commit adds "Deno.core.setFormatExceptionCallback" which
can be used to provide custom formatting for errors. It is useful
in cases when user throws something that is non-Error (eg.
a string, plain object, etc).
2022-06-06 20:26:57 +02:00
Kitson Kelly
7eee521199
feat: update to TypeScript 4.7 (#14242) 2022-06-01 10:19:18 +10:00
David Sherret
b65d5024ef
fix: read raw stdin to prevent buffering (regression) (#14704) 2022-05-23 12:35:02 -04:00
David Sherret
69be1f3cf7
fix: deno task should actually use current exe for deno command (#14705) 2022-05-23 12:04:28 -04:00
Leo Kettmeir
3c97bbe165
fix(ext/websocket): WebSocket dispatch single close event (#13443) 2022-05-23 13:21:11 +02:00
Colin Ihrig
d55444b41c
fix(coverage): do not report transpiled files with no lines (#14699)
This commit omits files from the coverage report that have no
lines of code to report coverage for.

Fixes: https://github.com/denoland/deno/issues/14683
2022-05-22 10:45:22 -04:00
David Sherret
1fcecb6789
refactor: upgrade to deno_ast 0.15 (#14680) 2022-05-20 16:40:55 -04:00
Yoshiya Hinosawa
e7c894e8f5
fix: prevent Deno.exit to fail when dispatchEvent tampered (#14665)
Co-authored-by: Colin Ihrig <cjihrig@gmail.com>
2022-05-20 11:57:05 +09:00
Leo Kettmeir
4e1ca1d178
refactor: use spawn API across codebase (#14414) 2022-05-18 22:00:11 +02:00