0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-08 07:16:56 -05:00
Commit graph

11198 commits

Author SHA1 Message Date
Nayeem Rahman
691258908d
refactor(lsp): use fallback resolution in op_resolve() (#23329) 2024-04-16 01:24:39 +02:00
David Sherret
64d3b1fc00
perf: do not clone swc Program when transpiling (#23365) 2024-04-16 01:24:38 +02:00
David Sherret
832492188c
fix(publish): do not error for param with initializer before required parameter (#23356)
* https://github.com/denoland/deno_graph/pull/440

Closes https://github.com/denoland/deno/issues/23331
2024-04-16 01:24:38 +02:00
Divy Srivastava
4e022e85b3
fix(ext/node): use ext/io stdio in WriteStream (#23354)
This is the same issue as https://github.com/denoland/deno/pull/23044
but in `WriteStream`.

Adding a docusarus test in npm_smoke_tests repo.
2024-04-16 01:24:38 +02:00
Divy Srivastava
80695e6391
fix(ext/node): promise rejection in VM contexts (#23305)
Fixes https://github.com/denoland/deno/issues/23297

`docusaurus build` works!

```
$ deno run -A repro.js 
fish: Job 1, 'deno run -A ../../littledivy/fs…' terminated by signal SIGSEGV (Address
 boundary error)
$ denod run -A repro.js
error: Uncaught (in promise) Error: rejected
```

Depends on https://github.com/denoland/deno_core/pull/693
2024-04-16 01:24:38 +02:00
David Sherret
4cb679bb09
fix(publish): handle definite assignment on ts private properties (#23345) 2024-04-16 01:24:38 +02:00
Nathan Whitaker
f819d4719c
perf(lsp): Only deserialize response from op_respond once (#23349)
Previously we were deserializing it twice - once to `serde_json::Value`,
and then again from the `serde_json::Value` to a concrete type
2024-04-16 01:24:38 +02:00
David Sherret
aa11858372
chore(test): use file_test_runner for spec tests (#23348)
Extracted out this code to https://github.com/denoland/file_test_runner
and added parallelism. This makes these tests run 6 seconds faster on my
machine and allows re-using this code in other crates like deno_graph,
deno_doc, etc (ex. https://github.com/denoland/deno_graph/pull/437).
2024-04-16 01:24:10 +02:00
Divy Srivastava
508a362c66
chore: upgrade deno_core to 0.274.0 (#23344)
Signed-off-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-04-16 01:24:10 +02:00
Matt Mastracci
11756b4a50
chore: fix nightly builds (#23328)
- Bump `curve25519-dalek` to fix unstable features
 - Bump to llvm-17 to match latest minimum
 - cargo update to fix all the things that break w/llvm-17
2024-04-16 01:24:10 +02:00
youngwendy
5efbca8808
chore: remove repetitive words (#23341)
Signed-off-by: youngwendy <clonefetch@outlook.com>
2024-04-16 01:24:10 +02:00
Luca Casonato
d6aa1026c2
chore: update deno_graph (#23340) 2024-04-16 01:24:09 +02:00
Bartek Iwańczuk
7d97413079
test(compile): dynamic JSR imports are working correctly (#23306)
Adds a test that ensure that dynamic import from JSR are working
correctly for `deno compile`.
2024-04-16 01:24:09 +02:00
denobot
a64a257024
1.42.3 (#23333)
Bumped versions for 1.42.3

Co-authored-by: bartlomieju <bartlomieju@users.noreply.github.com>
2024-04-12 02:54:12 +02:00
David Sherret
3f7f931716
fix(publish): do not warn about excluded external modules in node_modules directory (#23173) 2024-04-12 02:08:32 +02:00
Bartek Iwańczuk
e5828a9585
fix(inspector): don't panic if port is not free (#22745)
Closes https://github.com/denoland/deno/issues/22113
Closes https://github.com/denoland/deno/issues/23177
Closes https://github.com/denoland/deno/issues/22883
Closes https://github.com/denoland/deno/issues/22377
2024-04-12 02:08:32 +02:00
David Sherret
a5dab06aaf
fix: upgrade deno_ast related crates (#23187)
Had to revert back swc due to
https://github.com/swc-project/swc/issues/8840

Fixes:

- https://github.com/denoland/deno_lint/pull/1262
- https://github.com/denoland/deno_doc/pull/538
- https://github.com/denoland/deno_doc/pull/537
- https://github.com/denoland/deno_graph/pull/430
- https://github.com/denoland/deno_graph/pull/425
- https://github.com/denoland/deno_graph/pull/432
2024-04-12 02:08:32 +02:00
Nayeem Rahman
26bf808c56
perf(lsp): use a stub module in tsc for failed resolutions (#23313) 2024-04-12 02:08:31 +02:00
Bartek Iwańczuk
e9cf8ffc26
Revert "refactor(ext/net): extract TLS key and certificate from inter… (#23325)
…faces (#23296)"

This reverts commit e190acbfa8.

Reverting because it broke stable API type declarations. We will reland
it for v1.43 with updated interfaces
2024-04-12 02:08:31 +02:00
Nathan Whitaker
68c6d06e38
fix(lsp): Denormalize specifiers before calling $projectChanged (#23322)
Fixes the regression described in
https://github.com/denoland/deno/pull/23293#issuecomment-2049819724.
This affected jupyter notebooks, as the LSP was passing in already
denormalized specifiers, while the jupyter kernel was not. We need to
denormalize the specifiers to evict the proper keys from our caches.
2024-04-12 02:08:31 +02:00
David Sherret
734e84badc
fix(npm): local nodeModulesDir was sometimes resolving duplicates of same package (#23320) 2024-04-12 02:08:31 +02:00
Bartek Iwańczuk
0c3cbe14ac
chore: update release doc template (#23299)
Adjusts release doc template to changes made by @crowlKats in
`apiland_scripts`.
2024-04-12 02:08:31 +02:00
denobot
04c0a4cbf7
1.42.2 (#23314)
Co-authored-by: Satya Rohith <me@satyarohith.com>
2024-04-11 12:09:03 +05:30
Nayeem Rahman
9e6e25529b
perf(lsp): replace document registry source cache on update (#23311) 2024-04-11 10:31:52 +05:30
Nathan Whitaker
be9c36cf6c
perf(lsp): Only evict caches on JS side when things actually change (#23293)
Currently we evict a lot of the caches on the JS side of things on every
request, namely script versions, script file names, and compiler
settings (as of #23283, it's not quite every request but it's still
unnecessarily often).

This PR reports changes to the JS side, so that it can evict exactly the
caches that it needs too. We might want to do some batching in the
future so as not to do 1 request per change.
2024-04-11 10:31:52 +05:30
林炳权
e2a817d11c
chore: update to Rust 1.77.2 (#23262)
update to Rust 1.77.2


---------

Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2024-04-11 10:31:52 +05:30
Asher Gomez
0cc0cd0bbc
chore: update references to deno_std to use JSR (#23239)
There are more uses of `deno.land/std` in the codebase, but for URL
parsing purposes rather than network calls or documentation.
2024-04-11 10:31:52 +05:30
Nayeem Rahman
b8ac027ff4
refactor(lsp): cleanup documents dependents calculation (#23295) 2024-04-11 10:31:52 +05:30
Asher Gomez
8cd97bc845
fix(ext/fs): account for all ops in leak checks (#23300)
This is PR a smaller retry of #23066 that simply ensures all async
`ext/fs` ops are accounted for if left hanging in tests. This also sorts
the `OP_DETAILS` in alphabetical order for easy future reading.

When reviewing, it might be best to look at the commits in order for
better understanding.
2024-04-11 10:31:52 +05:30
Matt Mastracci
c169a8f127
refactor(ext/net): extract TLS key and certificate from interfaces (#23296)
Removes the certificate options from all the interfaces and replaces
them with a new `TlsCertifiedKeyOptions`. This allows us to centralize
the documentation for TLS key management for both client and server, and
will allow us to add key object support in the future.

Also adds an option `keyFormat` field to the cert/key that must be
omitted or set to `pem`. This will allow us to load other format keys in
the future `der`, `pfx`, etc.

In a future PR, we will add a way to load a certified key object, and we
will add another option to `TlsCertifiedKeyOptions` like so:

```ts
export interface TlsCertifiedKeyOptions =
    | TlsCertifiedKeyPem
    | TlsCertifiedKeyFromFile
    | TlsCertifiedKeyConnectTls
    | { key: Deno.CertifiedKey }
```
2024-04-11 10:31:52 +05:30
Nathan Whitaker
9056fdeda2
perf(lsp): More granular locking of FileSystemDocuments (#23291)
Previously we locked the entire `FileSystemDocuments` even for lookups,
causing contention. This was particularly bad because some of the hot
ops (namely `op_resolve`) can end up hitting that lock under contention.

This PR replaces the mutex with synchronization internal to
`FileSystemDocuments` (an `AtomicBool` for the dirty flag, and then a
`DashMap` for the actual documents).

I need to think a bit more about whether or not this introduces any
problematic race conditions.
2024-04-11 10:31:51 +05:30
Carlos Precioso
ba72b3bc63
docs: Fix typo "discreet" to "discrete" (#23290)
Changes `discreet` in the documentation for `discrete`

"Discreet" means careful to avoid being noticed, "discrete" means
separate parts, and is what the documentation refers to.
2024-04-11 10:31:51 +05:30
Satya Rohith
7ef10564d5
fix(ext/node): implement MessagePort.unref() (#23278)
Closes https://github.com/denoland/deno/issues/23252
Closes https://github.com/denoland/deno/issues/23264
2024-04-11 10:31:51 +05:30
Divy Srivastava
51f77463d0
fix(ext/node): node:vm contexts (#23202)
Implement contextified objects in `node:vm`

Fixes https://github.com/denoland/deno/issues/23186
Fixes https://github.com/denoland/deno/issues/22395
Fixes https://github.com/denoland/deno/issues/20607
Fixes https://github.com/denoland/deno/issues/18299
Fixes https://github.com/denoland/deno/issues/19395
Fixes https://github.com/denoland/deno/issues/18315
Fixes https://github.com/denoland/deno/issues/18319
Fixes https://github.com/denoland/deno/issues/23183
2024-04-11 10:31:51 +05:30
Asher Gomez
4ad011e829
chore: update h2 crate (#23272)
Prerequisite #23273.
2024-04-11 10:31:51 +05:30
Matt Mastracci
a91bf052c1
feat(ext/net): Refactor TCP socket listeners for future clustering mode (#23037)
Changes:

- Implements a TCP socket listener that will allow for round-robin
load-balancing in-process.
 - Cleans up the raw networking code to make it easier to work with.
2024-04-11 10:31:51 +05:30
Asher Gomez
95e78a96b1
refactor: use chrono::DateTime::from_timestamp (#23273)
`chrono::NaiveDateTime::from_timestamp_opt()` was deprecated in
https://github.com/chronotope/chrono/pull/1473.

Prerequisite for #23272.
2024-04-11 10:31:51 +05:30
Nayeem Rahman
37d81841b4
perf(lsp): cache ts config in isolate until new project version (#23283) 2024-04-11 10:31:51 +05:30
Bartek Iwańczuk
c8086a29a3
fix(ext/http): Make Deno.serveHttp() work when proxying (#23269)
Closes https://github.com/denoland/deno/issues/21900
2024-04-11 10:31:51 +05:30
Matt Mastracci
377573c6bc
refactor(ext/tls): use cppgc to deduplicate the tls key loading code (#23289)
Pass the certificates and key files as CPPGC objects.

Towards #23233
2024-04-11 10:31:51 +05:30
Asher Gomez
ce6d54db5d
chore: update deprecation notices of APIs to be soft-removed (#23076) 2024-04-11 10:31:51 +05:30
Bartek Iwańczuk
cbfd987ce4
test: use unordered assertion for node worker test (#23288)
This ordering of events is important here, but it's very hard to get
right.

In the meantime to avoid flakes I'm adding an unordered assertion.
2024-04-11 10:31:51 +05:30
Asher Gomez
a5ca3bc74f
chore: update WPT (#23111)
Should fix some of the current issues with the `wpt_epoch` workflow.

See
https://github.com/denoland/deno/actions/runs/8460701853/job/23179358486

---------

Co-authored-by: crowlkats <crowlkats@toaxl.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-04-11 10:31:51 +05:30
Nayeem Rahman
41f0616471
perf(lsp): don't pass remote modules as tsc roots (#23259) 2024-04-11 10:31:51 +05:30
Nayeem Rahman
de05a9b633
Revert "perf(lsp): Don't retain SourceFileObjects in sourceFileCache longer than necessary (#23258)" (#23285) 2024-04-11 10:31:51 +05:30
MAKS11060
5a830becaf
fix(ext/tls): add support EC private key (#23261)
Deno works with the `EC` key, but cannot recognize it.
This code works correctly if the prefix 'EC' is removed.

```typescript
const cert = `-----BEGIN CERTIFICATE-----
MIICqjCCAZKgAwIBAgIULvZQk8us6eYdpKZraHVkW8YKL/IwDQYJKoZIhvcNAQEL
BQAwJzELMAkGA1UEBhMCVVMxGDAWBgNVBAMMD0V4YW1wbGUtUm9vdC1DQTAgFw0y
NDA0MDYwNzM4MDlaGA8yMTIzMDMxNDA3MzgwOVowbTELMAkGA1UEBhMCVVMxEjAQ
BgNVBAgMCVlvdXJTdGF0ZTERMA8GA1UEBwwIWW91ckNpdHkxHTAbBgNVBAoMFEV4
YW1wbGUtQ2VydGlmaWNhdGVzMRgwFgYDVQQDDA9sb2NhbGhvc3QubG9jYWwwWTAT
BgcqhkjOPQIBBggqhkjOPQMBBwNCAATWOALcgzz4LbNikhjVGpkOCUmR8NahjfFw
9pNBuyZnaTcjfeGfiPaV0iQqvTuQnmL+fTBw8PKxzlKGpzsodQaWo1EwTzAfBgNV
HSMEGDAWgBTzut+pwwDfqmMYcI9KNWRDhxcIpTAJBgNVHRMEAjAAMAsGA1UdDwQE
AwIE8DAUBgNVHREEDTALgglsb2NhbGhvc3QwDQYJKoZIhvcNAQELBQADggEBABWp
5LsGj5mWGIy7XpksXb0k2e3fUh+CobNl4JbvE7em68nuyojm0+/vEs8Bpd9vJaUo
tU1btyTO8xUlOGeyNa9Ddd2gj3oB8IGMjxhazWTSDseZ/WqBt6OudPMmnj+jPRQL
8Hb0vyXfmabZnWO9WH9/tcCoGdUdKo2KYN/7M2ojSeRq/4BIL08lC2SVX8DlBG40
8aj3FJo9xsUG59NI31iXVN1UPEN2pakKRJdSVdpbBjxDaEoLw/TB02gqfA43T1fU
wKz+0UYxSCjeW0lOZ3wlaNN2KqiHLuQ6ePG5kqD8aRufmYWK/ImlO/ZiSX60GiPu
K1cC6aWEohOhx+k424Y=
-----END CERTIFICATE-----`
const key = `-----BEGIN EC PRIVATE KEY-----
MHcCAQEEILL8H0x2ZP/ZZ+CwmKLS/zRleO7k7NBgWH0P767zYvlVoAoGCCqGSM49
AwEHoUQDQgAE1jgC3IM8+C2zYpIY1RqZDglJkfDWoY3xcPaTQbsmZ2k3I33hn4j2
ldIkKr07kJ5i/n0wcPDysc5Shqc7KHUGlg==
-----END EC PRIVATE KEY-----`

const config: Deno.ServeTlsOptions = {
  cert,
  // key, // not working // error: Uncaught (in promise) InvalidData: No keys found in key file
  key: key.replaceAll(' EC', ''), // remove ' EC'. it works
}

Deno.serve(config, (r) => Response.json('ok'))
```
2024-04-11 10:31:51 +05:30
Yoshiya Hinosawa
217c82ea7c
fix(ext/node): out-of-order writes of fs.createWriteStream (#23244)
This PR follows this fix (https://github.com/nodejs/node/pull/52005) in
Node.js.

Stream's construct callback happens one tick earlier by this change, and
it prevents the reordering of the first few chunks in
`node:stream.Writable`

closes #20284
2024-04-11 10:31:50 +05:30
Asher Gomez
255411eb8f
FUTURE(ext/net): remove Deno.(Conn|TlsConn|Listener|TlsListener|UnixConn).prototype.rid (#23219)
Towards #23089

---------

Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-04-11 10:31:50 +05:30
Asher Gomez
f05b02978a
FUTURE(ext/fs): remove Deno.FsWatcher.prototype.rid (#23234) 2024-04-11 10:31:50 +05:30
Asher Gomez
add191d93d
FUTURE(ext/fs): make Deno.FsFile constructor illegal (#23235)
I'm unsure whether we're planning to make the `Deno.FsFile` constructor
illegal or remove `FsFile` from the `Deno.*` namspace in Deno 2. Either
way, this PR works towards the former. I'll create a superceding PR if
the latter is planned instead.

Towards #23089
2024-04-11 10:31:50 +05:30