Bartek Iwańczuk
c464cd7073
refactor: FeatureChecker integration in ext/ crates ( #20797 )
...
Towards https://github.com/denoland/deno/issues/20779 .
2023-10-12 15:55:50 +00:00
Nayeem Rahman
5dd010a4fb
feat(lsp): send "deno/didChangeDenoConfiguration" notifications ( #20827 )
2023-10-12 16:07:27 +01:00
Nayeem Rahman
eaeb10cee1
perf(lsp): fix redundant file reads ( #20802 )
2023-10-12 15:37:56 +01:00
Bartek Iwańczuk
cee221109a
fix(node/http2): fixes to support grpc ( #20712 )
...
This commit improves "node:http2" module implementation, by enabling
to use "options.createConnection" callback when starting an HTTP2
session.
This change enables to pass basic client-side test with "grpc-js/grpc"
package.
Smaller fixes like "Http2Session.unref()" and "Http2Session.setTimeout()"
were handled as well.
Fixes #16647
2023-10-12 14:03:19 +00:00
Nayeem Rahman
2fb9ddd2e6
chore(task): remove warning for npm "scripts" ( #20880 )
2023-10-12 07:33:59 +01:00
Mark A. Hershberger
27a813daaa
docs: update readme hello world example ( #20874 )
...
Fixes #20873
2023-10-11 14:43:41 +00:00
David Sherret
93e07fa118
fix: upgrade dprint-plugin-markdown 0.16.2 and typescript 0.88.1 ( #20879 )
...
Markdown:
* fix: hard break in list was incorrectly being converted to soft with
hard break
6678390b27
TypeScript:
* fix: multi-line string indent was broken in some cases
(https://github.com/dprint/dprint-plugin-typescript/pull/566 )
* feat: add parens around unary expressions in in/instanceof
(https://github.com/dprint/dprint-plugin-typescript/pull/564 )
2023-10-11 05:48:03 +00:00
Leo Kettmeir
8ba1242a05
feat(WebSocketStream): rename connection to opened ( #20878 )
2023-10-11 07:31:05 +02:00
Nayeem Rahman
2215a3ea2e
fix(lsp): normalize "deno:" urls statelessly ( #20867 )
2023-10-10 19:32:22 +01:00
Bartek Iwańczuk
7b80b27a96
chore: disable another flaky Node compat test ( #20872 )
2023-10-10 18:17:11 +00:00
Nayeem Rahman
0606c11403
fix(bench): use total time when measuring wavg ( #20862 )
2023-10-10 14:40:36 +01:00
Luca Casonato
6450334f5b
feat(ext/web): cancel support for TransformStream ( #20815 )
2023-10-10 18:42:31 +09:00
Nayeem Rahman
6bbccb72d7
refactor(lsp): add "deno.reloadImportRegistries" as a command ( #20823 )
2023-10-10 05:53:41 +01:00
Luca Casonato
2665ca103e
fix(ext/web): writability of ReadableStream.from
( #20836 )
...
Fixes a WPT in `URL` and `ReadableStream`.
Some unrelated WPT expectation changes due to WPT update.
2023-10-10 05:01:01 +02:00
Nayeem Rahman
84c9300aff
fix(lsp): allow formatting vendor files ( #20844 )
2023-10-09 23:43:32 +01:00
Bartek Iwańczuk
29026fac21
chore: disable another flaky Node compat test ( #20846 )
2023-10-09 11:23:40 +00:00
Bartek Iwańczuk
d868bae90a
chore: disable flaky Node compat test ( #20832 )
2023-10-09 17:57:32 +09:00
Luca Casonato
ae81065c75
fix(ext/http): Deno.Server should not be thenable ( #20723 )
...
Otherwise you can not return `Deno.Server` from async functions.
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-10-09 12:43:14 +09:00
Nayeem Rahman
35f028daf2
perf(lsp): optimize formatting minified files ( #20829 )
2023-10-09 04:39:52 +01:00
Bartek Iwańczuk
2167a52d69
refactor: remove TimersPermissions::check_unstable ( #20831 )
...
This is dead code that was not used in any way.
Ref https://github.com/denoland/deno/pull/20797
2023-10-09 02:08:10 +02:00
Bartek Iwańczuk
dfc254cd57
fix: define window.name ( #20804 )
...
Closes https://github.com/denoland/deno/issues/20750
This matches what browsers do:
https://developer.mozilla.org/en-US/docs/Web/API/Window/name
In the future we might want to change the behavior to actually update
the process name, but that needs a bit of discussion regarding if
it needs a permission flag (that would make polyfiling `process.title`
setter really easy too).
2023-10-08 22:12:59 +00:00
Bartek Iwańczuk
d41d3b8e2f
refactor: migrate last tsc op to op2 macro ( #20816 )
2023-10-08 21:00:41 +02:00
Bartek Iwańczuk
8706a20d1f
bench: fix ops benchmarks ( #20830 )
...
https://github.com/denoland/deno/pull/20808 broke benchmarks, this
commit should fix it.
2023-10-08 18:43:14 +00:00
Matt Mastracci
6cb5d8eb86
fix(ext/ffi): use anybuffer for op_ffi_ptr_of ( #20820 )
...
Fixes #20817
2023-10-08 14:02:07 +09:00
Aapo Alasuutari
effb5e1ce4
fix(node/buffer): utf8ToBytes should return a Uint8Array ( #20769 )
2023-10-08 11:09:50 +09:00
Bartek Iwańczuk
edeccef499
refactor: migrate more ops to op2 macro ( #20808 )
...
Getting closer...
2023-10-07 21:04:03 +05:30
Jesper van den Ende
be7e2bd8c1
fix(cli): Support using both --watch
and --inspect
at the same time ( #20660 )
...
Fixes #20525
2023-10-06 23:33:14 +02:00
Trevor Manz
48bb3b2b0f
feat(unstable): Await return from Jupyter.display
( #20807 )
...
Allows `Jupyter.display` to return a promise.
Example:
```javascript
class WikiPage {
constructor(public name) {}
async [Symbol.for("Jupyter.display")]() {
let response = await fetch("https://en.wikipedia.org/wiki/ " + this.name);
return { "text/html": await response.text() }
}
}
new WikiPage("Deno_(software)")
```
2023-10-06 21:26:11 +00:00
Marcos Casagrande
ceecd8c495
perf(ext/web): optimize structuredClone without transferables ( #20730 )
...
This PR optimizes `structuredClone` when it's called without
transferables.
### Benchmarks
**main**
```
cpu: 13th Gen Intel(R) Core(TM) i9-13900H
runtime: deno 1.37.1 (x86_64-unknown-linux-gnu)
benchmark time (avg) iter/s (min … max) p75 p99 p995
----------------------------------------------------------------------------------- -----------------------------
structuredClone object 1.64 µs/iter 611,086.0 (1.58 µs … 1.84 µs) 1.66 µs 1.84 µs 1.84 µs
structuredClone transferables 2.82 µs/iter 354,281.4 (2.78 µs … 2.92 µs) 2.84 µs 2.92 µs 2.92 µs
```
**this PR**
```
cpu: 13th Gen Intel(R) Core(TM) i9-13900H
runtime: deno 1.37.1 (x86_64-unknown-linux-gnu)
structuredClone object 1 µs/iter 998,383.5 (971.28 ns … 1.2 µs) 1 µs 1.2 µs 1.2 µs
structuredClone transferables 2.82 µs/iter 355,087.5 (2.7 µs … 3.07 µs) 2.83 µs 3.07 µs 3.07 µs
```
```js
Deno.bench("structuredClone object", () => {
structuredClone({ foo: "bar" });
});
Deno.bench("structuredClone transferables", () => {
const buf = new Uint8Array([97]);
structuredClone(buf, {
transfer: [buf.buffer],
});
});
```
2023-10-06 23:21:48 +02:00
Trevor Manz
cba5ae45c2
fix(jupyter): Rename logo assets so they are discoverable ( #20806 )
...
Changes logo prefix from `icon-*` to `logo-*` so they are correctly
discovered by Jupyter.
2023-10-06 22:31:12 +02:00
Nayeem Rahman
677a591e56
fix(lsp): percent-encode host in deno: specifiers ( #20811 )
2023-10-06 14:46:43 +01:00
Bartek Iwańczuk
f0608a5b91
refactor: migrate ext/node/ops to op2 ( #20805 )
2023-10-06 00:16:36 +02:00
Nayeem Rahman
ac464ead49
feat(jupyter): support Deno.test() ( #20778 )
2023-10-05 21:45:11 +01:00
David Sherret
820e93e3e7
refactor(npm): add referrer when resolving npm package sub path from deno module ( #20800 )
...
Adds a `referrer` parameter to this function instead of using a fake
one.
2023-10-05 20:18:29 +00:00
林炳权
7a01799f49
chore: update to Rust 1.73 ( #20781 )
2023-10-05 14:49:09 -04:00
Divy Srivastava
ab3c9d41e4
fix(ext/node): implement uv.errname ( #20785 )
...
Fixes https://github.com/denoland/deno/issues/20617
2023-10-05 18:27:20 +00:00
Marcos Casagrande
176bf9ba5f
fix(ext/formdata): support multiple headers in FormData ( #20801 )
...
Fixes https://github.com/denoland/deno/issues/20793
2023-10-05 19:28:44 +02:00
Matt Mastracci
1619932a65
chore(ext/ffi): migrate from op -> op2 for ffi ( #20509 )
...
Migrate to op2. Making a few decisions to get this across the line:
- Empty slices, no matter where the come from, are null pointers. The v8
bugs (https://bugs.chromium.org/p/v8/issues/detail?id=13489 ) and
(https://bugs.chromium.org/p/v8/issues/detail?id=13488 ) make passing
around zero-length slice pointers too dangerous as they might be
uninitialized or null data.
- Offsets and lengths are `#[number] isize` and `#[number] usize`
respectively -- 53 bits should be enough for anyone
- Pointers are bigints. This is a u64 in the fastcall world, and can
accept Integer/Int32/Number/BigInt v8 types in the slow world.
2023-10-05 15:35:21 +02:00
Bartek Iwańczuk
5d98a544b4
refactor: rewrite several extension ops to op2 ( #20457 )
...
Rewrites following extensions:
- `ext/web`
- `ext/url`
- `ext/webstorage`
- `ext/io`
---------
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-10-05 14:34:38 +02:00
Nayeem Rahman
551a081450
refactor(test): support custom writer in PrettyTestReporter ( #20783 )
2023-10-05 11:25:15 +01:00
Asher Gomez
fd4fc2d818
docs: update alternative APIs for write()
, writeSync()
, read()
and readSync()
( #20792 )
...
Closes #20701
2023-10-05 10:44:37 +02:00
David Sherret
1ff525e25b
refactor(node): combine node resolution code for resolving a package subpath from external code ( #20791 )
...
We had two methods that did the same functionality.
2023-10-04 23:05:12 -04:00
Nayeem Rahman
64f9155126
fix(lsp): show diagnostics for type imports from untyped deps ( #20780 )
2023-10-05 01:38:11 +01:00
Divy Srivastava
1a81b2826d
refactor: rewrite websocket to use op2 macro ( #20140 )
...
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-10-04 21:43:58 +00:00
Kyle Kelley
cbddf5756e
fix(jupyter): keep this
around ( #20789 )
...
This fixes #20767 .
We were losing `this` and then when an exception was happening, it
didn't show up in the output because we weren't bubbling up exceptions
from within a user defined function for displaying. I thought about
doing a `.call(object)` but didn't want to get in the way of a bound
`this` that a user or library was already putting on the function.
2023-10-04 23:08:57 +02:00
Bartek Iwańczuk
a5568066b3
refactor: use deno_core::FeatureChecker for unstable checks ( #20765 )
2023-10-04 21:42:17 +02:00
Trevor Manz
9a46a824bd
feat(jupyter): send binary data with Deno.jupyter.broadcast
( #20755 )
...
Adds `buffers` to the `Deno.jupyter.broadcast` API to send binary data
via comms. This affords the ability to send binary data via websockets
to the jupyter widget frontend.
2023-10-04 13:05:20 +02:00
Yoshiya Hinosawa
da0b945804
feat(unstable): add unix domain socket support to Deno.serve ( #20759 )
2023-10-04 11:37:39 +09:00
David Sherret
8c1677ecbc
refactor(npm): break up NpmModuleLoader
and move more methods into the managed CliNpmResolver
( #20777 )
...
Part of https://github.com/denoland/deno/issues/18967
2023-10-03 19:05:06 -04:00
Bartek Iwańczuk
494822175f
chore: upgrade deno_core to 0.220.0 ( #20766 )
2023-10-03 23:01:34 +00:00