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

4443 commits

Author SHA1 Message Date
Bartek Iwańczuk
0b4a6c4d08
chore: remove 'fix_exotic_specifier' test (#16143)
It's a test that's been flaky for a week, and after offline discussion,
we're no longer sure what it's testing.
2022-10-04 14:24:35 +02:00
Filip Skokan
0d042d8e54
fix(ext/crypto): interoperable import/export (#16153)
This PR updates RSA key import/export to a state which is interoperable
with other implementations.

For RSA the only OID in and out is `rsaEncryption`.
For EC the only OID in and out is `id-ecpublickey` (fixed in #16152).

see https://github.com/w3c/webcrypto/issues/307#issuecomment-995813032
see https://github.com/w3c/webcrypto/issues/307
see https://github.com/w3c/webcrypto/pull/305
see https://github.com/nodejs/node/pull/42816
2022-10-04 17:37:59 +05:30
Filip Skokan
aa710aac98
fix(ext/crypto): ecdh spki key import/export roundtrip (#16152) 2022-10-04 17:09:41 +05:30
Aurélien Bertron
8d20784f7a
fix(ext/crypto): deriveBits for ECDH not taking length into account (#16128)
Fixes #16047
2022-10-03 23:10:34 -07:00
Bartek Iwańczuk
fde938116d
feat(unstable): add support for npm specifier cli arguments for 'deno cache' (#16141)
This commit adds support for npm specifier in "deno cache" subcommand.

```
$ deno cache --unstable npm:vite npm:chalk https://deno.land/std/http/file_server.ts
```

Besides downloading requested npm package(s), it will also download
necessary code from "std/node/".
2022-10-03 23:26:42 +02:00
Bartek Iwańczuk
5b097fd7e5
fix(npm): better error is version is specified after subpath (#16131) 2022-10-03 19:10:53 +02:00
Bartek Iwańczuk
8e1b2fca59
fix(npm): panic on invalid package name (#16123) 2022-10-03 17:45:01 +02:00
Hirotaka Tagawa / wafuwafu13
a4a628dc6f
docs(fs): add default info of OpenOptions (#16104) 2022-10-03 17:22:40 +02:00
Satya Rohith
eacd6a7f29
chore(ext/cache): make helper functions public (#16117) 2022-10-03 10:52:54 +05:30
Marcos Casagrande
e2990be264
fix(ext/cache): close resource on error (#16129) 2022-10-03 09:48:59 +05:30
李瑞丰
b3444e0d3b
fix(ext/crypto): fix importKey error when leading zeroes (#16009)
Co-authored-by: Jason <m.jason.liu@outlook.com>
2022-10-03 09:37:25 +05:30
Marcos Casagrande
a55b194638
fix(ext/cache): acquire reader lock before async op (#16126) 2022-10-02 01:21:48 +02:00
Bartek Iwańczuk
048c06f84f
fix(npm): handle json files in require (#16125) 2022-10-01 22:21:19 +02:00
sigmaSd
a6618dc01c
lsp: use deno:/asset instead of deno:asset (#16023)
Make offering "virtual documents" via the lsp easier to parse. `deno:`
can be ambiguous to parse by editors (can conflict with linux paths)

Neovim recently landed a PR https://github.com/neovim/neovim/pull/19797
that allows it to parse `scheme:/` this PR should make deno lsp work
correctly in neovim
2022-10-01 20:02:25 +02:00
David Sherret
ecfafda9d8
perf: node cjs & esm analysis cache (#16097)
This commit adds a cache for CJS and ESM analysis that is backed by an
SQLite file.

The connection to the DB is lazily created on first use, so shouldn't
have impact on the startup time.

Benched with running Vite

Deno v1.26:
```
$ deno task dev
Warning deno task is unstable and may drastically change in the future
Task dev deno run -A --unstable --node-modules-dir npm:vite

  VITE v3.1.4  ready in 961 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
```

This branch:
```
../deno/target/release/deno task dev
Warning deno task is unstable and may drastically change in the future
Task dev deno run -A --unstable --node-modules-dir npm:vite

  VITE v3.1.4  ready in 330 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
```

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-10-01 12:15:56 +02:00
skanehira
1058d1868f
test(cli): add test cases (#16091)
Fixes: https://github.com/denoland/deno/issues/16090
2022-09-30 14:02:44 -04:00
Marcos Casagrande
927f4e2e83
fix(ext/fetch): Body#bodyUsed for static body (#16080)
This fixes a bug where `Body#bodyUsed` incorrectly returns `false`
for a body that has actually already been consumed, after `Body#body`
is called.
2022-09-29 17:38:04 +02:00
Yoshiya Hinosawa
15ea624790
refactor(cli): use shared sys kind parser in flags.rs (#16087) 2022-09-29 19:34:16 +09:00
ayame113
691e36ac50
chore(ext/flash): Enabling disabled windows tests (#16081) 2022-09-29 10:34:26 +05:30
denobot
d8827514ff
1.26.0
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-09-29 00:10:44 +02:00
Kitson Kelly
cfbcb3b613
chore: improve JSDoc for built-in APIs (#16048)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-09-28 22:21:08 +02:00
Divy Srivastava
e2828ad762
fix(ext/flash): reregister socket on partial read on Windows (#16076) 2022-09-28 20:52:24 +02:00
David Sherret
fcb20ab952
chore: fix flaky integration::lint::compact (#16075) 2022-09-28 13:52:10 -04:00
Divy Srivastava
e64af6260a
feat(ext/flash): add reuseport option on Linux (#16022) 2022-09-28 23:16:29 +05:30
David Sherret
d677ba67f5
feat(npm): functionality to support child_process.fork (#15891) 2022-09-28 13:04:16 -04:00
Brenley Dueck
23125b275f
feat(lint): add --compact flag for terse output (#15926) 2022-09-28 18:47:48 +02:00
Guilherme Bernal
6c55772f0d
feat(core): add Deno.core.setPromiseHooks (#15475) 2022-09-28 16:09:33 +02:00
Bartek Iwańczuk
b8e3f4c71d
feat: Stabilize Deno.hostname() API (#15932) 2022-09-28 15:36:06 +02:00
Luca Casonato
70bc0eb72b
feat(unstable): Deno.setRaw -> Deno.stdin.setRaw (#15797)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-09-28 15:03:56 +02:00
Yoshiya Hinosawa
fa9e7aab6d
feat: add --allow-sys permission flag (#16028) 2022-09-28 21:46:50 +09:00
Satya Rohith
b312279e58
feat: implement Web Cache API (#15829) 2022-09-28 17:41:12 +05:30
David Sherret
a44c83a3d6
fix(npm): use ntfs junctions in node_modules folder on Windows (#16061) 2022-09-27 18:02:35 -04:00
Bartek Iwańczuk
a344368603
feat: Stabilize Deno.refTimer() and Deno.unrefTimer() APIs (#16036) 2022-09-27 22:11:11 +02:00
Marcos Casagrande
980d65b4d0
fix(cli/bench): strace numeric format (#16055) 2022-09-27 21:33:17 +02:00
Sylvain Cau
9bb3ccbab2
fix(cli/vendor): handle assert type json during vendoring (#16059) 2022-09-27 14:01:43 -04:00
Satya Rohith
7a47321b09
fix(ext/fetch): blob url (#16057)
Co-authored-by: Luca Casonato <hello@lcas.dev>
2022-09-27 22:07:46 +05:30
Divy Srivastava
f02f2425d5
feat(ext/crypto): add x25519 and Ed25519 CFRG curves (#14119) 2022-09-27 17:43:42 +05:30
Kitson Kelly
4ad48d5dab
fix: TypeScript 4.8 update (#16040) 2022-09-27 09:38:21 +10:00
Mathias Lafeldt
4b01ef5c23
chore: use Rust 1.64.0 (#16035) 2022-09-26 21:52:16 +02:00
Marcos Casagrande
c7dd842f84
perf(ext/fetch): use content-length in InnerBody.consume (#15925)
This fast path prevents repeated allocations when receiving a fetch body with a known size.

Co-authored-by: Luca Casonato <hello@lcas.dev>
2022-09-26 20:27:50 +02:00
David Sherret
1628dba6db
fix(fmt): keep type args in type queries and keep empty array expr element's trailing comma (#16034) 2022-09-26 12:57:50 -04:00
李瑞丰
a2262c11d7
fix(ext/console): fix error when logging a proxied Date (#16018) 2022-09-26 23:55:58 +09:00
Marcos Casagrande
b73cb7bf9c
perf(ext/console): break on iterableLimit & better sparse array handling (#15935) 2022-09-26 15:55:22 +09:00
David Sherret
f6a9b49dfb
perf: don't re-download package tarball to global cache if local node_modules folder exists for package (#16005) 2022-09-23 17:35:48 -04:00
Marcos Casagrande
12306022da
test(ext/fetch): enable null body status test on windows (#15995) 2022-09-23 08:34:04 -04:00
Divy Srivastava
72af1496d9
perf: use fast ops for tty (#15976) 2022-09-23 09:35:45 +05:30
David Sherret
1b04ff0782
chore: forward v1.25.4 release commit to main (#16001) 2022-09-22 15:58:43 -04:00
David Sherret
9bf4ec2eac
chore: temporarily ignore websocketstream test (#15997) 2022-09-22 12:41:42 -04:00
David Sherret
0eda3fcd12
fix(compile): keep non-exe extension in output name on Windows (#15994) 2022-09-22 11:49:27 -04:00
David Sherret
716005a0d4
feat(npm): add flag for creating and resolving npm packages to a local node_modules folder (#15971) 2022-09-22 11:17:02 -04:00
Bartek Iwańczuk
9a216806d5
feat(npm): add support for --reload=npm: and --reload=npm:<package> (#15972) 2022-09-22 10:39:58 -04:00
Divy Srivastava
698a340ad7
perf: fs optimizations - part 1 (#15873) 2022-09-22 14:39:25 +05:30
Kayla Washburn
1ef96343a1
feat: allow exiting on two consecutive ctrl+c presses (#15981) 2022-09-22 04:42:09 -04:00
Aapo Alasuutari
707e9e3580
feat(ops): Automatic fast ops creation (#15527) 2022-09-22 10:05:24 +05:30
Yoshiya Hinosawa
cc32a297da
fix(runtime): better error message with Deno.env.get/set (#15966) 2022-09-21 15:18:58 +09:00
Bartek Iwańczuk
35fe9ee530
fix(flash): panic if response if undefined (#15964)
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2022-09-20 22:08:15 +02:00
Vicary A
2929ec9ffa
fix(ext/webgpu): make GPUDevice.features SetLike (#15853) 2022-09-20 03:43:32 +02:00
Kitson Kelly
73e89844ba
feat(cli): update to TypeScript 4.8 (#15064) 2022-09-20 07:00:01 +10:00
David Sherret
1464b756a4
refactor: move out test files from root testdata directory into sub directories (#15949) 2022-09-19 10:32:21 -04:00
Divy Srivastava
8d50c09c0d
perf(cli): avoid canonicalize_path if config file does not exist (#15957) 2022-09-19 19:31:47 +05:30
Divy Srivastava
e2f3801221
perf(cli): avoid clap::App::clone (#15951) 2022-09-19 17:07:49 +05:30
Ben Noordhuis
b1b418b81a
chore: fix clippy warnings (#15944)
Stop allowing clippy::derive-partial-eq-without-eq and fix warnings
about deriving PartialEq without also deriving Eq.

In one case I removed the PartialEq because it a) wasn't necessary,
and b) sketchy because it was comparing floating point numbers.

IMO, that's a good argument for enforcing the lint rule, because it
would most likely have been caught during review if it had been enabled.
2022-09-19 10:25:03 +02:00
David Sherret
a4a894fa1e
fix(doc): deno doc should parse modules if they haven't been parsed before (#15941) 2022-09-18 13:59:33 -04:00
Yoshiya Hinosawa
d7b27ed63b
fix(ext/node): fix builtin module module (#15904) 2022-09-17 20:35:32 +09:00
Divy Srivastava
5fe660ecd7
perf(web): optimize encodeInto() (#15922) 2022-09-17 16:48:15 +05:30
Divy Srivastava
6154188786
perf(ext/console): avoid wrapConsole when not inspecting (#15931) 2022-09-17 15:34:43 +05:30
Ryan Dahl
684841a18c
upgrade deps (#15914) 2022-09-16 19:11:30 -04:00
Nayeem Rahman
38280990da
fix(runtime): fix permission status cache keys (#15899) 2022-09-16 20:46:38 +09:00
Colin Ihrig
ee208c1b20
chore: forward v1.25.3 release commit to main (#15919)
Co-authored-by: denobot <33910674+denobot@users.noreply.github.com>
Co-authored-by: cjihrig <cjihrig@users.noreply.github.com>
2022-09-15 16:24:06 -04:00
Leo Kettmeir
2fc88aba1a
docs: make unstable warnings consistent (#15913) 2022-09-15 16:37:35 +02:00
Luca Casonato
516a1da467
Revert "docs: remove unstable messages" (#15886) 2022-09-15 14:09:23 +02:00
Divy Srivastava
1de17fad7f
chore(ext/flash): disable flaky flash test (#15908) 2022-09-15 09:52:31 +05:30
Colin Ihrig
19deec4494
fix(ops): add node.js env variable allowlist (#15893)
This commit allows the Node compatibility layer to skip
environment variable permission checks when --unstable
is passed and the variable name is one that Node uses.

Fixes: https://github.com/denoland/deno/issues/15890
2022-09-14 11:59:20 -04:00
Bartek Iwańczuk
7b98282993
fix(npm): binary entrypoint for .js or no extension (#15900) 2022-09-14 10:41:47 -04:00
Asher Gomez
6a9acc8142
doc(unstable): mention that signal input isn't supported in spawnSync (#15889) 2022-09-14 08:37:05 +02:00
David Sherret
73efed218f
refactor(npm): create general use NpmPackageResolver (#15882) 2022-09-13 11:59:01 -04:00
Leo Kettmeir
b4e618315a
docs: remove unstable messages (#15878) 2022-09-13 03:23:34 +02:00
Bartek Iwańczuk
233d5422fd
fix(npm): use shim from deno_node crate for 'module' built-in module (#15881) 2022-09-12 18:11:32 -04:00
David Sherret
98454c1eb8
fix(npm): support cjs resolution of package subpath with package.json (#15855) 2022-09-12 15:47:54 -04:00
David Sherret
a3a4760831
fix(npm): align Deno importing Node cjs with Node esm importing cjs (#15879) 2022-09-12 14:28:51 -04:00
Leo Kettmeir
8f0a6770db
docs: dedupe DOM category (#15868) 2022-09-12 09:30:43 +02:00
David Sherret
dee9f0acaf
fix(npm): align Node esm code importing cjs with Node (#15838) 2022-09-10 15:00:45 -04:00
David Sherret
3b0de03b59
fix(npm): remove export binding to match node (#15837) 2022-09-10 11:38:11 -04:00
Divy Srivastava
a54d5654a2
perf: optimize URL serialization (#15663) 2022-09-10 09:15:16 +05:30
Yoshiya Hinosawa
59476ab96d
chore(cli): exclude npm registry data from crate package (#15832) 2022-09-10 08:43:51 +09:00
Bartek Iwańczuk
f92bd986de
feat: download progress bar (#15814) 2022-09-09 15:57:39 -04:00
denobot
3bce2af0eb
chore: forward v1.25.2 release commit to main (#15831)
Co-authored-by: kt3k <kt3k@users.noreply.github.com>
2022-09-09 20:31:43 +09:00
Bartek Iwańczuk
6c179daff0
fix(npm): recursive translation of reexports, remove window global in node code (#15806)
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-09-08 22:01:48 +02:00
Leo Kettmeir
93cbac69e8
chore: update url crate to 2.3.1 (#15818) 2022-09-08 19:04:59 +02:00
Leo Kettmeir
99c5381af4
fix(docs): change category for Deno.Process to "Sub Process" (#15812) 2022-09-08 10:05:01 +02:00
Leo Kettmeir
4e52319795
fix(docs): add missing categories for unstable (#15807) 2022-09-08 02:47:47 +02:00
David Sherret
9e6917426a
fix: upgrade deno_ast to 0.19 (#15808) 2022-09-07 15:06:18 -04:00
Bartek Iwańczuk
4a250b2f25
feat: add --no-npm flag to disable npm: imports (#15673)
This commit adds "--no-npm" flag, it's similar to "--no-remote"
flag. This flag makes Deno error out if "npm:" specifier is encountered.
2022-09-07 15:33:51 +02:00
Colin Ihrig
3b1204eb2d
fix(core): make errors more resistant to tampering (#15789)
This commit makes error objects more resistant to
prototype tampering.

This bug was found when updating the deno_std Node compatibility
layer to Node 18. The Node test 'parallel/test-assert-fail.js'
was breaking std's assertion library.

Refs: https://github.com/denoland/deno_std/pull/2585
2022-09-07 09:11:16 -04:00
Divy Srivastava
d57f9d560d
fix(ext/flash): use utf8 length as Content-Length (#15793) 2022-09-07 16:21:30 +05:30
Divy Srivastava
7f4b043f32
fix(test): unflake wasm_unreachable test (#15794) 2022-09-07 16:21:18 +05:30
Nayeem Rahman
5819fef2d5
test: fix bad resource fixture (#15792) 2022-09-07 09:49:34 +05:30
Divy Srivastava
d2a408f452
perf(runtime): short-circuit queue_async_op for Poll::Ready (#15773) 2022-09-06 23:08:37 +05:30
Alexander Sage
c0a684c14e
fix(cli): Fix panic when providing invalid urls to --reload (#15784) 2022-09-06 18:30:42 +02:00
Nayeem Rahman
118dd47ad0
fix(watch): ignore unload errors on drop (#15782) 2022-09-06 13:18:23 +02:00
Bartek Iwańczuk
d20e80fa50
refactor(npm): reorganize remapping built-in Node modules to remote URLs (#15755)
Changes how built-in Node modules are mapped to polyfills
from "deno_std". Instead of intertwining this logic into Node
resolution logic, we map them to "NodeResolution::BuiltIn"
which are remapped to "deno_std" URLs in ProcState.
2022-09-06 12:57:28 +02:00
Bartek Iwańczuk
f2448c5de2
fix(npm): conditional exports in npm: specifiers (#15778) 2022-09-06 12:56:34 +02:00
Divy Srivastava
1cdd2504b1
perf(runtime): flatten arguments for write_file ops (#15776) 2022-09-05 17:20:48 +05:30
Bartek Iwańczuk
264ad49e18
refactor: cleanup Node compatibility code (#15766)
- move errors related to Node compat from cli/node/errors.rs to "ext/node" crate
- remove dependency on "node_resolver" crate
- make some of structures private to the "cli/node" module
2022-09-05 12:36:35 +02:00
Aapo Alasuutari
16dbf4adc3
feat(ext/ffi): Support bool FFI type (#15754) 2022-09-05 08:56:52 +05:30
David Sherret
08a6af398f
fix(cli): allow using file resource synchronously while being used async (#15747) 2022-09-04 22:33:06 -04:00
Divy Srivastava
50fc5d169a
fix(bench): make sure bytes/response is equal (#15763) 2022-09-04 18:29:38 +05:30
Bartek Iwańczuk
e324151520
BREAKING(unstable): remove --compat mode (#15678)
This commit removes "compat" mode. We shipped support for "npm:" specifier
support in v1.25 and that is preferred way to interact with Node code that we
will iterate and improve upon.
2022-09-03 18:19:30 +02:00
Bartek Iwańczuk
fc4025c878
fix(npm): add more context to errors when file doesn't exist (#15749) 2022-09-03 15:43:35 +02:00
Bartek Iwańczuk
223403e899
feat(info): add information about npm modules cache (#15750) 2022-09-03 15:31:01 +02:00
Christian Dürr
63b8089bda
refactor: move JsError formatting to deno_runtime (#15345)
This takes the existing `fmt_error` module from cli and puts it as a
public module into `deno_runtime`.
2022-09-02 22:53:23 +02:00
Nayeem Rahman
4f8dea100e
refactor(test): grab runTests() and runBenchmarks() from __bootstrap (#15420) 2022-09-02 19:44:45 +02:00
David Sherret
5262937285
fix(npm): respect latest dist tag for getting current version (#15746) 2022-09-02 13:06:42 -04:00
Geert-Jan Zwiers
7d622a6643
fix(init): suppress info logs when using quiet mode (#15741) 2022-09-02 17:59:36 +02:00
Garcia
4ec213b0aa
fix(ext/timers): create primordial eval (#15110) 2022-09-02 17:55:44 +02:00
David Sherret
03e6727a04
fix(npm): correct exact matching of pre-release versions (#15745) 2022-09-02 11:21:40 -04:00
David Sherret
387300aed0
refactor: extract out check code from emit (#15729)
Closes #15535
2022-09-02 10:54:40 -04:00
Jason
8178665bd1
fix(cli/repl): await Promise.any([])... (#15623) 2022-09-02 13:38:06 +02:00
Nayeem Rahman
a74b2ecf37
fix(repl): don't terminate on unhandled error events (#15548) 2022-09-02 12:43:39 +02:00
denobot
658d2cdff2
chore: forward v1.25.1 release commit to main (#15735)
Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2022-09-02 07:42:47 +02:00
Geert-Jan Zwiers
58e76098e6
fix(serde_v8): no panic on reading large text file (#15494)
Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
2022-09-01 22:20:11 +02:00
Aapo Alasuutari
778eb1da24
fix(ext/ffi): Fix pointer types (#15730) 2022-09-01 23:01:05 +05:30
David Sherret
3a601e56f4
fix(npm): ignore npm cache directory creation errors (#15728) 2022-09-01 12:37:14 -04:00
David Sherret
67713f4b93
fix(npm): ignore the unstable error in the lsp (#15727) 2022-09-01 12:06:23 -04:00
David Sherret
e1d7d7b0e3
fix(npm): better node version and version requirement compatibility (#15714) 2022-09-01 11:50:12 -04:00
Divy Srivastava
20c835407c
fix(ext/flash): retry write failures (#15591) 2022-09-01 18:58:34 +05:30
Geert-Jan Zwiers
cbd8307710
fix(check): --remote and --no-remote should be mutually exclusive (#14964) 2022-09-01 11:52:11 +02:00
Bartek Iwańczuk
adec4f575e
fix(npm): translate CJS to ESM with name clashes for files and dirs (#15697) 2022-08-31 00:31:59 +02:00
David Sherret
79fe8ffff8
fix(fmt): add the file path to the panic messages when formatting is unstable (#15693) 2022-08-30 14:46:03 -04:00
David Sherret
5f251b283b
fix(npm): prefer importing esm from esm (#15676) 2022-08-30 14:09:22 -04:00
Bartek Iwańczuk
54be07d05e
fix(npm): skip extracting pax_global_header from tarballs (#15677) 2022-08-30 17:15:41 +02:00
Leo Kettmeir
f3a0e48d4e
fix(docs): add missing categories (#15684) 2022-08-30 13:16:56 +02:00
Danny Povolotski
5e0fa5dd88
fix(ext/websocket): fix closing of WebSocketStream with unread messages (#15632) 2022-08-30 03:43:17 +02:00
David Sherret
c3e48cba18
fix(compile): panic when running with a populated dep analysis cache (#15672)
Closes #15612
2022-08-29 14:24:10 -04:00
Bartek Iwańczuk
b62ef4d37b
refactor(cli): Remove cli/node dependency on cli/compat (#15654) 2022-08-29 20:19:54 +02:00
Bartek Iwańczuk
2851a98072
fix(npm): conditional exports with wildcards (#15652) 2022-08-29 19:15:20 +02:00
David Sherret
ea838d27a2
fix: config file errors should not print specifier with debug formatting (#15648) 2022-08-29 13:13:39 -04:00
Bartek Iwańczuk
ad98c9fdd1
chore: update test_util/std/ submodule (#15657) 2022-08-29 11:35:27 +02:00
Divy Srivastava
d8396225c4
perf: use fast api for op_now (#15643) 2022-08-28 12:21:49 +05:30
Geert-Jan Zwiers
7c4f57e8b0
fix(ext/flash): add missing backticks in server docs (#15644) 2022-08-27 21:20:25 +02:00
cuobiezi
dbfaaddb4f
fix(cli): deno upgrade --canary always downloaded latest version even if it was already latest (#15639)
Closes #15570
2022-08-27 13:46:38 -04:00
David Sherret
ec98d86d21
fix(npm): handle cjs re-exports with the same name as an export (#15626) 2022-08-26 14:34:35 -04:00
Yoshiya Hinosawa
9b324b1cf4
fix(ext/node): fix global in node env (#15622) 2022-08-26 23:39:05 +09:00
David Sherret
f583a7ebf4
chore(npm): add test for esm npm binary package (#15609) 2022-08-26 09:17:48 -04:00
Bartek Iwańczuk
da10c9c8d1
fix(ext/flash): panic on AddrInUse (#15607) 2022-08-26 08:42:11 +05:30
David Sherret
376665d115
fix: avoid global declaration collisions in cjs (#15608)
* Use a default stack size * 2 in debug for Windows because swc using so much stack size. We should look into this more later though.
2022-08-25 20:24:18 -04:00
Bartek Iwańczuk
8986e2ced4
v1.25.0 2022-08-25 00:20:07 +02:00
Bartek Iwańczuk
fb1c7b7dea
fix(unstable): finish HTTP response for 205 and 304 responses (#15584)
This commit fixes "Deno.serve()" API by making sure that
205 and 304 responses end with "\r\n\r\n".
2022-08-24 21:26:57 +02:00
David Sherret
348291f5ec
fix(npm): always require --unstable flag even for esm (#15583) 2022-08-24 13:44:38 -04:00
David Sherret
18fcef8b29
fix(npm): cjs export analysis should take into consideration exports with dashes (#15582) 2022-08-24 13:37:34 -04:00
Luca Casonato
33c4d45328
fix: resolve jsxImportSource relative to module (#15561)
Previously `jsxImportSource` was resolved relative to the config file
during graph building, and relative to the emitted module during
runtime.

This is now fixed so that the JSX import source is resolved relative to
the module both during graph building and at runtime.
2022-08-24 19:36:05 +02:00
David Sherret
684aabbc25
feat: support subpaths in npm package references (#15578) 2022-08-24 11:25:32 -04:00
Bartek Iwańczuk
a4cc09447e
fix(unstable): Deno.serve() can parse hostnames (#15579) 2022-08-24 16:38:51 +02:00
Bartek Iwańczuk
5268fa0e0f
fix(unstable): various resolution bugs for npm: specifiers (#15546)
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-08-24 14:54:20 +02:00
Luca Casonato
f3bde1d53b
feat(ext/flash): split upgradeHttp into two APIs (#15557)
This commit splits `Deno.upgradeHttp` into two different APIs, because
the same API is currently overloaded with two different functions. Flash
requests upgrade immediately, with no need to return a `Response`
object. Instead you have to manually write the response to the socket.
Hyper requests only upgrade once a `Response` object has been sent.

These two behaviours are now split into `Deno.upgradeHttp` and
`Deno.upgradeHttpRaw`. The latter is flash only. The former only
supports hyper requests at the moment, but can be updated to support
flash in the future.

Additionally this removes `void | Promise<void>` as valid return types
for the handler function. If one wants to use `Deno.upgradeHttpRaw`,
they will have to type cast the handler signature - the signature is
meant for the 99.99%, and should not be complicated for the 0.01% that
use `Deno.upgradeHttpRaw()`.
2022-08-24 17:40:57 +05:30
David Sherret
452df99222
feat(npm): support packages with multiple command names (#15565) 2022-08-23 22:01:21 -04:00
Luca Casonato
4ef08a58df
feat: update Deno.serve function signature (#15563)
This commit changes the `Deno.serve` function signature to be more
versatile and easier to use. It is now a drop in replacement for
std/http's `serve`.

The input validation has also been reworked.
2022-08-24 00:08:56 +02:00
David Sherret
f0993f413b
fix: parse scoped npm specifiers with no version (#15564) 2022-08-23 13:08:37 -04:00
David Sherret
e7367044d9
feat: binary npm commands (#15542) 2022-08-23 10:39:19 -04:00
David Sherret
362af63c6f
fix(cache): do not attempt to emit non-emitable files (#15562) 2022-08-23 10:30:14 -04:00
Luca Casonato
24f7f3fda9
fix(ext/fetch): ignore user content-length header (#15555)
Previously if a user specified a content-length header for an POST
request without a body, the request would contain two `content-length`
headers. One added by us, and one added by the user.

This commit ignores all content-length headers coming from the user,
because we need to have the sole authority on the content-length because
we transmit the body.
2022-08-23 12:43:04 +02:00
Divy Srivastava
e34260c5b0
BREAKING(ext/ffi): specialized buffer type (#15518) 2022-08-23 09:16:43 +05:30
Kitson Kelly
d0c5477731
docs: add permission tags to JSDocs (#15541)
Co-authored-by: Leo Kettmeir <crowlkats@toaxl.com>
2022-08-23 10:57:01 +10:00
Ikko Ashimine
cf80b0a202
chore: typo (#15536) 2022-08-22 12:42:03 -04:00
David Sherret
7a1a082876
perf: cache swc dependency analysis and don't hold onto ParsedSources in memory (#15502) 2022-08-22 12:14:59 -04:00
Bartek Iwańczuk
c66386dbd2
feat(unstable): Respect --cached-only flags for npm: specifiers (#15512)
This commit changes "npm:" specifier handling to respect "--cached-only" flags and adds "Download" messages for npm registry api calls.

Co-authored-by: David Sherret <dsherret@gmail.com>
2022-08-22 17:35:04 +02:00
Yoshiya Hinosawa
57d48134d1
fix(ext/flash): fix default onListen callback (#15533) 2022-08-22 17:01:43 +09:00
Bartek Iwańczuk
301f6c46ba
fix(unstable): better error for invalid hostname in Deno.serve() (#15529) 2022-08-21 21:15:52 +02:00
Nayeem Rahman
97954003cc
feat: queueMicrotask() error handling (#15522)
Adds error event dispatching for queueMicrotask(). Consequently unhandled errors are now reported with Deno.core.terminate(), which is immune to the existing quirk with plainly thrown errors (#14158).
2022-08-21 20:16:42 +02:00
Mathias Lafeldt
e96933bc16
chore: use Rust 1.63.0 (#15464) 2022-08-21 19:31:14 +02:00
Yoshiya Hinosawa
fb2aeb79a1
fix(ext/flash): fix listening port (#15519) 2022-08-21 21:27:14 +09:00
Divy Srivastava
906aa78af3
feat(ops): V8 Fast Calls (#15291) 2022-08-21 17:37:53 +05:30
Nayeem Rahman
e39d4e3e7f
fix(core/runtime): always cancel termination in exception handling (#15514) 2022-08-21 13:57:10 +02:00
David Sherret
87f80ff6be
feat(unstable): initial support for npm specifiers (#15484)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-08-20 11:31:33 -04:00
Leo Kettmeir
1ffbd56164
feat: add "deno init" subcommand (#15469)
This adds an init subcommand to that creates a project starter similar to cargo init.

```
$ deno init my_project
Project initialized
Run these commands to get started:
  cd my_project
  deno run main.ts
  deno run main_test.ts
$ deno run main.ts
Add 2 + 3 5
$ cat main.ts
export function add(a: number, b: number): number {
  return a + b;
}
if (import.meta.main) {
  console.log("Add 2 + 3", add(2, 3));
}
$ cat main_test.ts
import { assertEquals } from "https://deno.land/std@0.151.0/testing/asserts.ts";
import { add } from "./main.ts";
Deno.test(function addTest() {
    assertEquals(add(2, 3), 5);
});
```

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-08-20 01:37:05 +02:00
Bartek Iwańczuk
5beec3f106
feat(unstable): change Deno.serve() API (#15498)
- Merge "Deno.serve()" and "Deno.serveTls()" API
- Remove first argument and use "fetch" field options instead
- Update type declarations
- Add more documentation
2022-08-19 14:36:01 +02:00
Divy Srivastava
25a109d9ea
chore(bench): add flash router benchmarks (#15495) 2022-08-19 15:54:54 +05:30
Divy Srivastava
9e576dff7c
perf(runtime): optimize Deno.file open & stream (#15496) 2022-08-19 15:54:40 +05:30
Divy Srivastava
8bdcec1c84
fix(ext/flash): concurrent response streams (#15493) 2022-08-19 10:14:56 +05:30
Divy Srivastava
cd21cff299
feat(ext/flash): An optimized http/1.1 server (#15405)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Ben Noordhuis <info@bnoordhuis.nl>
Co-authored-by: crowlkats <crowlkats@toaxl.com>
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2022-08-18 17:35:02 +05:30
Kitson Kelly
a2ab5eee01
docs: add category tag for built-in APIs (#15480) 2022-08-17 13:12:24 +10:00
David Sherret
868c7e38bf
feat(runtime): add pre_execute_module_cb (#15485) 2022-08-16 21:00:35 -04:00
Geert-Jan Zwiers
eab66a9f4d
chore(bench,test): list .mts under supported file extensions in cli docs (#15477) 2022-08-15 21:16:23 +02:00
Bartek Iwańczuk
5a4f84a0e1
chore: upgrade rusty_v8 to 0.48.1 (#15310) 2022-08-15 14:12:11 +02:00
David Sherret
18dcc64910
fix(npm): handle storing non-all lowercase package names (#15470) 2022-08-14 09:09:16 -04:00
David Sherret
8eed24cd3d
fix(coverage): ensure coverage is only collected in certain situations (#15467) 2022-08-12 15:21:17 -04:00
Roj
ee2f4e745c
docs(cli/dts): fix typo (#15457) 2022-08-12 15:32:38 +09:00
David Sherret
c3b04683c5
refactor(cli): consolidate most MainWorker related code to the same place (#15459) 2022-08-11 16:59:12 -04:00
denobot
e4a5f9952f
chore: forward v1.24.3 release commit to main (#15462)
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-08-11 16:47:03 -04:00
Aapo Alasuutari
2164f6b1eb
perf(ops): Monomorphic sync op calls (#15337)
Welcome to better optimised op calls! Currently opSync is called with parameters of every type and count. This most definitely makes the call megamorphic. Additionally, it seems that spread params leads to V8 not being able to optimise the calls quite as well (apparently Fast Calls cannot be used with spread params).

Monomorphising op calls should lead to some improved performance. Now that unwrapping of sync ops results is done on Rust side, this is pretty simple:

```
opSync("op_foo", param1, param2);
// -> turns to
ops.op_foo(param1, param2);
```

This means sync op calls are now just directly calling the native binding function. When V8 Fast API Calls are enabled, this will enable those to be called on the optimised path.

Monomorphising async ops likely requires using callbacks and is left as an exercise to the reader.
2022-08-11 15:56:56 +02:00
David Sherret
321a42d1fb
refactor(runtime): split up MainWorker and WebWorker's preload_module method into two separate methods (#15451) 2022-08-10 18:10:51 -04:00
Nayeem Rahman
578f12d531
fix(cli): allow configurations files to also be json modules (#15444)
Closes #15440
2022-08-11 07:33:42 +10:00
David Sherret
d9fae38d1e
feat: add initial internal npm client and dependency resolver (#15446) 2022-08-10 15:23:58 -04:00
Leo Kettmeir
d0ffa0beb5
fix(permissions): ignore empty values (#15447) 2022-08-10 21:13:53 +02:00
Kayla Washburn
08061b60d9
fix: allow setting globalThis.location when no --location is provided (#15448) 2022-08-10 12:57:30 -06:00
sigmaSd
5b2ae25f13
feat(repl): add color to functions for syntax highlighting (#15434) 2022-08-10 12:39:16 -04:00
Cre3per
afc29c28ae
fix(task): subcommand parser skips global args (#15297) 2022-08-10 11:55:34 -04:00
David Sherret
d6f789eb05
chore: temporarily disable op_require_read_file (#15433) 2022-08-09 17:28:13 -04:00
Kitson Kelly
1c2ec1f48f
fix: update deno_graph to fix importing config as JSON module (#15388)
Ref: denoland/deno_graph#166
2022-08-10 07:27:22 +10:00
Bartek Iwańczuk
1f54d87789
feat: add ext/node for require support (#15362)
This commit adds "ext/node" extension that implementes CommonJS module system.

In the future this extension might be extended to actually contain implementation of
Node compatibility layer in favor of "deno_std/node".

Currently this functionality is not publicly exposed, it is available via "Deno[Deno.internal].require"
namespace and is meant to be used by other functionality to be landed soon.

This is a minimal first pass, things that still don't work:

support for dynamic imports in CJS
conditional exports
2022-08-09 21:06:01 +02:00
David Sherret
888b26819e
fix: various formatting fixes (#15412) 2022-08-05 19:31:19 -04:00
Aapo Alasuutari
9c594de0ff
feat(ext/ffi): Add static method variants to Deno.UnsafePointerView (#15146) 2022-08-05 21:57:12 +05:30
denobot
cf33720a85
chore: forward v1.24.2 release commit to main (#15410) 2022-08-05 00:10:47 +02:00
Nayeem Rahman
34328690dc
fix(test): output parallel test results independently (#15399) 2022-08-04 12:38:40 -04:00
David Sherret
8f102e49c1
fix(vendor): existing import map with bare specifier in remote (#15390) 2022-08-04 09:39:14 -04:00
Yongwook Choi
2138b68c24
fix: Update Object.prototype.__proto__ related comments (#15394) 2022-08-04 08:39:16 +05:30
David Sherret
8b03c1e6cc
fix(vendor): error on dynamic imports that fail to load instead of panicking (#15391) 2022-08-03 21:23:45 -04:00
Bartek Iwańczuk
bc4ee59246
chore(compat): update list of supported modules (#15397) 2022-08-03 15:56:48 +02:00
Nayeem Rahman
2e2c623882
fix(test): race condition for cancelled tests (#15233) 2022-08-02 10:55:11 -04:00
Kitson Kelly
09d14b1b57
fix(lsp): use correct commit chars for completions (#15366)
Fixes: #15252
2022-08-02 08:54:17 +10:00
Outvi V
924aa31fa8
fix(lsp): remove excessive line breaks in status page (#15364)
Fixes #15359
2022-08-02 08:29:05 +10:00
David Sherret
2703996dea
refactor(emit/cache): move cli version into emit hash (#15348) 2022-07-30 12:09:12 -04:00
David Sherret
ef5653be98
refactor: reuse FastInsecureHasher in get_check_hash (#15354) 2022-07-30 11:43:03 -04:00
Bartek Iwańczuk
20a89d46c4
fix(core): BorrowMutError in nested error (#15352) 2022-07-30 16:09:42 +02:00
Mathias Lafeldt
3f0dcd3b80
docs: turn bare URLs into clickable links (#15347) 2022-07-30 12:20:29 +02:00
David Sherret
b676cab0b4
fix(compat): use mjs extension for stream/promises (#15341) 2022-07-29 15:48:03 -04:00
Colin Ihrig
088bc52db0
Forward 1.24.1 to main (#15333) (#15336)
1.24.1 (#15333)

Co-authored-by: cjihrig <cjihrig@users.noreply.github.com>
2022-07-29 08:44:46 -04:00
David Sherret
ffd74cb1a1
chore: update jsonc_parser to 0.20 (#15316) 2022-07-26 21:24:56 -04:00
Aapo Alasuutari
b4b4e5980b
chore(ops): Remove unused arguments from ops (#15315) 2022-07-26 19:34:08 +02:00
Kitson Kelly
7036600be3
fix(lsp): remove CompletionInfo.flags (#15288)
Fixes: #15287
2022-07-25 07:11:33 +10:00
Aapo Alasuutari
f8fee6cd21
feat(ext/ffi): Safe number pointers (#15173) 2022-07-24 16:11:11 +05:30
diachedelic
2843160fc7
feat(ext/crypto): deriveBits P-384 (#15138)
This commit adds P-384 curve support for crypto.subtle.deriveBits.

Co-authored-by: James Diacono <james@diacono.com.au>
2022-07-23 22:34:37 +05:30
Bartek Iwańczuk
504d2936ec
fix: unhandledrejection handling for sync throw in top level (#15279)
Fixes an edge in "unhandledrejection" event that prevent synchronous
errors being surfaced when throw from a top-level scope.
2022-07-23 00:40:42 +02:00
Bartek Iwańczuk
72199303d8
fix: Child.unref() unrefs stdio streams properly (#15275) 2022-07-22 18:07:20 +02:00
Divy Srivastava
4db650ddd5
Revert "feat(ops): V8 Fast Calls (#15122)" (#15276)
This reverts commit 03dc3b8972.
2022-07-22 19:06:32 +05:30
Divy Srivastava
03dc3b8972
feat(ops): V8 Fast Calls (#15122)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-07-22 17:54:22 +05:30
Bartek Iwańczuk
4e71a9424e
fix: proper typings for unhandledrejection event (#15271) 2022-07-21 23:54:53 +02:00
Satya Rohith
6c3d9b981f
fix(cli): unset jsxFragmentFactory & jsxFactory options (#15264) 2022-07-21 14:44:18 +05:30
denobot
f0e01682cc
1.24.0 (#15262)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-07-21 01:28:00 +02:00
David Sherret
26cea0e2ca
feat(test): add --parallel flag, soft deprecate --jobs (#15259)
Co-authored-by: mrkldshv <markladyshev@gmail.com>
2022-07-20 17:36:54 -04:00
David Sherret
5f5bbd597a
fix(coverage): do not verify emit source hash for coverage (#15260) 2022-07-20 16:30:57 -04:00
Bartek Iwańczuk
d53936eb7d
Reland "feat: add "unhandledrejection" event support" (#15211) 2022-07-20 20:28:19 +02:00
Nayeem Rahman
6e350b2b7c
chore(cli): Ignore "experimentalDecorators" and "moduleDetection" options (#15202) 2022-07-20 16:59:56 +02:00
Bartek Iwańczuk
d17b3906bf
chore: use import.meta.resolve() in tests (#15256) 2022-07-20 16:56:53 +02:00
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
cee3246edb
fix(fmt): improve curried arrow functions (#15251) 2022-07-20 08:55:18 -04:00
ayame113
27a72a12b7
chore: align some Web API type definitions to lib.dom.d.ts (#15219) 2022-07-20 18:30:41 +08:00
Phosra
b8e1250500
fix(ext/web): align DOMException better with spec (#15097) 2022-07-20 10:12:18 +02:00
Dante Issaias
2b1f145c3e
chore(ext): update webgpu (#15059) 2022-07-20 02:22:26 +02:00
David Sherret
649536e266
fix(task): do not overflow attempting to parse large number as redirect (#15249) 2022-07-19 16:50:09 -04:00
Roj
248bfda8d3
chore(cli): update config file schema to include test config (#15246) 2022-07-19 15:10:41 -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
Leo Kettmeir
2bebdc9116
feat(unstable): Ability to ref/unref "Child" in "Deno.spawnChild()" API (#15151)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Colin Ihrig <cjihrig@gmail.com>
2022-07-18 22:24:35 +02:00
Roj
70d1ecaeaa
feat(cli): support configuring the test tool in the config file (#15079) 2022-07-18 15:12:19 -04:00
sigmaSd
1f04cea160
chore(repl): update rustyline to 10.0.0 (#15232) 2022-07-18 20:47:00 +02: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
Bartek Iwańczuk
89c1ad0303
fix: revert changes to test output for uncaught errors (#15231) 2022-07-18 18:58:13 +02:00
Nayeem Rahman
45c49034a7
BREAKING(unstable): Improve Deno.spawn() stdio API (#14919)
- "SpawnOutput" extends "ChildStatus" instead of composing it
- "SpawnOutput::stdout", "SpawnOutput::stderr", "Child::stdin", 
"Child::stdout" and "Child::stderr" are no longer optional, instead 
made them getters that throw at runtime if that stream wasn't set 
to "piped". 
- Remove the complicated "<T extends SpawnOptions = SpawnOptions>" 
which we currently need to give proper type hints for the availability of 
these fields. Their typings for these would get increasingly complex 
if it became dependent on more options (e.g. "SpawnOptions::pty" 
which if set should make the stdio streams unavailable)
2022-07-18 15:16:12 +02:00
Nayeem Rahman
22a4998e29
refactor: allocate IDs for tests (#14729) 2022-07-15 13:09:22 -04:00
David Sherret
635eed9373
chore: fix Windows specific clippy errors (#15212) 2022-07-15 12:30:25 -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
orvit
dbf5e95b59
refactor: remove redundant qualification of symbols in Rust (#15201) 2022-07-15 07:52:44 +10: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
Liam Murphy
bc7cb61d1a
fix(cli/dts): allow passing arguments to WebAssembly error constructors (#15149)
These constructors have the same signature as all of JavaScript's other builtin errors.
2022-07-14 14:42:54 -04: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
Kitson Kelly
7e06d33b34
feat(lsp): provide import map remapping diags and fixes (#15165) 2022-07-14 11:12:18 +10:00
David Sherret
294b27717c
feat(fmt): do not add a newline between a template and its tag (#15195) 2022-07-13 17:27:27 -04:00
2shiori17
0aca3f0690
fix(cli): Improve error message in watch mode (#15184) 2022-07-13 22:01:09 +02:00
David Sherret
5273259eef
chore: remove flaky writeSyncWhileAsyncFails test (#15194) 2022-07-13 15:49:20 -04:00
Nayeem Rahman
c2770c70b7
chore(cli): remove dead code related to previous tsc emit (#15196) 2022-07-13 15:38:36 -04: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
7470b2d2a7
chore: fix flaky integration::test::meta (#15192) 2022-07-13 11:01:52 -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
698eeb90fd
fix: fallback to no type checking cache when db file can't be created (#15180) 2022-07-12 22:44:15 -04:00
2shiori17
61340f1d89
feat(cli/lsp): Sort repl completions (#15171) 2022-07-12 22:21:56 -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
Colin Ihrig
7610764980
chore: forward v1.23.4 release commit to main (#15172)
1.23.4 (#15168)

Co-authored-by: cjihrig <cjihrig@users.noreply.github.com>

Co-authored-by: denobot <33910674+denobot@users.noreply.github.com>
Co-authored-by: cjihrig <cjihrig@users.noreply.github.com>
2022-07-12 17:08:36 -04:00
Divy Srivastava
5b26a4a30e
fix(ext/http): reading headers with ongoing body reader (#15161) 2022-07-12 13:31:37 -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
David Sherret
82431062fa
fix(coverage): better handling of multi-byte characters (#15159) 2022-07-11 19:02:11 -04:00
Bartek Iwańczuk
88c36fd414
benchmarks: fix exec_time and latency benchmarks (#15155) 2022-07-11 20:58:32 +02:00
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
James Bradlee
c41544ac7b
feat(unstable): add Deno.getGid (#14528) 2022-05-31 17:42:44 +09:00
Geert-Jan Zwiers
d9ed5e905c
chore(docs): use cross-platform example in Deno.run jsdoc (#14754) 2022-05-30 19:44:16 -04:00
Nayeem Rahman
f0dd751190
refactor(bench): Allocate IDs for benches (#14757) 2022-05-30 19:58:44 +02:00
Bartek Iwańczuk
787e794027
chore: update deprecated APIs docs (#14756) 2022-05-30 16:42:31 +02:00
David Sherret
0cfdf5cede
refactor: use deno_emit (#14737) 2022-05-30 09:39:14 -04:00
Mark Ladyshau
0cd8f53e65
fix(cli/dts): add captureStackTrace to lib.dom.extras (#14748)
Fixes #14512
2022-05-30 14:50:54 +10:00
Kitson Kelly
1c44f4060e
1.22.1
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>

Co-authored-by: denobot <33910674+denobot@users.noreply.github.com>
2022-05-27 17:36:43 +10:00
Geert-Jan Zwiers
ab9c7f52e0
chore(serde_v8): throw error when string buffer exceeds v8 max length (#14588) 2022-05-26 17:15:44 +02:00
Bartek Iwańczuk
3aa6d5d8b0
chore: upgrade rusty_v8 to 0.43.1 (#14713) 2022-05-26 13:13:01 +02:00
David Sherret
b4fabedd79
fix(fmt): prevent infinite loop when formatting certain binary expressions (#14725) 2022-05-25 19:55:31 -04:00
Bartek Iwańczuk
3aef7d1253
chore: upgrade test_util/std/ submodule (#14722) 2022-05-25 21:53:53 +02:00
Aaron O'Mullan
5e62ee31d7
fix(core): op metrics op_names mismatch (#14716) 2022-05-24 22:21:32 +02:00
David Sherret
d93b7627f0
fix(vendor): handle relative imports when mapped local folder name differs from remote's (#14465) 2022-05-23 12:49:28 -04: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
Simon Lecoq
75315dfe00
fix(cli/dts): change ChildStatus.signal from string to Deno.Signal (#14690) 2022-05-21 02:04:18 +02: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
Colin Ihrig
0a96cb62a8
fix(runtime): improve permission descriptor validation (#14676)
This commit improves the permission descriptor validation by
explicitly checking for object types and using optional
chaining when creating error messages in case the descriptor
is not an object.

Fixes: https://github.com/denoland/deno/issues/14675
2022-05-19 17:45:09 -04:00
Geert-Jan Zwiers
4daf1bb81a
fix(bench): update typo in bench summary (#14672) 2022-05-19 23:39:59 +02:00
Leo Kettmeir
5ffcbcfcc8
feat: make Child.kill argument optional (#14669) 2022-05-19 14:05:57 +02:00
Leo Kettmeir
4e1ca1d178
refactor: use spawn API across codebase (#14414) 2022-05-18 22:00:11 +02:00
denobot
5ad8919d64
1.22.0 (#14657)
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2022-05-18 20:35:16 +05:30
Luca Casonato
1c4028a381
fix: add types for Response.json (#14655) 2022-05-18 16:16:11 +02:00
Aleksei Kosyrev
037466e9cd
fix(ext/tls): ability to ignore IP-address certificate errors (#14610) 2022-05-18 13:32:12 +02:00
Leo Kettmeir
a151092aa1
feat: return a signal string instead number on ChildStatus (#14643) 2022-05-18 07:32:45 +02:00
Bartek Iwańczuk
9a85a95c43
feat: subcommands type-check only local files by default (#14623)
This commit changes default mode of type-checking to "local" 
and adds "--check" flag to following subcommands:
- deno bench
- deno bundle
- deno cache
- deno compile
- deno eval
- deno install
- deno test
2022-05-17 23:53:42 +02:00
Nayeem Rahman
330c820ae8
BREAKING(unstable): Enable Deno namespace in workers by default (#14581)
This commit removes "WorkerOptions.deno" option as a boolean,
as well as "WorkerOptions.deno.namespace" settings. Starting
with this commit all workers have access to "Deno" namespace
by default.
2022-05-17 22:27:17 +02:00
Bartek Iwańczuk
f57aac77ff
BREAKING: Remove unstable Deno.emit and Deno.formatDiagnostics APIs (#14463) 2022-05-17 13:50:31 -04:00
Divy Srivastava
68bf43fca7
feat(core): deterministic snapshots (#14037) 2022-05-17 20:49:55 +05:30
Bartek Iwańczuk
d76acfdc17
fix: base64 encoding of source maps with emojis (#14607)
This commit fixes source maps for files that contain emojis.

This is done by updating "deno_ast" to "0.14.1" for the case
of "--no-check" flag (ie using SWC emit) and by overriding
TSC's default base64 encoder (which turned out to be buggy)
for the type checking case.
2022-05-17 16:59:35 +02:00
Aaron O'Mullan
037e46bb51
fix(ext/http): skip auto-compression if content-encoding present (#14641)
Regression from #14552
2022-05-17 14:02:45 +02:00
Bartek Iwańczuk
8af81d98a6
feat(lsp): enable linting by default (#14583) 2022-05-16 13:10:08 +02:00
Craig Morten
10a68a5635
feat(ext/net): add CAA DNS record support in Deno.resolveDns() API (#14624) 2022-05-16 11:20:41 +02:00
David Sherret
eb5ffab1cb
fix(lsp): correct positions in some scenarios (#14359) 2022-05-15 14:41:37 -04:00
Craig Morten
c9e9265c3e
feat(ext/net): support NAPTR records in Deno.resolveDns() API (#14613) 2022-05-15 17:42:02 +02:00
Bartek Iwańczuk
45ee727412
chore: remove some unstable props (#14618) 2022-05-15 17:19:26 +02:00
Craig Morten
38e0a2ec1b
feat(ext/net): support full SOA record interface (#14617) 2022-05-15 16:43:08 +02:00
Leo Kettmeir
b08b1da6f4
Revert "refactor(runtime): change from signal_str_to_int function to enum (#14539)" (#14606)
This reverts commit c496639d5d.
2022-05-15 05:57:09 +02:00
Leo Kettmeir
c496639d5d
refactor(runtime): change from signal_str_to_int function to enum (#14539) 2022-05-14 14:10:39 +02:00
Thanapat Chotipun
bd4256262a
feat(ext/net): add support for SOA records in Deno.resolveDns() API (#14534) 2022-05-14 14:08:35 +02:00
randomicon00
f82a79ffdb
feat: add userAgent property to Navigator's prototype (#14415) 2022-05-14 12:00:02 +02:00
Geert-Jan Zwiers
0568be863b
feat(ext/web): add performance.toJSON (#14548) 2022-05-13 18:36:00 +02:00
Bartek Iwańczuk
939a070c8c
feat: add --no-config flag (#14555)
This flag disables loading of configuration file, ie. it will not be
automatically discovered and loaded. Of course this flag conflicts
with "--config" flag and they cannot be used together.
2022-05-13 17:40:50 +02:00
Bartek Iwańczuk
b543e84b39
chore: update test_util/std/ submodule (#14595) 2022-05-13 17:08:02 +02:00
Andy Kurnia
42fec5150e
fix(ext/http): make serveHttp compress for Accept-Encoding: deflate, gzip (#14525) 2022-05-13 14:10:05 +02:00
Andreu Botella
3e7afb8918
chore(runtime): Make some ops in ext and runtime infallible. (#14589)
Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
2022-05-13 10:36:31 +02:00
Luca Casonato
0ee76da07b
chore: update to rust 1.60.0 & update Cargo.lock (#14260)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
2022-05-13 01:12:55 +02:00
Bert Belder
89b428234c
1.21.3 (#14584) 2022-05-12 18:43:00 +02:00
David Sherret
e6142fafba
chore: fix flaky integration::test::pass test (#14571) 2022-05-11 18:05:54 -04:00
David Sherret
e6d8775611
chore: fix flaky lsp_testing_api test (#14569) 2022-05-11 15:44:15 -04:00
David Sherret
2da868bb4c
fix(task): accept double hyphen arg immediately following task name (#14567) 2022-05-11 12:58:35 -04:00
David Sherret
0ea6b51bf0
fix: stdout and stderr encoding on Windows (#14559) 2022-05-11 12:48:38 -04:00
Leo Kettmeir
b67f874b3f
feat(runtime/spawn): add AbortSignal support (#14538) 2022-05-11 07:59:39 +02:00
David Sherret
e3f4b02f48
fix: do not panic on TestOutputPipe::flush when receiver dropped (#14560) 2022-05-10 17:59:35 -04:00
David Sherret
abf72c5b37
chore: fix flaky steps_output_within - part 2 (#14562) 2022-05-10 16:24:37 -04:00
Nayeem Rahman
cb884de2e9
fix(runtime/web_worker): Use biased select when getting module result (#14553) 2022-05-10 11:26:57 +02:00
Mark Ladyshau
6f082f9d66
feat(cli): add deno version to manual links (#14505) 2022-05-09 20:16:34 +02:00
Bartek Iwańczuk
d4ad2b809c
feat(test): repeat test name if there's user output (#14495)
This commit changes test report output to repeat test name
before printing result, but only if there's user output, denoted
by markers.
2022-05-09 13:25:04 +02:00
Nayeem Rahman
23efc4fcab
feat(test): Represent uncaught errors (#14513)
This commit adds better reporting of uncaught errors
in top level scope of testing files. This change affects
both console runner as well as LSP runner.
2022-05-09 11:44:50 +02:00
Bartek Iwańczuk
ab728e9ccf
feat(test): change "failures:" headers in test report (#14490) 2022-05-09 10:56:13 +02:00
Aaron O'Mullan
d0f5cd6a06
fix(core): avoid panic on non-string Error.name (#14529)
Fixes #14518
2022-05-08 23:03:00 +02:00
Bartek Iwańczuk
bcd875030a
refactor(core): add AssertedModuleType enum (#14501)
Co-authored-by: Luca Casonato <hello@lcas.dev>
2022-05-07 18:46:35 +02:00
Geert-Jan Zwiers
dd1d6a0f67
feat(web): add performance.timeOrigin (#14489)
Add support for the `performance.timeOrigin` web API.

Co-authored-by: Jovi De Croock <decroockjovi@gmail.com>
2022-05-06 19:37:18 +02:00
Colin Ihrig
23c77df664
1.21.2 (#14508)
1.21.2
2022-05-05 19:37:27 -04:00
Bartek Iwańczuk
45a4d75296
refactor(core): use Box<u8> for ModuleSource.code instead of a String (#14487) 2022-05-05 13:16:25 +02:00
Luca Casonato
242273e69b
chore: update deps (#14416) 2022-05-05 12:41:59 +02:00
Nayeem Rahman
ca134d25e1
feat(test): Show Deno.test() call locations for failures (#14484) 2022-05-05 01:15:54 +02:00
Nayeem Rahman
6a21fe745a
test: Manually truncate path string (#14407) 2022-05-05 01:13:00 +02:00
David Sherret
d79a869ee6
chore: fix flaky steps_output_within test (#14479) 2022-05-04 17:01:51 -04:00
Divy Srivastava
fb390c5701
fix(ext/http): explicitly close resource after reading (#14471) 2022-05-04 20:09:15 +05:30
Geert-Jan Zwiers
253fbf9d2a
fix(coverage): exclude .snap files (#14480) 2022-05-04 13:10:55 +02:00
Thanapat Chotipun
e3954df8c5
feat(ext/net): add "NS" record support in Deno.resolveDns API (#14372) 2022-05-03 20:04:20 +02:00
Bartek Iwańczuk
3f08a40412
refactor: add core.formatLocationFilename, remove op_format_filename (#14474)
This commit moves "op_format_location" to "core/ops_builtin.rs"
and removes "Deno.core.createPrepareStackTrace" in favor of
"Deno.core.prepareStackTrace".

Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
2022-05-03 19:45:57 +02:00
Bartek Iwańczuk
5ddb83a4c2
BREAKING: Remove unstable Deno.applySourceMap API (#14473) 2022-05-03 18:44:05 +02:00
Adilson Schmitt Junior
256dcb058a
fix(test/bench): accept file protocol module specifier CLI args (#14429) 2022-05-02 15:43:03 -04:00
David Sherret
66b9187a2d
feat(unstable/task): resolve the current executable for the deno command (#14462)
Closes #14427
2022-05-02 12:25:10 -04:00
David Sherret
e099ddb87c
fix(vendor): do not panic on relative specifier with scheme-like folder name (#14453) 2022-05-02 09:07:41 -04:00
Aaron O'Mullan
1d51b1649e
fix(runtime): lossy utf8 readTextFile (#14456) 2022-05-01 19:13:05 -07:00
David Sherret
de33017a8b
fix(test): actually capture stdout and stderr in workers (#14435) 2022-05-01 14:44:55 -04:00
David Sherret
671f56f8ff
fix: improve formatting jsdocs with asterisk as first char on line (#14446) 2022-05-01 12:37:23 -04:00
David Sherret
0e3581ae2b
fix(task): support forwarding lone double hyphen (#14436) 2022-04-29 19:51:10 -04:00
David Sherret
7f520e7206
fix(task): allow hyphen values after task name (#14434) 2022-04-29 10:29:14 -04:00
Kitson Kelly
ef26a267ae
fix(cli): add dom.extras lib (#14430)
Closes: #12558
Fixes: #14344
2022-04-29 13:47:58 +10:00
Leo Kettmeir
de2004dec5
Forward 1.21.1 (#14428) 2022-04-28 23:32:42 +02:00
Ikumi Nakamura
8fb2678b22
fix(cli): wrap long line of the env variables help (#14422) 2022-04-28 14:02:55 +02:00
David Sherret
3b40be2f6e
fix: deno task forward double hyphen (#14419) 2022-04-27 15:43:36 -04:00
Andreu Botella
ba799b6729
fix(workers): Make worker.terminate() not block the current thread (#13941)
Calling `worker.terminate()` used to kill the worker's isolate and
then block until the worker's thread finished. This blocks the calling
thread if the worker's event loop was blocked in a sync op (as with
`Deno.sleepSync`), which wasn't realized at the time, but since the
worker's isolate was killed at that moment, it would not block the
calling thread if the worker was in a JS endless loop.

However, in #12831, in order to work around a V8 bug, worker
termination was changed to first set a signal to let the worker event
loop know that termination has been requested, and only kill the
isolate if the event loop has not finished after 2 seconds. However,
this change kept the blocking, which meant that JS endless loops in
the worker now blocked the parent for 2 seconds.

As it turns out, after #12831 it is fine to signal termination and
even kill the worker's isolate without waiting for the thread to
finish, so this change does that. However, that might leave the async
ops that receive messages and control data from the worker pending
after `worker.terminate()`, which leads to odd results from the op
sanitizer. Therefore, we set up a `CancelHandler` to cancel those ops
when the worker is terminated.
2022-04-27 18:22:47 +02:00
Aaron O'Mullan
8b8b21b553
perf(runtime): read entire files in single ops (#14261)
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2022-04-27 16:03:44 +02:00
Nayeem Rahman
9853c96cc4
refactor: Remove PrettyJsError and js_error_create_fn (#14378)
This commit:
- removes "fmt_errors::PrettyJsError" in favor of "format_js_error" fn
- removes "deno_core::JsError::create" and 
"deno_core::RuntimeOptions::js_error_create_fn"
- adds new option to "deno_runtime::ops::worker_host::init"
2022-04-27 01:06:10 +02:00
David Sherret
58eab0e2b3
fix(test): capture worker stdout and stderr in test output (#14410) 2022-04-26 19:00:04 -04:00
Baoshuo Ren
2c33293f66
chore: remove git.io link (#14402)
All links on git.io will stop redirecting after April 29, 2022.

- https://github.blog/changelog/2022-04-25-git-io-deprecation/
2022-04-26 18:39:47 -04:00
David Sherret
a1b4aa2ae6
fix(test): capture inherited stdout and stderr for subprocesses in test output (#14395) 2022-04-26 14:46:49 -04:00
David Sherret
f07f246ae8
chore: fix pty_complete_imports test (#14400) 2022-04-26 09:53:22 -04:00
Ben Heidemann
dc4ab1d934
feat(ext/console): Compact empty iterables when calling Deno.inspect with compact false (#14387) 2022-04-26 13:04:28 +02:00
Divy Srivastava
609c359dd4
fix(ext/http): truncate read bytes when streaming bodies (#14389)
stream shutdown wasn't happening correctly (moved it to call op_http_shutdown) & extra zeroed bytes were being sent for when body length not a multiple of 64*1024
2022-04-25 19:20:29 +02:00
David Sherret
c0e3b6096d
refactor(lsp): store all the assets in Rust when initializing (#14367) 2022-04-25 11:23:24 -04:00
Ben Heidemann
ddbfa1418c
feat(ext/console): Add string abbreviation size option for "Deno.inspect" (#14384) 2022-04-25 13:59:15 +02:00
Nayeem Rahman
e9041b9edc
fix(runtime/js/spawn): Pass stdio options for spawn() and spawnSync() (#14358) 2022-04-24 17:21:22 +02:00
evan
602097ab6e
fix(bench): report pending summary before clearing (#14369) 2022-04-23 14:20:28 +02:00
David Sherret
4cc5b2126a
chore(tests): fix pty_clear_function on Windows (#14364) 2022-04-22 17:49:10 -04:00
Luca Casonato
1ad8c11bc9
chore: bump crates (#14365) 2022-04-22 16:54:42 +02:00
Luca Casonato
a158d866bb
tests: unflake streaming compression tests (#14363) 2022-04-22 15:36:02 +02:00
evan
6fad5c33c9
fix(bench): reset reporter context (#14360)
This commit fixes previous file benchmarks leaking into the next file benchmarks summary.
2022-04-22 13:43:22 +02:00
Divy Srivastava
57f7e07c13
Reland "perf(http): optimize ReadableStreams backed by a resource" (#14346) 2022-04-22 16:19:08 +05:30
Bartek Iwańczuk
db13e455ec
fix(watcher): don't clear screen on start (#14351) 2022-04-21 17:21:59 +02:00
ayame113
fa37b6a8db
chore(cli/dts): fix the display of the Deno.spawnSync() document (#14342) 2022-04-21 14:36:57 +02:00
Divy Srivastava
2a86b8fb02
Reland "feat(ext/http): stream auto resp body compression" (#14345) 2022-04-21 12:37:49 +05:30
denobot
29c8cd8aae
1.21.0 (#14336)
Co-authored-by: ry <ry@users.noreply.github.com>
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-04-20 21:50:16 -04:00
Bartek Iwańczuk
03019e7781
Revert various PRs related to "ext/http" (#14339)
* Revert "feat(ext/http): stream auto resp body compression (#14325)"
* Revert "core: introduce `resource.read_return` (#14331)"
* Revert "perf(http): optimize `ReadableStream`s backed by a resource (#14284)"
2022-04-21 02:22:55 +02:00
Leo Kettmeir
8a7539cab3
feat(runtime): two-tier subprocess API (#11618) 2022-04-21 00:20:33 +02:00
Luca Casonato
8b25807054
feat(ext/http): stream auto resp body compression (#14325)
This commit adds support for auto response body compression for
streaming bodies.
2022-04-20 22:53:56 +02:00
Colin Ihrig
2a93c134dc
feat(repl): add global clear() function (#14332)
This commit adds a clear() function in the REPL which works
similar to console.clear().
2022-04-20 15:48:15 -04:00
evan
f785ecee1a
feat(bench): update API, new console reporter (#14305)
This commit changes "deno bench" subcommand, by updating
the "Deno.bench" API as follows:
- remove "Deno.BenchDefinition.n"
- remove "Deno.BenchDefintion.warmup"
- add "Deno.BenchDefinition.group"
- add "Deno.BenchDefintion.baseline"

This is done because bench cases are no longer run fixed amount
of iterations, but instead they are run until there is difference between
subsequent runs that is statistically insiginificant.

Additionally, console reporter was rewritten completely, to looks
similar to "hyperfine" reporter.
2022-04-20 21:06:39 +02:00
Divy Srivastava
57a8fc37fc
perf(http): optimize ReadableStreams backed by a resource (#14284) 2022-04-20 18:16:44 +05:30
Naju Mancheril
3833d37b15
feat(repl): add "--eval-file" flag to execute a script file on startup (#14247)
This commit adds support for "--eval-file" in "deno repl" subcommand.

This flag can be used to pass paths or URLs to files, that will be executed
on REPL startup. All files will be executed in the same context as the REPL
(ie. as "plain old scripts", not ES modules), sharing the global scope.

This feature allows to implement custom REPLs on top of Deno's REPL.
2022-04-20 14:16:37 +02:00
David Sherret
ae479b1036
perf(fmt/lint): incremental formatting and linting (#14314) 2022-04-19 22:14:00 -04:00
Luca Casonato
803499886b
Remove the DENO_FUTURE_CHECK warning (#14320)
It has good intentions, but it is a really terrible user experience. As
such we shouldn't print this warning.
2022-04-19 17:08:23 +02:00
Divy Srivastava
1c05e41f37
perf(runtime): bypass tokio file and bump op buffer size to 64K (#14319) 2022-04-19 20:11:31 +05:30
David Sherret
3d1123f8b0
fix: --watch was losing items (#14317) 2022-04-19 10:12:30 -04:00
Nayeem Rahman
c30d95f2e3
feat(ext/web): add globalThis.reportError() (#13799) 2022-04-19 10:59:51 +02:00
David Sherret
a64e63c361
perf: move Deno.writeTextFile and like functions to Rust (#14221)
Co-authored-by: Luca Casonato <hello@lcas.dev>
2022-04-18 18:00:14 -04:00
Nayeem Rahman
66fbdd2ed4
feat: Add DENO_NO_PROMPT variable (#14209)
This commit adds support for "DENO_NO_PROMPT" env
variable, that can be used instead of "--no-prompt" flag
to completely disable permission prompts.
2022-04-18 21:08:30 +02:00
David Sherret
bf804d3fff
fix(fmt): regression where some short if stmt headers being split on multiple lines (#14292)
Closes #14291
2022-04-18 14:32:16 -04:00
Nayeem Rahman
2f29673fb2
fix(cli/emit): Check JS roots with // @ts-check (#14090) 2022-04-18 16:52:26 +02:00
Bartek Iwańczuk
f52031ecdf
feat(test): skip internal stack frames for errors (#14302)
This commit changes "deno test" to filter out stack frames if it is beneficial to the user.

This is the case when there are stack frames coming from "internal" code
below frames coming from user code.

Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
2022-04-18 15:22:23 +02:00
Bartek Iwańczuk
9c5928b5aa
fix: panic when trying to pledge permissions before restoring previous pledge (#14306)
This commit fixes and edge case, where testing/benching code could pledge new
permission set before restoring the previous pledge.

Appropriate panics were added and tests that assert that process is killed
in case of "recursive pledge".
2022-04-17 17:47:24 +02:00
Nayeem Rahman
bd6494d119
fix(cli/tools/test): Prefix test module paths with "./" (#14301) 2022-04-16 21:51:55 +02:00
Bartek Iwańczuk
5f2d9a4a22
feat(test): use structured data for JavaScript errors in tests (#14287)
This commit rewrites test runner to send structured error data from JavaScript
to Rust instead of passing strings. This will allow to customize display of errors
in test report (which will be addressed in follow up commits).
2022-04-16 19:51:12 +02:00
Bartek Iwańczuk
a87be28a46
feat: Better formatting for AggregateError (#14285)
This commit adds "aggregated" field to "deno_core::JsError" that stores
instances of "JsError" recursively to properly handle "AggregateError"
formatting. Appropriate logics was added to "PrettyJsError" and
"console" API to format AggregateErrors.

Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
2022-04-16 16:12:26 +02:00
Nayeem Rahman
8b31fc23cd
refactor: Move source map lookups to core (#14274)
The following transformations gradually faced by "JsError" have all been 
moved up front to "JsError::from_v8_exception()": 

- finding the first non-"deno:" source line; 
- moving "JsError::script_resource_name" etc. into the first error stack 
in case of syntax errors; 
- source mapping "JsError::script_resource_name" etc. when wrapping 
the error even though the frame locations are source mapped earlier; 
- removing "JsError::{script_resource_name,line_number,start_column,end_column}"
entirely in favour of "js_error.frames.get(0)". 

We also no longer pass a js-side callback to "core/02_error.js" from cli. 
I avoided doing this on previous occasions because the source map lookups 
were in an awkward place.
2022-04-15 16:08:09 +02:00
Bartek Iwańczuk
244926e83c
feat(test): format user code output (#14271)
This commit changes "deno test" to better denote user output coming
from test cases.

This is done by printing "---- output ----" and "---- output end ----"
markers if an output is produced. The output from "console" and
"Deno.core.print" is captured, as well as direct writes to "Deno.stdout"
and "Deno.stderr".

To achieve that new APIs were added to "deno_core" crate, that allow
to replace an existing resource with a different one (while keeping resource
ids intact). Resources for stdout and stderr are replaced by pipes.

Co-authored-by: David Sherret <dsherret@gmail.com>
2022-04-15 14:24:41 +02:00
David Sherret
0e4574b2e3
chore: forward v1.20.6 release commit to main (#14288) 2022-04-14 15:50:48 -04:00
Bartek Iwańczuk
d52613ebab
chore: rephrase env var help (#14270) 2022-04-13 17:59:40 +02:00
Nayeem Rahman
7d50a5fd43
refactor(core/error): Clarify JsError message fields (#14269) 2022-04-13 16:41:39 +02:00
Bartek Iwańczuk
47e8deeaf7
chore: add info about DENO_FUTURE_CHECK env var to --help (#14267) 2022-04-13 13:59:53 +02:00
Nayeem Rahman
4d18f558e4
feat(ext/web): Add error events for event listener and timer errors (#14159)
- feat: Add handleable error event for even listener errors
- feat: Add handleable error event for setTimeout()/setInterval() errors
- feat: Add Deno.core.destructureError()
- feat: Add Deno.core.terminate()
- fix: Don't throw listener errors from dispatchEvent()
- fix: Use biased mode when selecting between mod_evaluate() and
  run_event_loop() results
2022-04-13 11:50:57 +02:00
Bartek Iwańczuk
c8313a7457
feat(test): Improve testing report output (#14255)
Following changes were done in this commit:

- remove "test" prefix before each test
- use gray color for "running N tests from ..." prompt
- use relative path or remote URL instead of full URL in "running N tests from ..." prompt
- in "failures" section, add file path/remote URL before the test name

Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2022-04-11 18:27:17 +02:00
Ryan Dahl
1892612438
refactor: improve help text (#14249) 2022-04-11 01:01:02 -04:00
Bartek Iwańczuk
8ae17026cb
feat: Add "deno check" subcommand for type checking (#14072)
This commit adds new "deno check" subcommand.
Currently it is an alias for "deno cache" with the difference that remote
modules don't emit TS diagnostics by default.

Prints warning for "deno run" subcommand if "--check" flag is not present
and there's no "--no-check" flag. Adds "DENO_FUTURE_CHECK" env
variable that allows to opt into new behavior now.
2022-04-11 01:12:51 +02:00
David Sherret
a4c1e1bdcf
fix: upgrade to swc_ecmascript 0.143 (#14238) 2022-04-08 12:31:47 -04:00
Arthur Lafrance
e411747e24
feat(repl): Don't type check when importing modules (#14112) 2022-04-08 13:51:01 +02:00
Aaron O'Mullan
f5f7b56aca
refactor(core): OpCtx (#14228) 2022-04-08 10:32:48 +02:00
David Sherret
b2aaf708ab
chore: forward v1.20.5 release commit to main (#14232) 2022-04-07 14:40:20 -04:00
EduM22
181e378032
fix(ext/crypto): check extractable in exportKey (#14222) 2022-04-07 18:28:56 +05:30
Valentin Anger
b8d66a683a
fix(cli/install): preserve compat flag (#14223) 2022-04-06 16:54:12 -04:00
Yongwook Choi
0df1854249
feat(test): Add "name", "origin" and "parent" to "Deno.TestContext" (#14007)
This commit adds following fields to "Deno.TestContext" interface:
- name
- origin
- parent

These are prerequisites for supporting snapshot functionality in
"std/testing".
2022-04-06 16:51:38 +02:00
Jason
a6e4b4297d
refactor(lsp): migrate from lspower back to tower-lsp (#14163) 2022-04-03 14:17:30 +10:00
Bartek Iwańczuk
6c25b5135d
chore: update tokio, tokio-util and libc dependencies (#14174) 2022-04-02 19:54:40 +02:00
David Sherret
1535fdd949
chore: fix main (#14175) 2022-04-01 11:49:16 -04:00
David Sherret
1c37ac3352
chore(tests): use custom temp dir creation for the tests (#14153) 2022-04-01 11:15:37 -04:00
David Sherret
7fec7c834c
1.20.4 (#14168) 2022-03-31 15:48:35 -04:00
Divy Srivastava
b0f974fbfd
fix(compile): follow redirects when resolving (#14161) 2022-03-31 14:11:30 +05:30
David Sherret
1d24b2cf63
chore: disable wgpu tests in WSL (#14157) 2022-03-30 20:56:28 -04:00
David Sherret
d069360c46
chore(tests): add more lsp tests for formatting (#14155) 2022-03-30 18:44:47 -04:00
David Sherret
5cab3e7dba
build: use workflows for bumping versions and cargo publishing on the CI (#13995) 2022-03-30 16:37:00 -04:00
David Sherret
f61b2c0b11
chore: add semi-colon to compat/mod.rs export default output (#14154) 2022-03-30 14:57:13 -04:00
Kitson Kelly
061090de7e
feat(lsp): add experimental testing API (#13798)
Ref: denoland/vscode_deno#629
2022-03-30 09:59:27 +11:00
David Sherret
4a0b2c28a1
chore(ci): fix lsp bench due to notification that was accidentally added (#14148) 2022-03-29 17:28:55 -04:00
TrickyPi
85e16a08c7
feat(cli/fmt): ignore .git folder when formatting files (#14138) 2022-03-29 14:57:42 -04:00
David Sherret
03c71a8b4a
chore: upgrade dprint-core to 0.54.1 (#14146) 2022-03-29 13:33:00 -04:00
Andreu Botella
d983b577bc
chore(wasm): Don't await on the argument to handleWasmStreaming (#14000)
`handleWasmStreaming` is the function that provides the binding with
the `fetch` API needed for `WebAssembly.instantiateStreaming()` and
`WebAssembly.compileStreaming()`. When I implemented it in #11200, I
thought V8 was calling these functions with the argument of the
`WebAssembly` streaming functions, without doing any resolving, and so
`handleWasmStreaming` awaits for the parameter to resolve. However,
as discovered in
https://github.com/denoland/deno/issues/13917#issuecomment-1065805565,
V8 does in fact resolve the parameter if it's a promise (and handles
rejections arising from that).

This change removes the `async` IIFE inside `handleWasmStreaming`,
letting initial errors be handled synchronously (which will however
not throw synchronously from the `WebAssembly` namespace functions).
Awaiting is still necessary for reading the bytes of the response,
though, and so there is an `async` IIFE for that.
2022-03-29 14:44:33 +02:00
Bartek Iwańczuk
381d565acf
refactor(flags): rename CheckFlag to TypecheckMode (#14111) 2022-03-29 03:48:29 +02:00
Kitson Kelly
5a6a1eeb39
feat(lsp): support API for config file (#14139)
Closes: #13910
2022-03-29 11:27:43 +11:00
David Sherret
89dd5dac62
chore: fix compile_windows_ext test (#14142) 2022-03-28 14:38:15 -04:00
David Sherret
af473ce15c
fix(task): handle PATHEXT with trailing semi-colon (#14140) 2022-03-28 12:02:21 -04:00
Kitson Kelly
33a8613451
fix(lsp): watch .jsonc files (#14135) 2022-03-28 20:40:39 +11:00
Robert
2262097141
chore: update clap and completions (#14136) 2022-03-28 03:57:56 +02:00
Luca Casonato
37b0ec454c
chore: forward v1.20.3 release commit to main (#14121) 2022-03-25 18:53:55 +01:00
David Sherret
4691bde429
fix: Deno.run - do not modify user provided cmd array (#14109) 2022-03-25 08:17:13 -04:00
Aleksandr Bukhalo
84b1acf8ba
docs(cli): fix typo in PermissionOptionsObject (#14114) 2022-03-25 12:30:20 +01:00
Luca Casonato
25b73a366f
fix(ext/ffi): enforce unstable check on ops (#14115) 2022-03-25 12:29:54 +01:00
David Sherret
eb4daafc51
docs: WorkerOptions - fix permissions description (#14011) 2022-03-24 16:27:24 +01:00
Kitson Kelly
cff1e92ecf 1.20.2 2022-03-24 14:47:06 +11:00
Kitson Kelly
c755548e02
tests(cli): ignore previously unignored test (#14104)
Ref: #14103
2022-03-24 12:45:45 +11:00
Bartek Iwańczuk
b82ded84d3
fix(bench): require --unstable flag in JavaScript (#14091) 2022-03-23 16:33:42 +01:00
David Sherret
53dac7451b
chore: remove all pub(crate)s from the cli crate (#14083) 2022-03-23 09:54:22 -04:00
Yoshiya Hinosawa
7feb25d448
feat(unstable): add ref/unref to Listener (#13961)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-03-23 12:04:20 +09:00
Bartek Iwańczuk
c3f306d778
fix(test): don't error on missing op details (#14074) 2022-03-23 00:24:45 +01:00
Bartek Iwańczuk
85c60d23f2
refactor: remove loops in cli/tests/unit/http_test.ts (#14075) 2022-03-22 23:08:29 +01:00
Yoav Lavi
d43441f8e6
fix(compat): Changes an instance of collect::<Vec<_>>().join("") to collect::<String>() (#14082) 2022-03-22 23:04:16 +01:00
David Sherret
6268a1a6fd
chore: replace .expect("...") calls with .unwrap() in test code (#14081) 2022-03-22 15:10:00 -04:00
David Sherret
e46b5f738d
fix(tests): do not use global env vars in install tests (#14078) 2022-03-22 13:37:15 -04:00
Nayeem Rahman
d2c099ce34
fix(ext/fetch): Connect async error stack with user code (#13899) 2022-03-22 18:08:33 +01:00
David Sherret
c9817c335c
fix(unstable): upgrade deno_task_shell to 0.2 (#14073) 2022-03-22 10:16:14 -04:00
David Sherret
49012cbc33
feat: upgrade to swc_ecmascript 0.137.0 (#14067) 2022-03-22 09:19:53 -04:00
Andreu Botella
12d28dffc6
fix(fetch): Fix uncaught rejection panic with WebAssembly.instantiateStreaming (#13925)
When an exception is thrown during the processing of streaming WebAssembly,
`op_wasm_streaming_abort` is called. This op calls into V8, which synchronously
rejects the promise and calls into the promise rejection handler, if applicable.
But calling an op borrows the isolate's `JsRuntimeState` for the duration of the
op, which means it is borrowed when V8 calls into `promise_reject_callback`,
which tries to borrow it again, panicking.

This change changes `op_wasm_streaming_abort` from an op to a binding
(`Deno.core.abortWasmStreaming`). Although that binding must borrow the
`JsRuntimeState` in order to access the `WasmStreamingResource` stored in the
`OpTable`, it also takes ownership of that `WasmStreamingResource` instance,
which means it can drop any borrows of the `JsRuntimeState` before calling into
V8.
2022-03-22 11:33:29 +01:00
David Sherret
b410937556
chore: fix development issues on Windows (#14030) 2022-03-21 14:30:43 +01:00
Kitson Kelly
1414dc503b
feat(lsp): support deno.enablePaths setting (#13978)
Ref: denoland/vscode_deno#633
2022-03-21 12:33:37 +11:00
Luca Casonato
daa7c6d32a
fix: actually don't inherit runtime permissions (#14024) 2022-03-20 22:46:39 +01:00
Jason
0bc286ab47
fix(ext/console): fix error with a Proxy of a Map (#14032) 2022-03-20 20:21:42 +09:00
Bartek Iwańczuk
52a6e9ef4a
feat(ext/net): Deno.upgradeHttp handles unix connections (#13987) 2022-03-19 14:21:49 +01:00
TrickyPi
b01bc7faff
fix(cli): improve deno compile error messages (#13944)
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-03-18 19:18:50 -04:00
Sylvain Cau
c98c976294
fix(cli): add support for DENO_CERT in upgrade command (#13862) 2022-03-18 18:40:44 -04:00
Divy Srivastava
2799b0b7b4
chore(ops): include argument position in serde_v8 errors (#14027) 2022-03-18 20:53:31 +05:30
David Sherret
9c403f146e
fix(config-file): fix config-file.v1.json schema to allow colons in the task name (#14013) 2022-03-17 13:55:24 -04:00
Ryan Dahl
fce60f2cc2
v1.20.1 2022-03-16 21:40:31 -04:00
Ryan Dahl
18f998fbee
chore: fix build (#13997) 2022-03-16 21:37:02 -04:00
Ryan Dahl
f7ab41583e
fix: cargo publish fails without absolute paths (#13993)
This reverts commit 4e3ed37037.

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-03-17 01:25:44 +01:00
Ryan Dahl
418c1eb4b3
v1.20.0 2022-03-16 16:07:35 -04:00
Bert Belder
c5270abad7
feat(unstable): Add Deno.upgradeHttp API (#13618)
This commit adds "Deno.upgradeHttp" API, which
allows to "hijack" connection and switch protocols, to eg.
implement WebSocket required for Node compat.

Co-authored-by: crowlkats <crowlkats@toaxl.com>
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-03-16 14:54:18 +01:00
Divy Srivastava
89a41d0a67
chore(cli): Disallow cross compiling for snapshots (#13976) 2022-03-16 19:17:15 +05:30
Divy Srivastava
7044bf523b
perf(web): optimize Blob.text and Blob.arrayBuffer (#13981) 2022-03-16 19:16:52 +05:30
Ryan Dahl
45b3aa22c0
feat(ext/fetch): Allow Response status 101 (#13969)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-03-16 14:30:43 +01:00
Divy Srivastava
697b60a335
perf(web): use DOMString for BlobParts (#13979) 2022-03-16 12:58:38 +05:30
David Sherret
748aff1e94
feat(task): add unstable warning to deno task (#13966) 2022-03-15 21:24:07 -04:00
Luca Casonato
a7bef54d3f
BREAKING: don't inherit permissions by default (#13668)
Previously specifying permissions: {} was the same as specifying
permissions: "inherit". Now it will be the same as permissions: "none".
Not specifying any permissions (permissions: undefined) still means
permissions: "inherit".
2022-03-16 01:43:14 +01:00
Aaron O'Mullan
bd481bf095
feat(ops): optional OpState (#13954) 2022-03-16 00:33:46 +01:00
David Sherret
5d60ee7f12
chore(test_util): use pretty_assertions::assert_eq when not pattern matching (#13965) 2022-03-15 18:15:56 -04:00
Ryan Dahl
163e1d6192
disable flakes (#13962) 2022-03-15 11:19:59 -04:00
Aaron O'Mullan
88d0f01948
feat(ops): custom arity (#13949)
Also cleanup & drop ignored wildcard op-args
2022-03-14 23:38:53 +01:00
Andreu Botella
9f494dc405
feat(ext/web): Add AbortSignal.timeout() (#13687) 2022-03-14 20:19:22 +01:00
Leo Kettmeir
5eb0e4c2df
fix: shell completion hints (#13876) 2022-03-14 19:41:35 +01:00
Andreu Botella
c6bf07ec6d
fix(core): Don't override structured clone error messages from V8 (#13942)
In the implementation of structured serialization in
`Deno.core.serialize`, whenever there is a serialization error, an
exception will be thrown with the message "Failed to serialize
response", even though V8 provides a message to use in such cases.
This change instead throws an exception with the V8-provided message,
if there is one.
2022-03-14 19:35:15 +01:00
Divy Srivastava
b4e42953e1
feat(core): codegen ops (#13861)
Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
2022-03-14 18:44:15 +01:00
Divy Srivastava
4e3ed37037
chore: improve build times for ext/ changes (#13927) 2022-03-14 09:08:54 +05:30
Bartek Iwańczuk
9d9e60b694
feat(task): log task script (#13922)
Logs task name and associated script with additional args.
This is disabled if "--quiet/-q" flag is present.
2022-03-12 02:35:18 +01:00
Bartek Iwańczuk
1a764790f2
test: fix flaky compat tests (#13921) 2022-03-12 02:08:55 +01:00
Bartek Iwańczuk
5ebaa7943a
feat(task): allow colons in task name (#13918) 2022-03-11 18:22:45 -05:00
Bartek Iwańczuk
09ae512ccb
feat: "deno bench" subcommand (#13713)
This commit adds "deno bench" subcommand and "Deno.bench()"
API that allows to register bench cases. 

The API is modelled after "Deno.test()" and "deno test" subcommand.

Currently the output is rudimentary and bench cases and not
subject to "ops" and "resource" sanitizers.

Co-authored-by: evan <github@evan.lol>
2022-03-11 23:07:02 +01:00
David Sherret
32c059544b
chore(test): fix flaky tasks (#13916) 2022-03-11 13:20:14 -05:00
Yoshiya Hinosawa
b198bfd795
refactor(core): validate promise id in refOp (#13905) 2022-03-12 01:18:49 +09:00
Filip Skokan
f9b4d262b3
fix(ext/crypto): handle JWK import with "use" (#13912) 2022-03-11 20:26:16 +05:30
Bartek Iwańczuk
47f22777be
feat: "deno task" subcommand (#13725)
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-03-10 20:56:14 -05:00
Bartek Iwańczuk
808f797633
fix(compat): cjs/esm interop for dynamic imports (#13792)
This commit fixes CJS/ESM interop in compat mode for dynamically
imported modules.

"ProcState::prepare_module_load" was changed to accept a list
of "graph roots" without associated "module kind". That module kind
was always hardcoded to "ESM" which is not true for CJS/ESM interop -
a CommonJs module might be imported using "import()" function. In
such case the root of the graph should have "CommonJs" module kind
instead of "ESM".
2022-03-11 02:33:02 +01:00
Geert-Jan Zwiers
8db3a9546b
fix(test): skip typechecking for blocks inside HTML comments (#13889) 2022-03-11 02:14:32 +01:00
Geert-Jan Zwiers
38e88e32b7
fix(info): print deno info paths with unescaped backslashes on windows (#13847) 2022-03-10 19:57:57 -05:00
Bartek Iwańczuk
8dc26971ec
types: add Deno.PermissionOptions and Deno.PermissionOptionsObject (#13892)
Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
2022-03-11 01:35:33 +01:00
Yoshiya Hinosawa
3c11768aab
v1.19.3 2022-03-10 23:29:14 +09:00
Bartek Iwańczuk
2e30112e62
test: update expected test output for 'deno test' (#13882) 2022-03-09 14:48:20 +01:00
Divy Srivastava
a5957f46ee
chore(ext/crypto): remove old todos (#13887) 2022-03-09 18:13:11 +05:30
Bartek Iwańczuk
85cb6f2563
refactor(test): use tokio::sync::mpsc::unbounded_channel (#13881)
This causes to block one less thread when running "deno test"
subcommand.
2022-03-09 01:34:31 +01:00
Bartek Iwańczuk
22dbbf75f3
refactor: add cli/display.rs module (#13879) 2022-03-09 00:19:02 +01:00
Bartek Iwańczuk
32ef9bfa47
refactor(test): don't spawn additional thread (#13877) 2022-03-08 23:42:21 +01:00
Divy Srivastava
61fbecfd5b
chore: update regex to 1.5.5 (#13875) 2022-03-08 22:00:17 +05:30
Geert-Jan Zwiers
e53b6c16bc
fix(test): typecheck blocks annotated with long js/ts notations (#13785) 2022-03-08 02:10:40 +01:00
Satya Rohith
670aef5c1a
fix(ext/http): drop content-length header on compression (#13866) 2022-03-07 22:43:15 +05:30
Aaron O'Mullan
f65529aa67
bench(common): base64 short strings (#13851) 2022-03-07 11:12:16 +01:00
Divy Srivastava
18a3a0ba75
bench: add base64 roundtrip (#13839) 2022-03-04 21:45:24 +01:00
Bartek Iwańczuk
060dabee4c
feat(net): add Deno.UnixConn interface (#13787) 2022-03-04 20:33:13 +01:00
Kitson Kelly
d1db500cda
feat(ext/http): auto-compression of fixed response bodies (#13769)
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
Co-authored-by: Satya Rohith <me@satyarohith.com>
Co-authored-by: Luca Casonato <lucacasonato@yahoo.com>
2022-03-04 16:04:39 +11:00
Satya Rohith
975f413c46 1.19.2 (#13825) 2022-03-03 15:05:18 -05:00
Satya Rohith
95459e60f6 chore: bump crate version for 1.19.2 (#13824) 2022-03-03 15:05:18 -05:00
David Sherret
e8c47755bb
chore(lsp): log more for "unexpected positions" lsp error (#13815)
Ref #13657
2022-03-03 08:06:38 +11:00
Divy Srivastava
8b2989c417
feat(ext/crypto): AES-GCM support for 128bit IVs (#13805) 2022-03-02 10:56:10 +05:30
Yoshiya Hinosawa
b751e97a01
fix(repl): fix null eval result (#13804)
Co-authored-by: Satya Rohith <me@satyarohith.com>
2022-03-02 13:39:08 +09:00
Kitson Kelly
7fc5bfe51b
feat(cli): update to TypeScript 4.6.2 (#13474) 2022-03-02 07:44:43 +11:00
Antonio Musolino
6a030a5396
fix(runtime): disable console color for non tty stdout (#13782) 2022-03-01 12:37:50 +09:00
Elisée Maurer
a41d399f5f
chore: Add "noImplicitOverride" to config-file.v1.json (#13780) 2022-02-28 09:39:47 +11:00
Bartek Iwańczuk
7e3d9084b6
feat: Add Deno.TcpConn class, change return type from Deno.connect (#13714) 2022-02-27 15:18:30 +01:00
Bartek Iwańczuk
a65ce33fab
feat(compat): CJS/ESM interoperability (#13553)
This commit adds CJS/ESM interoperability when running in --compat mode.

Before executing files, they are analyzed and all CommonJS modules are
transformed on the fly to a ES modules. This is done by utilizing analyze_cjs()
functionality from deno_ast. After discovering exports and reexports, an ES
module is rendered and saved in memory for later use.

There's a caveat that all files ending with ".js" extension are considered as
CommonJS modules (unless there's a related "package.json" with "type": "module").
2022-02-27 14:38:45 +01:00
Bartek Iwańczuk
4bea1d06c7
fix(test): use --no-prompt by default (#13777)
This commit changes "deno test" subcommand, to
always never prompt for permissions (ie. as if "deno test"
was run with "--no-prompt" flag).
2022-02-26 14:49:50 +01:00
Bartek Iwańczuk
d332bf1132
feat: deno test --trace-ops (#13770)
This commit adds "--trace-ops" flag to "deno test" subcommand.

This flag enables saving of stack traces for async ops, that before were always
saved. While the feature proved to be very useful it comes with a significant performance
hit, it's caused by excessive source mapping of stack frames.
2022-02-25 16:14:46 +01:00
Yoshiya Hinosawa
111c343281
fix(cli): disable config discovery for remote script (#13745) 2022-02-25 14:39:18 +09:00
David Sherret
3b12afd072
chore: upgrade to Rust 1.59 (#13767) 2022-02-24 20:03:12 -05:00
Simon Lecoq
c59152e400
feat(cli): support data url (#13667)
Closes #11141
2022-02-25 11:26:13 +11:00
David Sherret
5f28066204 1.19.1 (#13762) 2022-02-24 17:45:39 -05:00
David Sherret
4deefafdd1 chore: bump crate versions for 1.19.1 (#13760) 2022-02-24 17:45:39 -05:00
David Sherret
49b6fc34b4
chore: upgrade swc_ecmascript to 0.114 (#13758) 2022-02-24 10:43:46 -05:00
Divy Srivastava
03c55b4970
fix(compile): Support import maps (#13756) 2022-02-24 18:58:00 +05:30
Yoshiya Hinosawa
3e8180c793
feat(ext/net): support cert, key options in listenTls (#13740) 2022-02-24 13:16:56 +09:00
mlemesle
f8b73ab97e
fix(upgrade): move the file permission check to the beginning of the upgrade process (#13726) 2022-02-23 16:11:46 -05:00
Kitson Kelly
973fe6dd3a
refactor: remove dead code from lsp (#13743) 2022-02-24 08:01:20 +11:00
Kitson Kelly
ee27b9dd7e
feat: allow specification of import map in config file (#13739)
Closes: #12800
2022-02-23 10:51:14 +11:00
Geert-Jan Zwiers
6613a312b1
docs: code example to structuredClone, CompressionStream, DecompressionStream (#13719)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-02-22 20:41:59 +01:00
David Sherret
5d7e1229db
fix(vendor): do not add absolute specifiers to scopes (#13710) 2022-02-18 23:10:40 -05:00
Aapo Alasuutari
b1a6555c05
feat(ext/ffi): Support read only global statics (#13662) 2022-02-18 17:51:19 +05:30
Divy Srivastava
6a5a3f66b3
chore: bump nix to 0.23 (#13701) 2022-02-17 19:31:26 +05:30
Bartek Iwańczuk
551ace40cc
v1.19.0 2022-02-17 01:54:07 +01:00
Bartek Iwańczuk
e17ab6322e
chore: release crates for v1.19.0 (#13698) 2022-02-17 00:57:40 +01:00
Ryan Dahl
57f4b0e5af
feat: Add hint to permission prompt to display allow flag (#13695) 2022-02-17 00:14:46 +01:00
Luca Casonato
53088e16de
feat(test): improved op sanitizer errors + traces (#13676)
This commit improves the error messages for the `deno test` async op
sanitizer. It does this in two ways:
- it uses handwritten error messages for each op that could be leaking
- it includes traces showing where each op was started

This "async op tracing" functionality is a new feature in deno_core.
It likely has a significant performance impact, which is why it is only
enabled in tests.
2022-02-16 19:53:17 +01:00