Bartek Iwańczuk
b312503f8f
refactor: remove old Node compat code ( #16142 )
...
This code was introduced in 808f797633
and
was needed for "compat mode". Since "compat mode" was removed in v1.26, this
code is no longer needed.
2022-10-04 17:53:23 +02:00
Marcos Casagrande
569287b15b
perf(ext/fetch): consume body using ops ( #16038 )
...
This commit adds a fast path to `Request` and `Response` that
make consuming request bodies much faster when using `Body#text`,
`Body#arrayBuffer`, and `Body#blob`, if the body is a FastStream.
Because the response bodies for `fetch` are FastStream, this speeds up
consuming `fetch` response bodies significantly.
2022-10-04 15:48:50 +02:00
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
Filip Skokan
fd08b13dff
fix(ext/crypto): ECDH and X25519 non byte length and 0 length fixes ( #16146 )
2022-10-04 16:54:05 +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
Filip Skokan
7742ad77fa
fix(ext/crypto): curve25519 import export ( #16140 )
2022-10-03 23:06:25 -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
Marcos Casagrande
d13c88e70d
refactor(ext/fetch): avoid extra headers copy in .clone ( #16130 )
2022-10-03 13:34:13 +02:00
Jakub Łabor
7a7767262a
chore(serde_v8): Use SeqAccess in MapObjectAccess to avoid intermediate allocation ( #16137 )
...
Existing implementation builds an intermediate vector of object keys
when deserializing using `MapObjectAccess`.
This logic is already handled by `SeqAccess` which can be used directly
by `MapObjectAccess`.
2022-10-03 12:37:18 +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
Darshan Sen
bac3a1210f
fix(serde_v8): serialize objects with numeric keys correctly ( #15946 )
...
Signed-off-by: Darshan Sen <raisinten@gmail.com>
2022-10-02 22:18:31 +02:00
Jakub Łabor
e07b62d74a
fix(serde_v8): Implement MapAccess for StructAccess ( #15962 )
...
`StructAccess` implements` serde:🇩🇪 :SeqAccess` instead of
`serde:🇩🇪 :MapAccess` thus interpreting structs as sequences.
2022-10-02 21:50:51 +02:00
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
Colin Ihrig
636b448f3c
fix(ext/crypto): use correct handle for public keys ( #16099 )
...
When storing public and private keys in the key store, use a different
handle for each key so that they can be looked up in the future.
Refs: https://github.com/denoland/deno/pull/14119
Refs: https://github.com/denoland/deno_std/issues/2631
2022-09-30 09:18:30 -04:00
Luca Casonato
20c7300412
refactor(ext/http): remove op_http_read ( #16096 )
...
We can use Resource::read_return & op_read instead. This allows HTTP
request bodies to participate in FastStream.
To make this work, `readableStreamForRid` required a change to allow non
auto-closing resources to be handled. This required some minor changes
in our FastStream paths in ext/http and ext/flash.
2022-09-30 07:54:12 +02:00
Luca Casonato
38f544538b
fix(runtime): no FastStream for unrefable streams ( #16095 )
2022-09-30 00:42:33 +02: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
TrickyPi
37887d4a1f
fix: move Deno.hostname() from denoNsUnstable to denoNs ( #16086 )
2022-09-29 12:15:35 +02:00
Agustin Casagrande
16bc9b16d2
refactor(ext/cache): remove extra headers iteration in cache.put ( #16078 )
2022-09-29 10:34:45 +05:30
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
Bartek Iwańczuk
9c861ec430
chore(wpt): ignore some flaky tests ( #16073 )
2022-09-28 17:37:26 +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
Bartek Iwańczuk
1156f726a9
refactor(runtime): don't use destructuring assignment in JS code ( #16050 )
2022-09-28 12:28:38 +02:00
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
abdb6aad6e
chore(wpt): add ability to ignore a test file ( #16056 )
2022-09-27 23:32:17 +02:00
Bartek Iwańczuk
212b7dd6da
feat: Add requesting API name to permission prompt ( #15936 )
...
Co-authored-by: Leo Kettmeir <crowlkats@toaxl.com>
2022-09-27 22:36:33 +02:00
Bartek Iwańczuk
a344368603
feat: Stabilize Deno.refTimer() and Deno.unrefTimer() APIs ( #16036 )
2022-09-27 22:11:11 +02:00