Right now, if one of the linters fails, the all other ones continue
running in the background. This fixes this by waiting until all linters
are done before settling.
Running `tools/wpt.ts` with a filter would cause an error if there were
extra, leftover expectations in expectations.json. These errors would
not appear if no filter was passed, often leaving the filtered version
of the test runner broken.
This also introduces a smarter bit of logic where filters can be
specified with a leading slash (`tools/wpt.ts run -- /url` is equivalent
to `tools/wpt.ts run -- url`)
Makes the prebuilt installation a bit more reliable:
- Check for 200
- Check for an executable header (MZ, ELF, etc)
- Download to a .temp file until we're certain the file is valid
- If multiple requests for a tool are made, only run one task
This PR ensures that the original signal event is fired before any
dependent signal events.
---
The enabled tests fail on `main`:
```
assert_array_equals: Abort events fired in correct order expected property 0 to be
"original-aborted" but got "clone-aborted" (expected array ["original-aborted", "clone-aborted"]
got ["clone-aborted", "original-aborted"])
```
This PR exposes garbage collector for WPT
see:
3d80f7e879/common/gc.js (L34-L36)
```
/streams/readable-streams/garbage-collection.any.html
test stderr:
Tests are running without the ability to do manual garbage collection. They will still work, but coverage will be suboptimal.
Tests are running without the ability to do manual garbage collection. They will still work, but coverage will be suboptimal.
Tests are running without the ability to do manual garbage collection. They will still work, but coverage will be suboptimal.
Tests are running without the ability to do manual garbage collection. They will still work, but coverage will be suboptimal.
file result: ok. 4 passed; 0 failed; 0 expected failure; total 4 (255ms)
----------------------------------------
/streams/readable-streams/garbage-collection.any.worker.html
test stderr:
Tests are running without the ability to do manual garbage collection. They will still work, but coverage will be suboptimal.
Tests are running without the ability to do manual garbage collection. They will still work, but coverage will be suboptimal.
Tests are running without the ability to do manual garbage collection. They will still work, but coverage will be suboptimal.
Tests are running without the ability to do manual garbage collection. They will still work, but coverage will be suboptimal.
file result: ok. 4 passed; 0 failed; 0 expected failure; total 4 (277ms)
```
This PR removes that warning and improves coverage.
This PR fixes some crashing WPT tests due to an unresolved promise.
---
This could be a [stream spec](https://streams.spec.whatwg.org) bug
When `controller.close` is called on a byob stream, there's no cleanup
of pending `readIntoRequests`. The only cleanup of pending
`readIntoRequests` happen when `.byobRequest.respond(0)` is called, it
happens
here:6ba245fe25/ext/web/06_streams.js (L2026)
which ends up calling `readIntoRequest.closeSteps(chunk);` in
6ba245fe25/ext/web/06_streams.js (L2070)
To reproduce:
```js
async function byobRead() {
const input = [new Uint8Array([8, 241, 48, 123, 151])];
const stream = new ReadableStream({
type: "bytes",
async pull(controller) {
if(input.length === 0) {
controller.close();
// controller.byobRequest.respond(0); // uncomment for fix
return
}
controller.enqueue(input.shift())
},
});
const reader = stream.getReader({ mode: 'byob' });
const r1 = await reader.read(new Uint8Array(64));
console.log(r1);
const r2 = await reader.read(new Uint8Array(64));
console.log(r2);
}
await byobRead();
```
Running the script triggers:
```
error: Top-level await promise never resolved
```
This addresses issue #19918.
## Issue description
Event messages have the wrong isTrusted value when they are not
triggered by user interaction, which differs from the browser. In
particular, all MessageEvents created by Deno have isTrusted set to
false, even though it should be true.
This is my first ever contribution to Deno, so I might be missing
something.
Fixes the WPT tests that test w/invalid codes. Also explicitly ignoring
some h2 tests to hopefully prevent flakes.
The previous changes to WebSocketStream introduced a bug where the close
errors were not made available if the `pull` method was re-entrant.
The copyright checker was allowing files with code above the copyright
line in a few places, mainly as a result of IDEs ordering imports
improperly.
This makes the check more robust, and adds a whitelist of valid lines
that may appear before the copyright line.
This is a quick tool that I've been using to build benchmarking builds
for Deno.
Usage:
Build a benchmark `HEAD~1` and `origin/main` executable:
```sh
deno run tools/build_bench.ts HEAD~1 origin/main
```
Build debug benchmark executables of the last three commits:
```sh
deno run tools/build_bench.ts --profile debug HEAD HEAD~1 HEAD~2
```
Adds an import map of the core and ext JavaScript files. This was
created manually but a script to create one automatically wouldn't be
too much of a big thing either.
This should make working on especially the Node polyfills much more
pleasant, as it gives you feedback on if your imports are correct.
Unfortunately the TypeScript declaration files of some of the internal
modules clash with the import map and override the data from the actual
files with data from the declaration files. Those do not contain all
exports nor is their data always up to date. Still, this is much better
than not having one.