Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.43.6 #23931

Closed
wants to merge 76 commits into from
Closed

1.43.6 #23931

wants to merge 76 commits into from

Conversation

denobot
Copy link
Collaborator

@denobot denobot commented May 21, 2024

Bumped versions for 1.43.6

Please ensure:

  • Target branch is correct (vX.XX if a patch release, main if minor)
  • Crate versions are bumped correctly
  • Releases.md is updated correctly (think relevancy and remove reverts)

To make edits to this PR:

git fetch upstream release_1_43.6 && git checkout -b release_1_43.6 upstream/release_1_43.6

cc @bartlomieju

denobot and others added 30 commits May 9, 2024 00:45
**THIS PR HAS GIT CONFLICTS THAT MUST BE RESOLVED**

This is the release commit being forwarded back to main for 1.43.2

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_v1.43.2 && git checkout -b forward_v1.43.2 upstream/forward_v1.43.2
```

Don't need this PR? Close it.

cc @nathanwhit

Co-authored-by: nathanwhit <nathanwhit@users.noreply.github.com>
Co-authored-by: Nathan Whitaker <nathan@deno.com>
1. Generally we should prefer to use the `log` crate.
2. I very often accidentally commit `eprintln`s.

When we should use `println` or `eprintln`, it's not too bad to be a bit
more verbose and ignore the lint rule.
Moves sloppy import resolution from the loader to the resolver.

Also adds some test helper functions to make the lsp tests less verbose

---------

Co-authored-by: David Sherret <dsherret@gmail.com>
…port (#23686)

Precursor to #23236 

This implements the SNI features, but uses private symbols to avoid
exposing the functionality at this time. Note that to properly test this
feature, we need to add a way for `connectTls` to specify a hostname.
This is something that should be pushed into that API at a later time as
well.

```ts
Deno.test(
  { permissions: { net: true, read: true } },
  async function listenResolver() {
    let sniRequests = [];
    const listener = Deno.listenTls({
      hostname: "localhost",
      port: 0,
      [resolverSymbol]: (sni: string) => {
        sniRequests.push(sni);
        return {
          cert,
          key,
        };
      },
    });

    {
      const conn = await Deno.connectTls({
        hostname: "localhost",
        [serverNameSymbol]: "server-1",
        port: listener.addr.port,
      });
      const [_handshake, serverConn] = await Promise.all([
        conn.handshake(),
        listener.accept(),
      ]);
      conn.close();
      serverConn.close();
    }

    {
      const conn = await Deno.connectTls({
        hostname: "localhost",
        [serverNameSymbol]: "server-2",
        port: listener.addr.port,
      });
      const [_handshake, serverConn] = await Promise.all([
        conn.handshake(),
        listener.accept(),
      ]);
      conn.close();
      serverConn.close();
    }

    assertEquals(sniRequests, ["server-1", "server-2"]);
    listener.close();
  },
);
```

---------

Signed-off-by: Matt Mastracci <matthew@mastracci.com>
This removes the need for using `Deno.resources` to close the gpuadapter
resource, while being more spec compliant.
`deno run script.ts <(some command)` is a valid use case -- let's allow
this to work without `--allow-all`.

Fixes #23703
Co-authored-by: David Sherret <dsherret@gmail.com>
Fixes #23761

Co-authored-by: Satya Rohith <me@satyarohith.com>
This PR directly addresses the issue raised in #23282 where Deno panics
if `deno coverage` is called with `--include` regex that returns no
matches.

I've opted not to change the return value of `collect_summary` for
simplicity and return an empty `HashMap` instead
…hod (#23642)

See whatwg/webidl#1387 for context.

There are new WPT tests for this change in
web-platform-tests/wpt#44456. They pass on my
local machine, but I'm not sure if I should update the WPT submodule for
all of Deno as part of this PR?

Fixes #22389

---------

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.
Junction symlink support is added in #22762, but `SymlinkOptions` and
its documents are not updated.
1. Extracts to a directory beside the destination.
2. Renames to the destination with retries.
https://github.com/denoland/deno/actions/runs/9084225162/job/24964698935

```
---- run::file_fetcher_preserves_permissions stdout ----
command /Users/runner/work/deno/deno/target/debug/deno repl --quiet
command cwd /Users/runner/work/deno/deno/tests/testdata
------ Start Full Text ------
"const a = await import('http://localhost:4545/run/019_media_types.ts');\r\n"
------- End Full Text -------
Next text: "\r\n"
thread 'run::file_fetcher_preserves_permissions' panicked at tests/integration/run_tests.rs:4615:15:
Timed out.
```

Closes #23690
Closes #23682
Closes #23625
…ed (#23813)

This also fixes a bug where Deno would output to stderr with colours
when piped and stdout was not piped.
marvinhagemeister and others added 26 commits May 17, 2024 18:05
Fixes #23651

Co-authored-by: Satya Rohith <me@satyarohith.com>
Popular test runners like Jest instantiate a new `Process` object
themselves and expect the class constructor to be callable without the
`new` keyword. This PR refactors our `Process` class implementation from
a proper ES2015 class to an ES5-style class which can be invoked both
with and without the `new` keyword like in Node.

Fixes #23863
Co-authored-by: David Sherret <dsherret@gmail.com>
the last commit had a regression, where it removed this branch, I
haven't tested the code but I think it should work

---------

Signed-off-by: Bedis Nbiba <bedisnbiba@gmail.com>
Our `MessagePort` to Node's `MessagePort` conversion logic was missing
the case where a `MessagePort` is sent _inside_ the message. This broke
`tinypool` which is used by `vitest` as it relies on some node specific
methods on `MessagePort`.

Fixes #23854 , Fixes
#23871
Some npm libraries like `signal-exit` rely on the length of the listener
array returned by `process.listeners("SIGNT")` to be correct to
function. We weren't tracking `SIG*` events there, which broke those npm
libraries.

Fixes #22892
This stubs `findSourceMap` in `node:module` by always returning
`undefined` as if it never found a source map. This unblocks the `ava`
test runner.

Fixes #18666
#23838 might accidentally disable
import assertions support because of V8 12.6 unshipping it, but we want
import assertions to be supported until Deno 2.
The cwd lookup was taking 2% of a flamegraph I was looking at.
Because the buffers are `MaybeUninit<V8Slice<u8>`, and the owner of the
`BoundedBufferChannel` is not obligated to read each and every bit of
data, we may find that some buffers were not automatically dropped if
unread by the time the `BoundedBufferChannelInner` is dropped.

Possible repro:

```
Deno.serve(() => new Response(new ReadableStream({ start(controller) { controller.enqueue(new Uint8Array(100_000_000))  } })));
```

```bash
while true; do curl localhost:8000 | dd count=1; done
```
…y paths (#23826)

This brings in [`runtimelib`](https://github.com/runtimed/runtimed) to
use:

## Fully typed structs for Jupyter Messages

```rust
let msg = connection.read().await?;

