Fixes https://github.com/denoland/deno/issues/24864
Need to add some tests, also unsure about the right counter size (went
with 128 bit to be safe)
---------
Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
This PR resolves 2 issues of Socket class of node compat (both are
related to playwright)
Currently `browser.launch()` of playwright is not working.
`browser.launch` opens PipeTransport (which is based on Pipe/IPC socket)
with the browser process. But that pipe doesn't start reading the data
because of the workaround #27662 (which pauses the socket at the
beginning if it's from playwright-core). This PR fixes this issue by
checking whether the given handle is `ipc` handle or not.
Another issue is that sock-init-workaround for TLS connection stopped
working at #27707 because of the changes of TLS socket initialization
steps. This change fixes the issue by correctly returning the function
in workaround path.
The added case `specs::npm::playwright_compat` checks both fixes with
actual playwright and playwright-core packages.
`browser.launch` issues
closes #16899
closes #27623
`https.request` issue
closes #27658
Extracted out of https://github.com/denoland/deno/pull/27838/files
Reduces some allocations by accepting either a pathbuf or url for the
referrer for resolution and returning either a pathbuf or url at the
end, which the caller can then convert into to their preferred state.
This is about 4% faster when still converting the final result to a url
and 6% faster when keeping the result as a path in a benchmark I ran.
This PR updates `deno_lint` which contains a couple of bug fixes for
JSX/React related rules. The react rules now have all a `react-*` prefix
in the name as well.
This commit changes "Deno.cwd()" (as well as "process.cwd()") to no
longer require full "--allow-read" permission. This change was meant to be done
in Deno 2.0.0, but somehow it slipped. Requiring full read permission
just to read the CWD is a mistake, because CWD can already be obtained
with no permission by throwing an error in JS and inspecting its stack.
Fixes https://github.com/denoland/deno/issues/27110
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
This commit adds a simple HashMap cache to completion requests.
On a test project the time to compute completions went from 1200ms
to 75ms and the cache contained ~300 entries when 8000 completion
items were produced by the TSC.
This is a short-lived cache and is discarded once the completion
request is finished. In a follow up commits we could make it persist
between requests.
This commit refactors how a snapshot is created for the TypeScript
compiler.
Instead of having 4 ops, only a single op ("op_load") is left. This is
achieved by not creating a "ts.Program" during snapshotting, that during
benchmarking doesn't provide much benefit.
This greatly simplifies build script for the TS snapshot and opens up
way to simplify it even further in follow up PRs.
Allows easily constructing a `DenoResolver` using the exact same logic
that we use in the CLI (useful for dnt and for external bundlers). This
code is then used in the CLI to ensure the logic is always up-to-date.
```rs
use std::rc::Rc;
use deno_resolver:🏭:ResolverFactory;
use deno_resolver:🏭:WorkspaceFactory;
use sys_traits::impls::RealSys;
let sys = RealSys;
let cwd = sys.env_current_dir()?;
let workspace_factory = Rc::new(WorkspaceFactory::new(sys, cwd, Default::default()));
let resolver_factory = ResolverFactory::new(workspace_factory.clone(), Default::default());
let deno_resolver = resolver_factory.deno_resolver().await?;
```
This is a pure refactor, the `99_main_compiler.js` file
was getting out of hand, being over 1500 lines and serving
3 distinct purposes:
- snapshotting
- type-checking
- running LSP
The file was split into:
- 97_ts_host.js
- 98_lsp.js
- 99_main_compiler.js
This commit changes how `deno lint --rules` behaves:
1. All available rules are now printed and rules enabled are marked as
such
2. `deno lint --rules --json` doesn't include markdown documentation
for rules but rather a link to the docs. This should allow us to save
around 400kB of the final `deno` binary size
Support HTTPS protocol for otel exporting. Includes support for
`OTEL_EXPORTER_OTLP_CERTIFICATE`, `OTEL_EXPORTER_OTLP_CLIENT_KEY`, and
`OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE`
Fixes: https://github.com/denoland/deno/issues/27703
This is the release commit being forwarded back to main for 2.1.7
Please ensure:
- [x] Everything looks ok in the PR
- [x] The release has been published
To make edits to this PR:
```shell
git fetch upstream forward_v2.1.7 && git checkout -b forward_v2.1.7 upstream/forward_v2.1.7
```
Don't need this PR? Close it.
cc @crowlKats
---------
Co-authored-by: crowlKats <crowlKats@users.noreply.github.com>
Co-authored-by: crowlkats <crowlkats@toaxl.com>