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

3617 commits

Author SHA1 Message Date
Nayeem Rahman
989c723130
perf(cli/proc_state): Get error source lines from memory (#15031) 2022-07-11 20:43:47 +02:00
David Sherret
687c712be3
fix: upgrade deno_ast to 0.17 (#15152) 2022-07-11 14:10:12 -04:00
cuobiezi
83818c914b
refactor: rename run_basic to run_local (#15068) 2022-07-11 19:02:23 +02:00
Ikko Ashimine
d70ba324fe
refactor: update comment in diff.rs (#15142)
Github -> GitHub
2022-07-10 22:49:18 -04:00
Divy Srivastava
132c761e87
fix(ext/ffi): allow opting out of fast ffi calls (#15131) 2022-07-09 18:41:07 +05:30
David Sherret
1cc59e6c5c chore: unpin pin project to fix cargo publish (#15085) 2022-07-05 14:24:40 -04:00
denobot
ef312e0050 1.23.3 (#15081)
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-07-05 14:24:40 -04:00
Bartek Iwańczuk
a919a5dd11
Revert "refactor(snapshots): to their own crate (#14794)" (#15076)
This reverts commit fd5a12d7e2.
2022-07-05 00:12:41 +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
Roj
691d67b3ed
chore(test): fix test_collect_specifiers windows path to specifier code (#15072) 2022-07-04 14:28:41 -04:00
Roj
dced4d5e19
fix(cli): handle collecting a directory with file:// (#15002) 2022-07-04 10:46:10 -04:00
Divy Srivastava
4ee7216858
chore(cli/bench): use deno bench for deno_common.js (#15063) 2022-07-04 16:53:02 +05:30
Carter Snook
8941a39fe5
fix(dts): stop default export type behavior (#14977)
Ref: #14976
2022-07-04 15:41:52 +10:00
Rafael Ávila de Espíndola
2d15e926f9
fix: update to TypeScript 4.7.4 (#15022) 2022-07-04 15:13:50 +10:00
Divy Srivastava
97a7f8d54d
chore(cli/bench): benchmark for raw HTTP ops (#15043) 2022-07-02 19:39:25 +05:30
David Sherret
95d2f206fc
refactor: extract deno_graph::create_graph use to common function (#15009) 2022-07-01 11:50:16 -04:00
Bartek Iwańczuk
b8b82c3ea4
chore: use Rust 1.62.0 (#15028) 2022-07-01 15:28:06 +02:00
Divy Srivastava
350994e6a6
chore(cli/bench): Add more HTTP benchmarks (#14995) 2022-07-01 12:59:01 +05:30
David Sherret
3d8ba30ea0
chore: forward 1.23.2 to main (#15027)
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-06-30 18:01:08 -04:00
David Sherret
e46584a75a
fix(vendor): ignore import map in output directory instead of erroring (#14998) 2022-06-29 20:41:48 -04:00
David Sherret
8c4420c005
refactor: rename RootConfig to CliOptions (#15007) 2022-06-29 11:51:11 -04:00
Mark Ladyshau
6743b3227b
fix(ext/web): remove ErrorEventInit's error default (#14809) 2022-06-29 14:29:08 +02:00
Divy Srivastava
5eb9abd65f
chore(cli/bench): Add bun HTTP server (#15004) 2022-06-29 16:57:19 +05:30
bokuweb
91570ba6e8
chore(cli): remove unnecessary unsafe in bench (#15000) 2022-06-29 13:46:02 +05:30
David Sherret
01adbb1efb
refactor: add RootConfig (#14985) 2022-06-28 16:45:55 -04:00
Geert-Jan Zwiers
5b7bcefa11
fix(task): remove --no-config as task subcommand argument (#14983) 2022-06-28 21:47:51 +02: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
Divy Srivastava
ab11b45d1d
refactor(bench): continuous benchmarking improvements (#14821) 2022-06-28 17:51:05 +05:30
Aapo Alasuutari
00f4521b20
feat(ext/ffi): Thread safe callbacks (#14942) 2022-06-28 14:53:36 +05:30
David Sherret
e1c90963fb
refactor: create args folder (#14982) 2022-06-27 16:54:09 -04:00
Bartek Iwańczuk
681bb49d0d
fix(lsp): restart TS language service when caching dependencies (#14979) 2022-06-27 19:43:43 +02:00
Carter Snook
89fc240861
fix(dts/ffi): non-exact types break FFI inference (#14968) 2022-06-27 18:11:58 +05:30
Geert-Jan Zwiers
2d1c48ce17
fix(docs): --watch arg is stable (#14970) 2022-06-27 00:28:45 +02:00
Luca Casonato
8d82ba7299
build: require safety comments on unsafe code (#13870)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2022-06-26 00:13:24 +02: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
Divy Srivastava
18c9a7ad64
fix(core): don't panic on non-existent cwd (#14957)
Co-authored-by: cjihrig <cjihrig@gmail.com>
2022-06-25 09:21:58 +05:30
Aaron O'Mullan
fd5a12d7e2
refactor(snapshots): to their own crate (#14794)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-06-24 15:04:45 +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
Kayla Washburn
215f3d4c8e
v1.23.1 (#14954)
1.23.1 (#14952)

Co-authored-by: aslilac <aslilac@users.noreply.github.com>
Co-authored-by: Kayla Washburn <mckayla@hey.com>

Co-authored-by: denobot <33910674+denobot@users.noreply.github.com>
Co-authored-by: aslilac <aslilac@users.noreply.github.com>
2022-06-23 15:27:41 -06: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
ca4385ad68
fix: upgrade swc via deno_ast 0.16 (#14930) 2022-06-22 15:42:08 -04:00
sigmaSd
efaa149819
fix(repl): use spaces for tab handler on windows (#14931)
There is a bug in rustyline with tabs on Windows, so we insert spaces for now.
2022-06-22 10:28:28 -04:00
David Sherret
3455f16079
chore(test_util): add new string assertion macros (#14928) 2022-06-21 15:25:07 -04:00
David Sherret
7ad0d09228
chore: fix pty_tab_handler test on windows (#14927) 2022-06-21 15:24:50 -04:00
Aapo Alasuutari
a38a1f91cf
chore(ext/ffi): simplify FFI types (#14920)
This commit simplifies the TypeScript types used for interacting with Deno FFI. The basis is that types are now first grouped into logical wholes, NativeNumberType, NativeBigIntType etc. These wholes are combined into the NativeType and NativeResultType general types.

Additionally, this PR removes the { function: { parameters: [], result: "void" } } type declaration from parameters (and result types. Now functions are merely passed and returned as "function".
2022-06-21 08:20:33 +05:30
sigmaSd
ac2cf2cb3e
fix(repl): accept tab when previous character is whitespace (#14898) 2022-06-20 18:47:25 -04:00
David Sherret
a7339f756c
refactor: add EmitCache trait (#14925) 2022-06-20 17:59:52 -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
Divy Srivastava
a0fc43c2c5
fix(cli/bench): Use deno check instead of deno cache (#14916) 2022-06-20 20:07:24 +05:30
Divy Srivastava
354fa6cd00
BREAKING(ext/ffi): Remove Deno.UnsafePointer indirection (#14915) 2022-06-20 19:08:10 +05:30
Nayeem Rahman
79b42808a4
perf(core): Cache source lookups (#14816)
Keep a cache for source maps and source lines. 

We sort of already had a cache argument for source map lookup 
functions but we just passed an empty map instead of storing it. 

Extended it to cache source line lookups as well and plugged it 
into runtime state.
2022-06-20 14:42:20 +02:00
Aapo Alasuutari
3d6fa64f19
feat(ext/ffi): Callbacks (#14663)
This commit adds support for unstable FFI
callbacks. A callback is registered using
the `Deno.UnsafeCallback` API.

The backing memory for the callback can 
be disposed of using `Deno.UnsafeCallback#close`.
It is not safe to pass the callback after calling
close.

Callbacks from other than the isolate thread
are not supported.

Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
Co-authored-by: Bert Belder <bertbelder@gmail.com>
2022-06-20 16:36:04 +05:30
Mark Ladyshau
60869c2598
fix(ext/fetch): add accept-language default header to fetch (#14882) 2022-06-19 23:33:24 +02:00
Aaron O'Mullan
d0137a93df
chore: use rust 1.61.0 (#14911) 2022-06-19 12:01:34 -03:00
David Sherret
f564497630
fix(fmt): should fail --check on parse error (#14907) 2022-06-18 12:44:43 -04:00
Geert-Jan Zwiers
fa7cad06de
fix(docs): update description of --check flag (#14890) 2022-06-18 18:11:15 +02:00
Matt Kane
96821057dc
docs(lsp): correct header name in comments (#14897) 2022-06-17 11:41:28 -04:00
Colin Ihrig
367e006e06
fix(ext/web): add EventTarget brand checking (#14637)
This commit adds brand checking to EventTarget. It also fixes a
bug where deno would crash if an abort signal was aborted on the
global addEventListener().
2022-06-17 11:05:02 -04:00
cjihrig
95312ab53a fix: make Performance global an EventTarget
This commit updates the Performance global to extend
EventTarget.
2022-06-16 12:05:33 -04:00
denobot
e7ea4edc8a
1.23.0 (#14878)
* 1.23.0

* docs(Releases.md): update a few items for 1.23

* docs(Releases.md): revert bad formatting

Co-authored-by: aslilac <aslilac@users.noreply.github.com>
Co-authored-by: McKayla Washburn <mckayla@hey.com>
2022-06-15 17:02:18 -06:00
Ryan Dahl
d0dec8d36b
chore: upgrade various deps (#14876)
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-06-15 13:48:53 -04:00
Ryan Dahl
3d2394954c
upgrade: v8 10.4.132.5 (#14874) 2022-06-15 12:30:19 -04:00
Nayeem Rahman
845d4754c6
fix(check): use "moduleDetection": "force" (#14875) 2022-06-15 12:26:43 -04:00
Nayeem Rahman
0b90e966c5
chore(cli/cache): Remove CacheType::Declaration (#14873) 2022-06-15 10:25:25 -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
cjihrig
eadf943e59 fix(console): constrol inspect() indent with option (#14867)
This commit updates the Deno.inspect() logic to use the
indentLevel option to control indentation instead of passing
around separate indent/level parameters internally.

Refs: https://github.com/denoland/deno/issues/8099
Refs: https://github.com/denoland/deno/issues/14171
2022-06-15 09:52:28 -04:00
Luca Casonato
5bde4c7eca
BREAKING: remove Intl.v8BreakIterator (#14864)
This is a non-standard API that is mostly replaced by `Intl.Segmenter`.
2022-06-15 05:04:30 +02:00
sigmaSd
8bfa89a478
feat(repl): Add key binding to force a new line (#14536)
This commit adds key binding for "ctrl+s" 
combination that will force a new line in REPL.
2022-06-15 02:19:06 +02:00
David Sherret
4cff05b275
refactor(runtime/signal): revert SIGINT and SIGBREAK Deno.kill Windows changes (#14865) 2022-06-14 15:31:50 -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
Geert-Jan Zwiers
24571a3952
feat(runtime/signal): implement SIGINT and SIGBREAK for windows (#14694)
This commit adds support for SIGINT and SIGBREAK signals on 
Windows platform.

Co-authored-by: orange soeur <juzi201314@gmail.com>
2022-06-13 22:39:46 +02:00
Ryan Dahl
21dfeea3c4
Remove unstable Deno.sleepSync (#14719)
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-06-13 21:28:00 +02:00
David Sherret
e6218d9d23
feat(task): support redirects, cat, xargs (#14859)
feat: upgrade to deno_task_shell 0.4.0
2022-06-13 14:55:21 -04:00
Mark Ladyshau
decdc59071
fix(cli): add config flag to deno info (#14706) 2022-06-13 20:09:04 +02:00
Colin Ihrig
64abb65f05
feat(console): pass options and depth to custom inspects (#14855)
This commit updates Deno.inspect() to pass inspect options and
the current inspect depth to custom inspect functions.

Refs: https://github.com/denoland/deno/issues/8099
Refs: https://github.com/denoland/deno/issues/14171
2022-06-13 10:59:22 -04:00
David Sherret
5fffb77d06
feat(fmt): remove some unnecessary parens in types (#14841) 2022-06-12 21:00:21 -04:00
Roj
41075b153a
chore(docs): remove senseless await (#14844) 2022-06-11 13:06:58 -04:00
David Sherret
3dd981e199
feat(fmt): support formatting cjs, cts, mjs, and mts files (#14837) 2022-06-09 19:55:04 -04:00
Colin Ihrig
cf866c5ad3
chore: Forward v1.22.3 to main (#14835)
* 1.22.3 (#14832)
* chore: pin swc versions to fix cargo publish

Co-authored-by: denobot <33910674+denobot@users.noreply.github.com>
Co-authored-by: cjihrig <cjihrig@users.noreply.github.com>
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-06-09 16:57:16 -04:00
Bartek Iwańczuk
d8f6be2336
fix(lsp): change glob to watch json and jsonc files (#14828) 2022-06-09 17:59:22 +02: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
ba13b8e2a9
refactor: ensure exit code reference is passed to all workers (#14814) 2022-06-08 17:45:38 +02:00
Divy Srivastava
4305bb4bd8
chore(bench): generalized HTTP benchmarks framework (#14815) 2022-06-08 17:33:38 +05:30
Elias Sjögreen
8113fac939
feat(ext/ffi): support passing and returning bigints (#14523) 2022-06-08 16:43:10 +05:30
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
diachedelic
ff5def9ed5
feat(ext/crypto): export elliptic keys as "raw" (#14764)
This commit adds support for the "raw" format when exporting public ECDH/ECDSA keys via
the SubtleCrypto.exportKey method.
2022-06-08 08:29:42 +05:30
Nayeem Rahman
9385a91312
refactor(core): Move Deno.core bindings to ops (#14793) 2022-06-07 11:25:10 +02:00
David Sherret
ff463f68c8
fix(task): support parsing quotes in a word (#14807) 2022-06-06 19:54:22 -04: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
5692132755
fix(lsp): handle get diagnostic errors better (#14776) 2022-06-03 22:23:33 +10:00
Bartek Iwańczuk
de562b0215
chore: Forward v1.22.2 to main (#14785) 2022-06-02 22:29:41 +02:00
Mark Ladyshau
4e26bcb2bb
fix(ext/crypto): adjust getRandomValues types (#14714) 2022-06-02 15:15:46 +02:00
Geert-Jan Zwiers
7d9e8baebb
chore: fix flaky integration::bench::multifile_summary test (#14771) 2022-06-02 03:03:28 +02:00
David Sherret
c01fcef93f
fix(fmt): do panic for import decl with empty named imports and default import (#14773) 2022-06-01 19:36:46 -04:00
Kitson Kelly
7eee521199
feat: update to TypeScript 4.7 (#14242) 2022-06-01 10:19:18 +10:00