self
  .send_iopub(
    runtimelib::Status::busy().as_child_of(msg),
  )
  .await?;
```

## Jupyter paths

Jupyter paths are implemented in Rust, allowing the Deno kernel to be
installed completely via Deno without a requirement on Python or
Jupyter. Deno users will be able to install and use the kernel with just
VS Code or other editors that support Jupyter.

```rust
pub fn status() -> Result<(), AnyError> {
  let user_data_dir = user_data_dir()?;

  let kernel_spec_dir_path = user_data_dir.join("kernels").join("deno");
  let kernel_spec_path = kernel_spec_dir_path.join("kernel.json");

  if kernel_spec_path.exists() {
    log::info!("✅ Deno kernel already installed");
    Ok(())
  } else {
    log::warn!("ℹ️ Deno kernel is not yet installed, run `deno jupyter --install` to set it up");
    Ok(())
  }
}
```

Closes #21619
We were wrapping the display string in an unnecessary pair of triple
backticks, breaking highlighting

Before:
![Screenshot 2024-05-21 at 12 16
12 PM](https://github.com/denoland/deno/assets/17734409/1cf5a3ce-56dd-443d-9d1a-bd33625ff1f2)

After:
![Screenshot 2024-05-21 at 12 16
36 PM](https://github.com/denoland/deno/assets/17734409/646c4c48-9b5a-4326-bb95-b1374627d969)
@bartlomieju bartlomieju marked this pull request as ready for review May 21, 2024 21:54
@bartlomieju bartlomieju changed the base branch from main to v1.43 May 21, 2024 22:08
@bartlomieju bartlomieju deleted the release_1_43.6 branch May 21, 2024 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet