1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-28 16:20:57 -05:00
Commit graph

5402 commits

Author SHA1 Message Date
Bolat Azamat
205ac412a7
fix(cli): Allow executable name start with digit (#21214) 2023-11-17 11:30:31 +09:00
Divy Srivastava
0d8c9f8ef1
perf: static bootstrap options in snapshot (#21213)
Closes https://github.com/denoland/deno/issues/21133
2023-11-17 11:30:26 +09:00
Yoshiya Hinosawa
0764451e51
fix(runtime): fix Deno.noColor when stdout is not tty (#21208) 2023-11-17 11:30:22 +09:00
Nayeem Rahman
8c50df360f
feat(lsp): upgrade check on init and notification (#21105) 2023-11-17 11:30:19 +09:00
Divy Srivastava
0e91ce6b79
perf: move jupyter esm out of main snapshot (#21163)
Towards https://github.com/denoland/deno/issues/21136
2023-11-17 11:30:16 +09:00
David Sherret
3f17633de9
chore: switch compile tests over to the TestBuilder (#21180) 2023-11-17 11:30:13 +09:00
Bartek Iwańczuk
a85b3e7938
fix(ext/node): add APIs perf_hook.performance (#21192)
Required for Next.js.
2023-11-17 11:30:03 +09:00
Kenta Moriuchi
8bf1437f48
fix(ext/web): webstorage has trap for symbol (#21090) 2023-11-17 11:30:00 +09:00
David Sherret
e58e9da8df
chore: remove duplicate esnext.dispoable (#21184) 2023-11-17 11:29:48 +09:00
Matt Mastracci
9b07557bfb
chore(cli): unflake signal test (#21185)
If these tests do eventually break, they'll time out.
2023-11-17 11:29:37 +09:00
Matt Mastracci
83fa25653a
chore(ext/web): use a non-resource stream for textDecoderStreamCleansUpOnCancel (#21181)
Follow-up fix to #21074
2023-11-17 11:29:30 +09:00
David Sherret
60c6052060
fix(install): should work with non-existent relative root (#21161)
Closes #21160
2023-11-17 11:29:15 +09:00
Divy Srivastava
b0fe699680
perf: lazy bootstrap options - first pass (#21164)
Move most runtime options to be lazily loaded. Constant options will be
covered in a different PR.

Towards https://github.com/denoland/deno/issues/21133
2023-11-17 11:29:07 +09:00
Nayeem Rahman
bfe9c9e1ba
fix(lsp): update tsconfig after refreshing settings on init (#21170) 2023-11-17 11:28:56 +09:00
Florian Schwalm
7dc8c4e2a3
fix(ext/web): Prevent TextDecoderStream resource leak on stream cancellation (#21074)
This PR uses the new `cancel` method of `TransformStream` to properly
clean up the internal `TextDecoder` used in `TextDecoderStream` if the
stream is cancelled.

Fixes #13142

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-11-17 11:28:50 +09:00
Divy Srivastava
bd91d05b5a
perf: snapshot runtime ops (#21127)
Closes https://github.com/denoland/deno/issues/21135

~1ms startup time improvement

---------

Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2023-11-17 11:28:44 +09:00
Matt Mastracci
fbe26f1091
chore(ext/node): use libz-sys w/zlib-ng feature in node (#21158)
We only want one zlib dependency.

Zlib dependencies are reorganized so they use a hidden
`__vendored_zlib_ng` flag in cli that enables zlib-ng for both libz-sys
(used by ext/node) and flate2 (used by deno_web).
2023-11-17 11:28:39 +09:00
Kenta Moriuchi
4f8d2f3a37
fix(ext/node): Re-enable alloc max size test (#21059)
Ref #21036
2023-11-17 11:28:33 +09:00
Jacob Hummer
f155ca7a62
fix(node/http): export globalAgent (#21081)
Fixes #21080 
Fixes #18312

---------

Signed-off-by: Jacob Hummer <jcbhmr@outlook.com>
2023-11-17 11:28:27 +09:00
Tareque Md Hanif
407230fec3
chore(cli): Migrate some unit tests to "Promise.withResolvers()" (#21128)
Migrate to use `Promise.withResolvers()` instead of `deferred` in some
of the tests in `cli/tests/unit/`.
Issue: #21041
2023-11-17 11:28:22 +09:00
Divy Srivastava
6e4aa70335
fix(ext/node): implement process.geteuid (#21151)
Fixes #21097
2023-11-17 11:27:54 +09:00
David Sherret
f2d94b6ef0
fix: improve deno doc --lint error messages (#21156)
This also updates deno_graph, which has the JSR change to use "exports".
It's not yet useful atm, so I've made this PR a fix about the deno doc
--lint error message improvements. I'll do a follow-up PR that adds
exports to the deno.json
2023-11-17 11:27:51 +09:00
Matt Mastracci
276e4125fc
perf(cli): strace mode for ops (undocumented) (#21131)
Example usage:

```
# Trace every op except op_*tick*
cargo run -- run --unstable -A --strace-ops=-tick '/Users/matt/Documents/github/deno/deno/ext/websocket/autobahn/autobahn_server.js

# Trace any op matching op_*http*
cargo run -- run --unstable -A --strace-ops=http ...
```

Example output:

```
[    11.478] op_ws_get_buffer                        : Dispatched Slow
[    11.478] op_ws_get_buffer                        : Completed Slow
[    11.478] op_ws_send_binary                       : Dispatched Fast
[    11.478] op_ws_send_binary                       : Completed Fast
[    11.478] op_ws_next_event                        : Dispatched Async
[    11.478] op_try_close                            : Dispatched Fast
[    11.478] op_try_close                            : Completed Fast
[    11.478] op_timer_handle                         : Dispatched Fast
[    11.478] op_timer_handle                         : Completed Fast
[    11.478] op_sleep                                : Dispatched Asyn
```
2023-11-17 11:27:40 +09:00
Divy Srivastava
862edad5ae
chore: use internal namespace in 40_testing.js (#21141)
Towards #21136 

- [x] assign serializePermissions, setTimeout and setExitHandler APIs to
internal namespace
- [x] remove usage of assert
2023-11-17 11:27:30 +09:00
Divy Srivastava
c38f84387a
chore: remove primordial usage from 40_testing.js (#21140)
Towards #21136
2023-11-17 11:27:16 +09:00
Divy Srivastava
0e7ad0388b
1.38.1 (#21143)
Co-authored-by: littledivy <littledivy@users.noreply.github.com>
2023-11-10 17:16:23 +05:30
Igor Zinkovsky
f4305433dc
fix(test) reduce queue persistence test time from 60 secs to 6 secs (#21142)
This PR reduces the time to run `queue persistence with inflight
messages` test from 60 seconds down to about 6 seconds.

The test simulates a crash to ensure that inflight messages are cleaned
up and re-queued when the new process starts. Since messages are
considered dead after 5 seconds of being queued, reopening the db within
5 seconds does not re-queue the messages on startup (they do get
re-queued after 60 seconds, which is the cleanup frequency). By waiting
for 5 seconds before reopening the db, the test ensures that the cleanup
happens quickly when the db is opened.
2023-11-10 11:28:38 +01:00
Bartek Iwańczuk
612b7dfcc7
fix(node/child_process): properly normalize stdio for 'spawnSync' (#21103)
Closes https://github.com/denoland/deno/issues/20782
2023-11-10 05:59:39 +00:00
Matt Mastracci
9010b8df53
perf: remove knowledge of promise IDs from deno (#21132)
We can move all promise ID knowledge to deno_core, allowing us to better
experiment with promise implementation in deno_core.

`{un,}refOpPromise(promise)` is equivalent to
`{un,}refOp(promise[promiseIdSymbol])`
2023-11-09 13:57:26 -07:00
Divy Srivastava
c4029f6af2
fix(node): implement createPrivateKey (#20981)
Towards #18455
2023-11-09 23:26:59 +05:30
btoo
09dc5f36d9
fix small Deno.createHttpClient typo in lib.deno.unstable.d.ts (#21115) 2023-11-08 19:34:57 -07:00
Matt Mastracci
02c5f49a7a
chore: refactor test_server and move to rustls-tokio-stream (#21117)
Remove tokio-rustls as a direct dependency of Deno and refactor
test_server to reduce code duplication.

All tcp and tls listener paths go through the same streams now, with the
exception of the simpler Hyper http-only handlers (those can be done in
a later follow-up).

Minor bugs fixed:
 - gRPC server should only serve h2
 - WebSocket over http/2 had a port overlap
- Restored missing eye-catchers for some servers (still missing on Hyper
ones)
2023-11-08 13:00:29 -07:00
Aravind
e4593873a9
fix(ext/http): Throwing Error if the return value of Deno.serve handler is not a Response class (#21099)
---------

Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-11-07 15:52:44 -07:00
David Sherret
7978bc5d1b
fix(node): cjs export analysis should probe for json files (#21113)
Closes #21064
2023-11-07 16:38:55 -05:00
David Sherret
9201198efd
fix(node): inspect ancestor directories when resolving cjs re-exports during analysis (#21104)
If a CJS re-export can't be resolved, it will check the ancestor
directories, which is more similar to what `require` does at runtime.
2023-11-07 09:56:06 -05:00
Matt Mastracci
50e4806a2d
chore: bump deno_core (#21102) 2023-11-07 01:03:48 +00:00
Luca Casonato
777c142d39
docs: improve some JSDoc (#20841)
Minor improvements to the documentation for https://deno.com/api
2023-11-07 00:35:22 +00:00
Gasman
837c870ff4
fix(node/http): socket.setTimeout (#20930)
Fixes #20923
2023-11-07 00:51:14 +01:00
Kenta Moriuchi
90189dd997
fix(ext): use String#toWellFormed in ext/webidl and ext/node (#21054)
Fixes #18802 

This PR adds `util.toUSVString` to node:util:

```js
import util from "node:util";
util.toUSVString("string\ud801"); // => "string\ufffd"
```
2023-11-06 22:18:28 +01:00
David Sherret
7eb34c7a36
fix(byonm): correct resolution for scoped packages (#21083) 2023-11-06 08:35:26 -05:00
Bartek Iwańczuk
fdb4953ea4
refactor: unify CDP types in a single module (#21094)
This commit moves all Chrome Devtools Protocol messages to `cli/cdp.rs`
and refactors all places using these types to pull them from a common
place.

No functional changes.
2023-11-05 22:58:59 +00:00
Jesse Jackson
68a964346d
fix(core/types): Promise.withResolvers: Unmark callback param as optional (#21085)
See discussion on merged commit:
1d19b1011b (r131604700)

Signed-off-by: Jesse Jackson <jsejcksn@users.noreply.github.com>
2023-11-05 23:40:56 +01:00
Matt Mastracci
485fade0b6
chore: migrate to new deno_core and metrics (#21057)
- Uses the new OpMetrics system for sync and async calls
- Partial revert of #21048 as we moved Array.fromAsync upstream to
deno_core
2023-11-05 14:27:36 -07:00
Igor Zinkovsky
1097de3e1d
fix(cron): update Deno.cron doc example (#21078)
Signed-off-by: Igor Zinkovsky <igor@deno.com>
2023-11-04 14:04:13 -07:00
David Sherret
e4c947dd2b
fix(node): use closest package.json to resolve package.json imports (#21075) 2023-11-04 16:41:51 +00:00
Divy Srivastava
0b75a7169b
perf: lazy atexit setup (#21053)
`libc::atexit` incurrs 2% dyld cost at startup on macOS. This PR moves
the setup to when the tty mode is changed using op_stdin_set_raw.
2023-11-04 17:30:12 +05:30
David Sherret
8acf059ac6
fix(doc): deno doc --lint mod.ts should output how many files checked (#21084)
As pointed out in https://github.com/denoland/deno/issues/21067 , it's
confusing that `deno doc --lint mod.ts` outputs the documentation to
stdout on success. Instead, it would be better if it outputted how many
files were checked similar to what `deno lint` does on success. It still
outputs the documentation if `--lint` or `--html` are provided so this
is non-breaking.
2023-11-04 04:43:54 +00:00
Bartek Iwańczuk
ee1e9a6434
fix(doc): require source files if --html or --lint used (#21072)
Fixes https://github.com/denoland/deno/issues/21067
Fixes https://github.com/denoland/deno/issues/21070
2023-11-03 17:06:18 +00:00
Matt Mastracci
76fbe85264
chore: finish indexmap1 removal from deno (#21060)
We still pull the dep in from a few other places, but we can let those
get fixed over time.
2023-11-02 16:55:37 -06:00
Bartek Iwańczuk
621440017a
chore: Add 'jupyter' category for Deno.jupyter APIs (#21061) 2023-11-02 22:43:02 +00:00