Commit Graph

1110 Commits

Author SHA1 Message Date
Matt Mastracci
4ff5f175a8
chore: update release_doc_template.md (#21322)
Remove the need to manually build M1

Signed-off-by: Matt Mastracci <matthew@mastracci.com>
2023-11-23 22:42:13 -07:00
Matt Mastracci
778e4c9710
chore: start codesigning mac release builds (#21303)
- Adds a codesigning step to all mac targets
- Adds a new ci-full label to the build to force aarch64 builds on any
PR
2023-11-23 15:30:26 -07:00
Asher Gomez
616354e76c
refactor: replace deferred() from std/async with Promise.withResolvers() (#21234)
Closes #21041

---------

Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2023-11-22 12:11:20 +01:00
David Sherret
32025dca5c
chore(tools): pull dprint from npm instead of third_party (#21281)
This will allow this format script to work on more architectures. Also,
this upgrade fixes the issue with the unstable incremental cache that's
currently on main.
2023-11-21 00:21:21 +00:00
Matt Mastracci
93c4c1a2c1
chore: add aarch64-apple-darwin builds to ci (#21243)
This is a prerequisite to automatic code signing.
2023-11-19 16:11:20 -07:00
Leo Kettmeir
a7548afb58
chore: update wpt (#21255) 2023-11-18 22:43:57 +00:00
Matt Mastracci
58068a7d1c
chore: bump deno_core (#21242) 2023-11-17 23:49:11 +00:00
Yoshiya Hinosawa
b7d14d9bd5
chore(tools): update release_doc_template.md (#21230) 2023-11-17 21:47:40 +09:00
Leo Kettmeir
5fbf3d99a2
chore: update wpt (#21178)
For #20849
2023-11-13 18:40:05 +00:00
Kenta Moriuchi
39223f709b
feat(ext/web): add AbortSignal.any() (#21087)
Fixes #18944
2023-11-13 01:04:11 +01:00
Divy Srivastava
8ecb649182
chore: give suggestion on PR open failure (#21145) 2023-11-10 14:40:00 +01:00
Matt Mastracci
5e82fce0a0
chore: remove op_baseline and flamebench (#21120)
ops are better tested in deno_core, and flamebench has rotted quite a
bit.
2023-11-08 13:00:13 -07:00
Matt Mastracci
ec0e387d1c
chore: fix dlint version and sanity check version after download (#21058)
Follow-up to fix version error introduced in #21014
2023-11-02 15:37:10 -06:00
Matt Mastracci
42c426e769
feat(ext/websocket): websockets over http2 (#21040)
Implements `WebSocket` over http/2. This requires a conformant http/2
server supporting the extended connect protocol.

Passes approximately 100 new WPT tests (mostly `?wpt_flags=h2` versions
of existing websockets APIs).

This is implemented as a fallback when http/1.1 fails, so a server that
supports both h1 and h2 WebSockets will still end up on the http/1.1
upgrade path.

The patch also cleas up the websockets handshake to split it up into
http, https+http1 and https+http2, making it a little less intertwined.

This uncovered a likely bug in the WPT test server:
https://github.com/web-platform-tests/wpt/issues/42896
2023-11-01 21:11:01 +00:00
Igor Zinkovsky
01d3e0f317
feat(cron) implement Deno.cron() (#21019)
This PR adds unstable `Deno.cron` API to trigger execution of cron jobs.

* State: All cron state is in memory. Cron jobs are scheduled according
to the cron schedule expression and the current time. No state is
persisted to disk.
* Time zone: Cron expressions specify time in UTC.
* Overlapping executions: not permitted. If the next scheduled execution
time occurs while the same cron job is still executing, the scheduled
execution is skipped.
* Retries: failed jobs are automatically retried until they succeed or
until retry threshold is reached. Retry policy can be optionally
specified using `options.backoffSchedule`.
2023-11-01 11:57:55 -07:00
Kenta Moriuchi
841f215fd4
fix(ext/node): adapt dynamic type checking to Node.js behavior (#21014) 2023-11-01 16:06:25 +09:00
Leo Kettmeir
39716183ac
feat(ext/web): EventSource (#14730)
Closes #10298

---------

Co-authored-by: Aapo Alasuutari <aapo.alasuutari@gmail.com>
2023-10-31 18:16:27 +01:00
Divy Srivastava
09204107d8
fix: implement node:tty (#20892)
Fixes #21012
Closes https://github.com/denoland/deno/issues/20855
Fixes https://github.com/denoland/deno/issues/20890
Fixes https://github.com/denoland/deno/issues/20611
Fixes https://github.com/denoland/deno/issues/20336
Fixes `create-svelte` from https://github.com/denoland/deno/issues/17248

Fixes more reports here:
- https://github.com/denoland/deno/issues/6529#issuecomment-1432690559
- https://github.com/denoland/deno/issues/6529#issuecomment-1522059006
- https://github.com/denoland/deno/issues/6529#issuecomment-1695803570
2023-10-30 15:53:08 +00:00
Divy Srivastava
02cc37e054
chore: upgrade rsa to 0.9 (#21016) 2023-10-30 16:25:12 +01:00
David Sherret
be97170a19
feat(unstable): ability to npm install then deno run main.ts (#20967)
This PR adds a new unstable "bring your own node_modules" (BYONM)
functionality currently behind a `--unstable-byonm` flag (`"unstable":
["byonm"]` in a deno.json).

This enables users to run a separate install command (ex. `npm install`,
`pnpm install`) then run `deno run main.ts` and Deno will respect the
layout of the node_modules directory as setup by the separate install
command. It also works with npm/yarn/pnpm workspaces.

For this PR, the behaviour is opted into by specifying
`--unstable-byonm`/`"unstable": ["byonm"]`, but in the future we may
make this the default behaviour as outlined in
https://github.com/denoland/deno/issues/18967#issuecomment-1761248941

This is an extremely rough initial implementation. Errors are
terrible in this and the LSP requires frequent restarts. Improvements
will be done in follow up PRs.
2023-10-25 14:39:00 -04:00
Leo Kettmeir
8ba1242a05
feat(WebSocketStream): rename connection to opened (#20878) 2023-10-11 07:31:05 +02:00
Luca Casonato
6450334f5b
feat(ext/web): cancel support for TransformStream (#20815) 2023-10-10 18:42:31 +09:00
Luca Casonato
2665ca103e
fix(ext/web): writability of ReadableStream.from (#20836)
Fixes a WPT in `URL` and `ReadableStream`.

Some unrelated WPT expectation changes due to WPT update.
2023-10-10 05:01:01 +02:00
Aapo Alasuutari
effb5e1ce4
fix(node/buffer): utf8ToBytes should return a Uint8Array (#20769) 2023-10-08 11:09:50 +09:00
Hirotaka Tagawa / wafuwafu13
9017e789df
test(node_compat): add test-http-url.parse* (#20458)
Add `test-http-url.parse*` tests for Node compat.
2023-09-30 10:14:48 +02:00
David Sherret
31991e221b
chore: add back dotcom step to release (#20713)
Accidentally removed in
69b7166c20
2023-09-27 19:22:39 +00:00
Luca Casonato
6f87962a77
chore: clean up lint script (#20682)
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.
2023-09-26 04:41:07 +00:00
Divy Srivastava
75a724890d
fix(node): supported arguments to randomFillSync (#20637)
Fixes https://github.com/denoland/deno/issues/20634
2023-09-23 10:04:55 +02:00
David Sherret
69b7166c20
chore: update manual instructions for doing a release (#20578) 2023-09-20 00:47:51 +00:00
Matt Mastracci
a4b7d563c4
chore(test_util): ensure that extra expectations are an error even without a filter (#20483)
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`)
2023-09-13 16:09:43 -06:00
Matt Mastracci
81d50e1b66
chore: bump deno_core and cargo update (#20480)
Bump deno_core, pulling in new rusty_v8. Requires some op2/deprecation
fixes.
2023-09-13 22:01:31 +00:00
Matt Mastracci
8eda8c0dbd
chore: make downloadPrebuilt a little more reliable (#20401)
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
2023-09-07 17:13:11 +00:00
David Sherret
3fc19dab47
feat: support import attributes (#20342) 2023-09-07 09:09:16 -04:00
David Sherret
a0af53fea1
chore: pin third_party (#20386) 2023-09-06 06:07:55 +02:00
Bartek Iwańczuk
2a1ba2732e
chore: disable 'test-http-content-length.js` test (#20344) 2023-09-04 23:23:01 +02:00
Divy Srivastava
d6c49353c3
chore(release): fix workspace formatter (#20357) 2023-09-03 10:09:15 +05:30
Matt Mastracci
653e668c20
chore: bump deno_core to 0.207.0 (#20333)
rusty_v8 -> "0.75.1"
2023-08-30 21:45:47 +02:00
osddeitf
c2547ba039
fix(node/http): correctly send Content-length header instead of Transfer-Encoding: chunked (#20127)
Fix #20063.
2023-08-28 09:32:54 +02:00
Matt Mastracci
b1ce2e4167
fix(ext/web): add stream tests to detect v8slice split bug (#20253)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-08-23 17:03:05 -06:00
David Sherret
5834d282d4
refactor: upgrade deno_ast 0.28 and deno_semver 0.4 (#20193) 2023-08-21 09:53:52 +00:00
Divy Srivastava
c2259f78eb
chore: remove third_party submodule (#20201)
removes third_party submodule, tools are installed on-demand.

- removed `load_test` and websocket benchmark (covered by benchy)
- removed node/bun http benchmarks (covered by benchy)
- `dlint` & `dprint` downloaded on-demand. 
- `wrk` & `hyperfine` downloaded before CI benchmark run. 
   Install locally using: `./tools/install_prebuilt.js wrk hyperfine`

#### updating dlint/dprint

update version in `tools/util.js` and place binary in
`denoland/deno_third_party`.
2023-08-19 09:56:12 +05:30
Marcos Casagrande
ec63b36994
perf(ext/event): optimize Event constructor (#20181)
This PR optimizes `Event` constructor

- ~Added a fast path for empty `eventInitDict`~ Removed `EventInit`
dictionary converter
- Don't make `isTrusted` a
[LegacyUnforgeable](https://webidl.spec.whatwg.org/#LegacyUnforgeable)
property. Doing so makes it non-spec compliant but calling
`Object/Reflect.defineProperty` on the constructor is a big bottleneck.
Node did the same a few months ago
https://github.com/nodejs/node/pull/46974. In my opinion, the
performance gains are worth deviating from the spec for a
browser-related property.

**This PR**

```
cpu: 13th Gen Intel(R) Core(TM) i9-13900H
runtime: deno 1.36.1 (x86_64-unknown-linux-gnu)

benchmark                      time (avg)        iter/s             (min … max)       p75       p99      p995
------------------------------------------------------------------------------- -----------------------------
event constructor no init      36.69 ns/iter  27,257,504.6   (33.36 ns … 42.45 ns)  37.71 ns  39.61 ns  40.07 ns
event constructor               36.7 ns/iter  27,246,776.6   (33.35 ns … 56.03 ns)  37.73 ns  40.14 ns  41.74 ns
```

**main**

```
cpu: 13th Gen Intel(R) Core(TM) i9-13900H
runtime: deno 1.36.1 (x86_64-unknown-linux-gnu)

benchmark                      time (avg)        iter/s             (min … max)       p75       p99      p995
------------------------------------------------------------------------------- -----------------------------
event constructor no init     380.48 ns/iter   2,628,275.8 (366.66 ns … 399.39 ns) 384.58 ns 398.27 ns 399.39 ns
event constructor             480.33 ns/iter   2,081,882.6 (466.67 ns … 503.47 ns) 484.27 ns 501.28 ns 503.47 ns
```

```js
Deno.bench("event constructor no init", () => {
  const event = new Event("foo");
});

Deno.bench("event constructor", () => {
  const event = new Event("foo", { bubbles: true, cancelable: false });
});
```

towards https://github.com/denoland/deno/issues/20167
2023-08-17 10:35:18 +02:00
await-ovo
41cad2179f
fix(runtime): navigator.userAgent in web worker (#20129)
Fixes https://github.com/denoland/deno/issues/20079

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-08-15 17:04:36 +02:00
Marcos Casagrande
0fc31d9d65
fix(ext/fetch): clone second branch chunks in Body.clone() (#20057)
This PR makes `Body.clone()` spec compliant:
https://fetch.spec.whatwg.org/#concept-body-clone

> 1, Let « out1, out2 » be the result of
[teeing](https://streams.spec.whatwg.org/#readablestream-tee) body’s
[stream](https://fetch.spec.whatwg.org/#concept-body-stream).
> ...
> To tee a
[ReadableStream](https://streams.spec.whatwg.org/#readablestream)
stream, return ?
[ReadableStreamTee](https://streams.spec.whatwg.org/#readable-stream-tee)(stream,
true).

---
Closes #10994
2023-08-15 09:21:02 +02:00
Matt Mastracci
babfba14ef
chore: deno_core -> 0.201.0 (#20135) 2023-08-12 19:04:45 +00:00
Marcos Casagrande
557b11b765
fix(ext/abort): trigger AbortSignal events in correct order (#20095)
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"])
```
2023-08-08 12:05:42 +02:00
Matt Mastracci
85a2b281f5
chore: use zlib-ng for flate2 (#20059)
Extracted from PR #16011
2023-08-05 15:43:16 -06:00
Marcos Casagrande
a1280c36c2
chore(wpt): expose gc (#20060)
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.
2023-08-05 23:34:14 +02:00
Marcos Casagrande
5311f69bbb
fix(ext/file): resolve unresolved Promise in Blob.stream (#20039)
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
```
2023-08-04 13:57:54 +02:00
Ricardo Iván Vieitez Parra
98403691d1
fix: call setIsTrusted for generated events (MessageEvent) (#19919)
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.
2023-07-31 23:22:07 +02:00
Marcos Casagrande
ee7f36afdb
fix(ext/compression): throw TypeError on corrupt input (#19979)
`TypeError` should be thrown when decompressing a corrupt input
2023-07-30 09:15:29 -04:00
Bartek Iwańczuk
a9951e360c
refactor(cli/tools): split bench into multiple modules (#19974)
I was asked to add "iter/s" to the benchmark output, before attempting
that I wanted to split this into multiple modules.
2023-07-28 11:27:10 -04:00
Leo Kettmeir
cbfa98ea0b
feat(ext/websocket): allow HTTP(S) protocol in URL (#19862)
Closes #19093
2023-07-28 06:29:41 +00:00
Bartek Iwańczuk
01f0d03ae8
refactor: rename built-in node modules from ext:deno_node/ to node: (#19680)
Closes https://github.com/denoland/deno/issues/19510
2023-07-02 20:19:30 +02:00
Leo Kettmeir
805497a9a5
feat: ReadableStream.from (#19446)
Closes #19417
2023-07-02 19:30:05 +02:00
Lino Le Van
17ddf2f97c
feat(ext/url): URLSearchParams two-argument delete() and has() (#19654) 2023-07-02 17:26:48 +02:00
Luca Casonato
d8e8e60f9f
feat(ext/fetch): add Headers#getSetCookie (#13542)
Spec change: https://github.com/whatwg/fetch/pull/1346
Tests: https://github.com/web-platform-tests/wpt/pull/31442 (ran against
this PR and they all pass)

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-07-02 13:20:56 +02:00
Matt Mastracci
93b3ff0170
fix(ext/websocket): Ensure that errors are available after async response returns (#19642)
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.
2023-06-29 07:24:01 -06:00
Kenta Moriuchi
e16b74d792
chore(ext/node): disable prefer-primordials on a per-file basis (#19553) 2023-06-27 15:18:22 +09:00
Matt Mastracci
fa935e553a
chore: Ensure copyright line is the first in the file (#19608)
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.
2023-06-26 09:38:55 -06:00
Martin Fischer
801b9ec62d
chore: fix typos (#19572) 2023-06-26 09:10:27 -04:00
Bartek Iwańczuk
3fe44a50c3
chore: disable /websocket/stream/tentative/close.any.worker.html?wss (#19606)
This test is very flaky.
2023-06-25 11:21:23 +02:00
Divy Srivastava
4a18c76135
fix(ext/node): support brotli APIs (#19223)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-06-24 19:42:08 +05:30
VlkrS
ea97af312f
feat: Adaptations to support OpenBSD port (#19153) 2023-06-12 13:14:27 +03:00
Bartek Iwańczuk
a4c760702b
chore: update release doc template (#19441)
That action is not working properly.
2023-06-09 14:59:15 +02:00
Leo Kettmeir
4bc95427b9
chore: update wpt (#19422) 2023-06-08 22:56:05 +02:00
Matt Mastracci
40d77c5605
chore(core): build_bench tool (#19387)
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
```
2023-06-06 18:53:41 +00:00
Levente Kurusa
11dd5a0ae7
fix(ext/crypto): fix JWK import of Ed25519 (#19279)
Fixes: #18049

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-06-05 14:52:02 +02:00
Aapo Alasuutari
98461e2559
chore(tools): Add core import-map (#19346)
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.
2023-06-02 09:38:36 -04:00
Hirotaka Tagawa / wafuwafu13
0104741d6f
chore(node_compat): fix path strings generated by setup.ts (#19347) 2023-06-02 15:05:32 +09:00
Matt Mastracci
11791ee260
chore(core): Update certs for WPT (#19351) 2023-06-01 21:32:07 -06:00
Hirotaka Tagawa / wafuwafu13
1a0445dc6b
chore(node_compat): add deno task for setting up and running tests (#19293) 2023-06-01 17:31:06 +09:00
David Sherret
047edf6a75
ci: bump CI cache version on CLI version bump (#19318)
Automatically bump the CI cache version
2023-05-30 17:09:07 -04:00
Bartek Iwańczuk
d90a75c036
fix: use proper ALPN protocols if HTTP client is HTTP/1.1 only (#19303)
Closes https://github.com/denoland/deno/issues/16923

---------

Co-authored-by: crowlkats <crowlkats@toaxl.com>
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-05-29 23:05:45 +02:00
Leo Kettmeir
be59e93220
refactor(node/http): don't use readablestream for writing to request (#19282)
Refactors the internal usage of a readablestream to write to the
resource directly

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-05-27 15:42:20 +02:00
Hirotaka Tagawa / wafuwafu13
0a3d355ce6
chore(node_compat): fix broken link and typo (#19265) 2023-05-26 05:00:29 +02:00
Bartek Iwańczuk
5874fc3d0a
feat: add support for globs in the config file and CLI arguments for files (#19102)
Follow up to https://github.com/denoland/deno/pull/19084.

This commit adds support for globs in the configuration file as well 
as CLI arguments for files. 

With this change users can now use glob syntax for "include" and 
"exclude" fields, like so:

```json
{
  "lint": {
    "include": [
      "directory/test*.ts",
      "other_dir/"
    ],
    "exclude": [
      "other_dir/foo*.ts",
      "nested/nested2/*"
    ]
  },
  "test": {
    "include": [
      "data/test*.ts",
      "nested/",
      "tests/test[1-9].ts"
    ],
    "exclude": [
      "nested/foo?.ts",
      "nested/nested2/*"
    ]
  }
}
```

Or in CLI args like so:
```
// notice quotes here; these values will be passed to Deno verbatim
// and deno will perform glob expansion

$ deno fmt --ignore="data/*.ts"
$ deno lint "data/**/*.ts"
```

Closes https://github.com/denoland/deno/issues/17971
Closes https://github.com/denoland/deno/issues/6365
2023-05-23 03:39:59 +02:00
Marcos Casagrande
b0f13560cb
fix(ext/webidl): change createPromiseConverter (#16367) 2023-05-18 17:05:11 +03:00
Yoshiya Hinosawa
243d9c846d
fix(ext/node): fix whatwg url formatting (#19146) 2023-05-17 14:51:51 +09:00
Leo Kettmeir
867a6d3032
refactor(node): reimplement http client (#19122)
This commit reimplements most of "node:http" client APIs using
"ext/fetch".

There is some duplicated code and two removed Node compat tests that
will be fixed in follow up PRs.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-05-17 01:20:32 +02:00
Levente Kurusa
1171c54952
feat(node/crypto): Builtin Diffie-Hellman Groups (#19137)
Towards #18455
2023-05-16 00:07:58 +02:00
Levente Kurusa
3356173d00
feat(node/crypto): Diffie Hellman Support (#18943)
Support crypto.DiffieHellman class in ext/node/crypto
2023-05-15 19:41:53 +02:00
Yoshiya Hinosawa
0ccfccdcd2
chore: check node_compat config diff in CI (#19119) 2023-05-15 21:22:53 +09:00
Matt Mastracci
9845361153
refactor(core): bake single-thread assumptions into spawn/spawn_blocking (#19056)
Partially supersedes #19016.

This migrates `spawn` and `spawn_blocking` to `deno_core`, and removes
the requirement for `spawn` tasks to be `Send` given our single-threaded
executor.

While we don't need to technically do anything w/`spawn_blocking`, this
allows us to have a single `JoinHandle` type that works for both cases,
and allows us to more easily experiment with alternative
`spawn_blocking` implementations that do not require tokio (ie: rayon).

Async ops (+~35%):

Before: 

```
time 1310 ms rate 763358
time 1267 ms rate 789265
time 1259 ms rate 794281
time 1266 ms rate 789889
```

After:

```
time 956 ms rate 1046025
time 954 ms rate 1048218
time 924 ms rate 1082251
time 920 ms rate 1086956
```

HTTP serve (+~4.4%):

Before:

```
Running 10s test @ http://localhost:4500
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    68.78us   19.77us   1.43ms   86.84%
    Req/Sec    68.78k     5.00k   73.84k    91.58%
  1381833 requests in 10.10s, 167.36MB read
Requests/sec: 136823.29
Transfer/sec:     16.57MB
```

After:

```
Running 10s test @ http://localhost:4500
  2 threads and 10 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    63.12us   17.43us   1.11ms   85.13%
    Req/Sec    71.82k     3.71k   77.02k    79.21%
  1443195 requests in 10.10s, 174.79MB read
Requests/sec: 142921.99
Transfer/sec:     17.31MB
```

Suggested-By: alice@ryhl.io
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-05-14 15:40:01 -06:00
Bartek Iwańczuk
cf6f965e25
chore: upgrade rusty_v8 to 0.71.2 (#19116)
Closes https://github.com/denoland/deno/issues/19021
2023-05-13 21:11:40 +02:00
Yoshiya Hinosawa
ab88dc2c68
chore(ext/node): removed skipped compat test cases (#19109) 2023-05-13 15:26:16 +09:00
Yoshiya Hinosawa
2a0c664840
chore: fix & update node compat config (#19106) 2023-05-13 14:49:11 +09:00
Matt Mastracci
d55e07f627
chore(core): Parallelize all WPT tests and reduce timeouts for expected failures (#19061)
This speeds up WPT tests in two ways:

1. The `WebCryptoAPI` tests are slow, so create a parallel bucket for
each individual test instead of one for all the `WebCryptoAPI` tests.
2. If a test is expected to fail, use a shorter timeout (1 minute rather
than 4).
2023-05-10 21:35:42 +02:00
Bartek Iwańczuk
8e6c104907
chore: update release doc template (#18974) 2023-05-03 15:05:53 +00:00
denobot
6369098ad7
chore: forward v1.33.1 release commit to main (#18897)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-04-28 21:14:26 +02:00
Bartek Iwańczuk
6cd62ea5e9
chore: upgrade rusty_v8 to 0.71.0 (#18868) 2023-04-27 20:50:46 +02:00
Leo Kettmeir
78b630d92a
ci: switch release doc to mention dotcom (#18845) 2023-04-26 03:38:49 +00:00
Yoshiya Hinosawa
63befe9377
fix(ext/node): fix hash.flush (#18818) 2023-04-25 11:21:26 +09:00
Levente Kurusa
a8ca09f78a
chore(tools/release): make things a bit more obvious (#18753) 2023-04-19 20:11:23 +02:00
Yoshiya Hinosawa
53c9f5918c
fix(ext/node): improve vm.runInThisContext (#18767) 2023-04-19 23:26:16 +09:00
Yoshiya Hinosawa
de21a780fd
fix(ext/node): add req.socket.remoteAddress (#18733) 2023-04-18 16:00:51 +09:00
Yoshiya Hinosawa
559a61b879
chore: update node compat config (#18736) 2023-04-18 00:36:49 +09:00
Bartek Iwańczuk
52d235391c
chore: add test duration to WPT (#18680)
To make it easier to debug which tests are slowing us down.

Tests taking more than 5s have duration printed in red,
taking more than 1s in yellow and less than 1s are printed 
without color.
2023-04-13 10:03:15 -04:00
Kenta Moriuchi
2dc2016837
feat(ext/url): URL.canParse (#18286) 2023-04-04 13:34:12 +02:00
David Sherret
d939a5e96c
ci: improve release docs (#18562) 2023-04-02 17:53:52 +00:00
Kenta Moriuchi
03edd48edd
chore: Turn back on dlintPreferPrimordials (#17715)
Closes #17709
2023-04-02 19:41:41 +02:00
David Sherret
30065af0f2
chore(release): improve merge commit back to main for patch releases (#18554)
This change commits with conflicts that can then be resolved manually.
2023-04-01 16:58:55 +00:00
Bartek Iwańczuk
381f5801f9
Revert "refactor(ext/node): Use Deno.inspect (#17960)" (#18491)
This reverts commit a3529d0232.

This change made debugging Node tests very hard - `AssertionError` is
now printed as `[Circular *1]` giving no visibility what failed.

We need to align two implementations together and remove this one then.
2023-03-30 15:33:28 +00:00
Yoshiya Hinosawa
8b596cbae1
chore: document Node.js compat test setup script (#18381) 2023-03-26 12:22:09 +03:00
Kenta Moriuchi
255b06d793
chore: update wpt again (#18384)
This reverts commit 4c2269d64a.

> This update introduced more flakiness to the tests on CI, we are going
> to investigate and reland this update after Deno 1.32.0 is released.
2023-03-25 03:27:49 +00:00
Ryan Dahl
a3529d0232
refactor(ext/node): Use Deno.inspect (#17960)
No need for two almost identical implementations of the same thing

---------

Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
Co-authored-by: Aapo Alasuutari <aapo.alasuutari@gmail.com>
2023-03-23 10:01:07 -04:00
Bartek Iwańczuk
4c2269d64a
Revert "chore: update wpt (#18335)" (#18355)
This reverts commit 29fb7709ed.

This update introduced more flakiness to the tests on CI, we are going
to investigate and reland this update after Deno 1.32.0 is released.
2023-03-22 17:17:52 +00:00
Kenta Moriuchi
29fb7709ed
chore: update wpt (#18335) 2023-03-22 15:43:20 +01:00
Cre3per
fd0658fb42
feat(cli): --ext parameter for run, compile, and bundle (#17172)
Adds `--ext` to `deno run`, closes #5088

Additionally

- Adds `--ext` to `deno compile` and `deno bundle`
2023-03-22 10:15:53 -04:00
Matt Mastracci
08849a48ca
chore(tools): Copyright checker had a bad interpolation (#18328)
The copyright checker was erroring out with a bad interpolation if
errors existed.
2023-03-21 10:31:34 -06:00
David Sherret
0366d6833f
docs(release): update to include deno_docker release workflow (#18323) 2023-03-21 11:38:59 -04:00
Yoshiya Hinosawa
aa729a42b4
chore(tools): restore node compat test setup script (#18290) 2023-03-21 22:38:07 +09:00
Bartek Iwańczuk
a5ad3a44b5
chore(ci): allow 'Reland' PR title prefix (#18273) 2023-03-18 21:15:45 +00:00
Leo Kettmeir
35196eab27
BREAKING(unstable): remove WebGPU (#18094)
This PR _**temporarily**_ removes WebGPU (which has behind the
`--unstable` flag in Deno), due to performance complications due to its
presence.

It will be brought back in the future; as a point of reference, Chrome
will ship WebGPU to stable on 26/04/2023.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-03-17 00:29:32 +01:00
Bartek Iwańczuk
8efda832e2
chore(ci): allow 'BREAKING' PR title prefix (#18238)
So that we can land PRs like https://github.com/denoland/deno/pull/18237
or https://github.com/denoland/deno/pull/18094
2023-03-16 22:42:29 +00:00
David Sherret
b9d9cd17c9
chore: upgrade deno_automation to 0.19.0 (#18213)
I updated the lockfile with:

```
deno cache --lock=tools/deno.lock.json --lock-write ./tools/wpt.ts ./tools/upload_wptfyi.js ./tools/release/deps.ts
```
2023-03-16 09:26:30 -04:00
Bartek Iwańczuk
392f91da00
test: ignore global-immutable-prototype.any.worker.html (#18208)
This test is very flaky on CI, ignoring it for now.

https://github.com/denoland/deno/issues/17405
2023-03-15 22:40:56 -04:00
David Sherret
6c05b776e0
chore: parallelize lint steps (#18214) 2023-03-15 22:39:40 -04:00
Filip Skokan
72ced37821
fix(wpt): set META_TITLE on global for the testharness (#18193)
Fixes hopefully the last mismatch of reported test titles.

-
[redirect-schemes.any.html](https://wpt.fyi/results/fetch/api/redirect/redirect-schemes.any.html?run_id=5139017526411264&run_id=5093839906275328)
-
[redirect-schemes.any.worker.html](https://wpt.fyi/results/fetch/api/redirect/redirect-schemes.any.worker.html?run_id=5139017526411264&run_id=5093839906275328)
-
ebf6814ebd/resources/testharness.js (L4754-L4756)
2023-03-15 14:03:07 +01:00
Lino Le Van
eb990efcce
feat(ext/url): URLSearchParams.size (#17884) 2023-03-14 20:28:33 +00:00
David Sherret
b9d2ac32d5
chore(ci): verify the PR title as part of linting (#18163)
This verifies the PR title as part of the lint step.
2023-03-13 18:59:13 +00:00
Filip Skokan
92c388761a
wpt: only tag daily runs as master (#18155)
This PR updates the WPT upload script so that it only labels runs that
come from the daily WPT job as "master".

This is so that only the daily synchronized runs get selected when
viewing dashboards such as
[this](https://wpt.fyi/results/?label=master&label=experimental&product=deno&product=node.js&product=chrome&product=edge&product=firefox&product=safari&aligned&view=subtest&q=deno%3A%21missing).
2023-03-13 13:24:16 +01:00
Bartek Iwańczuk
215528f499
build: run clippy with --all-features (#18115) 2023-03-10 21:07:28 +09:00
Bartek Iwańczuk
72fe9bb470
refactor: rename InternalModuleLoader to ExtModuleLoader, use ext: scheme for snapshotted modules (#18041)
This commit renames "deno_core::InternalModuleLoader" to
"ExtModuleLoader" and changes the specifiers used by the 
modules loaded from this loader to "ext:".

"internal:" scheme was really ambiguous and it's more characters than
"ext:", which should result in slightly smaller snapshot size.

Closes https://github.com/denoland/deno/issues/18020
2023-03-08 12:44:54 +01:00
Filip Skokan
7d13d65468
fix(ext/crypto): correctly limit ECDSA and hash algorithms (#18030)
Closes #18029
2023-03-05 12:34:07 +00:00
Filip Skokan
1b42ab4605
wpt: unlock nightly with --no-ignore (#17998)
When I was testing the code in #17892 I had updated expectations and
didn't catch this.

This PR fixes the the expectation file format to not be checked when
--no-ignore is passed during
[nightly](https://github.com/denoland/deno/actions/runs/4319520368/jobs/7538796572#step:9:46)
runs.
2023-03-03 14:50:18 +01:00
Filip Skokan
64503fabd8
test(wpt): implement process timeout, fix expectations update, and more... (#17892)
- relands #17872
- updates the timeouts to be re-configurable just for CI
- fixes `./tools/wpt.ts update`
- adds option not "ignore" during, applied to wpt epoch runs only
2023-03-02 23:05:17 +01:00
Bartek Iwańczuk
93a712fbac
Revert "test(wpt): implement process timeout (#17872)" (#17886)
This reverts commit 5fcbdd6228.
2023-02-23 02:34:19 +01:00
Filip Skokan
5fcbdd6228
test(wpt): implement process timeout (#17872)
```
response-consume-stream.any.js
Blob-stream.any.js
```

These tests just hang whenever they get to use byob mode. This PR adds a
timeout to the spawned process so that the WPTs finish running.

This first broke the daily run due to
7b49c547d4

Also fixes "Untitled" test names in
https://wpt.fyi/results/dom/events/Event-constructors.any.html?label=experimental&label=master&product=deno&product=chrome&aligned&view=subtest
2023-02-22 21:45:21 +01:00
Yoshiya Hinosawa
a01af067d7
test: add node compat tests (#17805) 2023-02-17 23:58:52 +09:00
Bartek Iwańczuk
4c2380af5c
test: add unit tests from std/node (#17794)
Adds two test files: "cli/tests/unit_node/process_test.ts" and
"cli/tests/unit_node/child_process_test.ts"

---------

Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2023-02-16 14:30:14 +01:00
David Sherret
b3e88e0681
refactor: deno_graph 0.43 upgrade (#17692) 2023-02-09 22:00:23 -05:00
Leo Kettmeir
49af1ab18d
refactor: remove prefix from include_js_files & use extension name (#17683) 2023-02-07 21:09:50 +00:00
Leo Kettmeir
b4aa153097
refactor: Use ES modules for internal runtime code (#17648)
This PR refactors all internal js files (except core) to be written as
ES modules.
`__bootstrap`has been mostly replaced with static imports in form in
`internal:[path to file from repo root]`.
To specify if files are ESM, an `esm` method has been added to
`Extension`, similar to the `js` method.
A new ModuleLoader called `InternalModuleLoader` has been added to
enable the loading of internal specifiers, which is used in all
situations except when a snapshot is only loaded, and not a new one is
created from it.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-02-07 20:22:46 +01:00
Leo Kettmeir
84a96110cd
refactor: rename deno specifiers to internal (#17655) 2023-02-05 17:49:20 +01:00
David Sherret
09d9437897
chore: add release checklist step to check the benchmarks page (#17632)
The 1.30.1 release had a performance regression that would have been
caught by looking at the benchmarks page. This adds a pre-flight step to
the release checklist for the person doing the release to go to this
page and look at the output.

This would have prevented #17629
2023-02-02 23:41:46 +00:00
Leo Kettmeir
3035dee9f1
chore: update webgpu (#17534) 2023-01-30 15:14:16 +01:00
Kenta Moriuchi
7b6339da6a
fix(core): Add lint check for core (#17223)
The prefer-primordials lint was skipped for `core/*.js`.
2023-01-26 16:56:42 +05:30
Bartek Iwańczuk
abd9610530
refactor: remove Deno.core (#16881)
This commit removes "Deno.core" namespace. It is strictly private API
that has no stability guarantees, we were supposed to remove it long time ago.

Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2023-01-24 18:54:10 +01:00
Kenta Moriuchi
6da958d7ec
chore: update dlint to v0.37.0 for GitHub Actions (#17295)
Updated third_party dlint to v0.37.0 for GitHub Actions. This PR
includes following changes:
 
* fix(prefer-primordials): Stop using array pattern assignments
* fix(prefer-primordials): Stop using global intrinsics except for
`SharedArrayBuffer`
* feat(guard-for-in): Apply new guard-for-in rule
2023-01-16 17:17:18 +01:00
Asher Gomez
7683ba5e90
chore: update std submodule and its imports (#17408) 2023-01-15 21:09:26 +01:00
David Sherret
3d423e114e
chore: small cleanup of scripts in ./tools and run copyright checker in lint.js (#17393) 2023-01-13 13:42:15 -05:00
Yiyu Lin
a00e432297
chore: add copyright_checker tool and add the missing copyright (#17285) 2023-01-13 16:51:32 +09:00
David Sherret
b4f32c8d14
chore(ci): try some wpt parallelism (#17375) 2023-01-12 19:12:20 -05:00
David Sherret
e246f06cfb
chore(ci): ci refactor - Part 1 - Generate ci yaml by js (#17335) 2023-01-10 19:16:11 -05:00
Marcos Casagrande
45768f0e83
fix(ext/web/streams): fix ReadableStream asyncIterator (#16276) 2023-01-09 21:17:36 +01:00
David Sherret
10e4b2e140
chore: update copyright year to 2023 (#17247)
Yearly tradition of creating extra noise in git.
2023-01-02 21:00:42 +00:00
Luca Casonato
923370f18f
fix(ext/fetch): new Request should soft clone (#16869)
Previously the inner request object of the original and the new request
were the same, causing the requests to be entangled and mutable changes
to one to be visible to the other. This fixes that.
2022-12-06 09:39:04 +01:00
Bartek Iwańczuk
4d07ed0efa
chore: rewrite tests and utils to use Deno.Command API (#16895)
Since "Deno.spawn()", "Deno.spawnSync()" and "Deno.spawnChild"
are getting deprecated, this commits rewrites all tests and utilities to
use "Deno.Command" API instead.
2022-12-02 14:43:17 +01:00
Geert-Jan Zwiers
0a82f3c0e9
chore(tools): update deprecated commands in format and lint tool (#16864)
Updates tools/format.js and tools/lint.js from Deno.spawn to
Deno.Command API.
2022-12-01 16:51:47 +01:00
David Sherret
623dbe7a57
chore: remove unnecessary lifetimes (#16878)
It seems we don't really need to allow these clippy rules.
2022-11-30 19:19:32 +00:00
David Sherret
2d4c46c975
refactor: create util folder, move nap_sym to napi/sym, move http_cache to cache folder (#16857) 2022-11-28 17:28:54 -05:00
David Sherret
e0dd275935
refactor: move generated_symbol_exports_list_* files to napi folder (#16822) 2022-11-25 18:49:02 -05:00
David Sherret
dcb4ffb93a
refactor: move dts files, diagnostics.rs, and tsc.rs to tsc folder (#16820) 2022-11-25 18:29:48 -05:00
Leo Kettmeir
13e3acf71d
chore: workspace inheritance (#16343) 2022-11-22 21:07:35 +01:00
Divy Srivastava
5b9620df7a
feat(ops): implement fast lazy async ops (#16579)
Implements fast scheduling of deferred op futures. 

```rs
#[op(fast)]
async fn op_read(
  state: Rc<RefCell<OpState>>,
  rid: ResourceId,
  buf: &mut [u8],
) -> Result<u32, Error> {
  // ...
}
```

The future is scheduled via a fast API call and polled by the event loop
after being woken up by its waker.
2022-11-11 19:14:53 +05:30
Divy Srivastava
bc33a4b2e0
refactor(ops): Rewrite fast call optimizer and codegen (#16514) 2022-11-10 17:23:31 +05:30
Marcos Casagrande
7bd2c607dd
fix(ext/response): make error, json, redirect enumerable (#16497) 2022-11-10 00:31:14 +01:00
Divy Srivastava
6cd9343e8b
perf(ext/web): optimize transferArrayBuffer (#16294)
Avoid copying enqueued data + misc optimizations to skip webidl
converter.
2022-10-26 18:28:25 +05:30
David Sherret
e203bd9c5a
fix: upgrade swc_ecma_parser to 0.122.19 - deno_ast 0.20 (#16406) 2022-10-25 11:55:57 -04:00
Andreu Botella
dbcbf53ab5
experiment(ext/web): Don't expose event classes during the bootstrap phase (#16213) 2022-10-24 16:14:17 +02:00
Marcos Casagrande
5828ce7675
test(wpt): add mimesniff tests (#16225)
This PR enables 1027/1911
[mimesniff](https://wpt.fyi/results/mimesniff/mime-types?label=master&product=chrome%5Bexperimental%5D&product=firefox%5Bexperimental%5D&product=safari%5Bexperimental%5D&product=deno&aligned&view=subtest)
tests.
2022-10-24 16:11:24 +02:00
Leo Kettmeir
e4940135e6
chore: update release checklist for apiland (#16334) 2022-10-18 16:46:19 +02:00
Bartek Iwańczuk
b560246f30
fix: move generated napi symbols to cli/ (#16330)
<!--
Before submitting a PR, please read http://deno.land/manual/contributing

1. Give the PR a descriptive title.

  Examples of good title:
    - fix(std/http): Fix race condition in server
    - docs(console): Update docstrings
    - feat(doc): Handle nested reexports

  Examples of bad title:
    - fix #7123
    - update docs
    - fix bugs

2. Ensure there is a related issue and it is referenced in the PR text.
3. Ensure there are tests that cover the changes.
4. Ensure `cargo test` passes.
5. Ensure `./tools/format.js` passes without changing files.
6. Ensure `./tools/lint.js` passes.
-->
2022-10-18 13:20:11 +02:00
Marcos Casagrande
d0e78ca5c6
fix(ext/fetch): set accept-encoding: identity if range header is present (#16197)
https://fetch.spec.whatwg.org/#http-network-or-cache-fetch

> If httpRequest’s header list contains `Range`, then append
(`Accept-Encoding`, `identity`)
> to httpRequest’s header list.
> 
> This avoids a failure when handling content codings with a part of an
encoded response.
> Additionally, many servers mistakenly ignore `Range` headers if a
non-identity encoding is accepted.
2022-10-17 15:39:41 +02:00
Luke Channings
d2c8b5f087
fix(build) fix linux symbols export list format (#16313)
Fixes the error reported in #16304.

> = note:
/usr/bin/ld:/home/abotella/Projects/deno/cli/generated_symbol_exports_list_linux.def:1:
syntax error in dynamic list
          collect2: error: ld returned 1 exit status

This was caused by the format of the symbols list on Linux being
malformed (as the error implies).
The format is documented in ld's
[VERSION](https://sourceware.org/binutils/docs/ld/VERSION.html) as well
as:

>  --export-dynamic-symbol-list=file
           Specify a --export-dynamic-symbol for each pattern in the
           file.  The format of the file is the same as the version node
           without scope and node name.  See VERSION for more
           information.

Previously, the format for the Linux symbols list was simply a list of
symbols, now it follows the format:

```
{ symbol_name_a;  ...; symbol_name_z };
```
2022-10-17 00:53:35 +02:00
Marcos Casagrande
5252ff5dbd
fix(ext/cache): illegal constructor (#16205) 2022-10-16 23:03:17 +05:30
Luke Channings
fa22956a86
refactor(build): better handle old glibc (#16238)
Follow-up to #16208.

- Refactors build.rs behaviour to use `-exported_symbols_list` /
`--export-dynamic-symbol-list`
- Since all build systems now rely on a symbols list file, I have added
`generate_exported_symbols_list`, which derives the symbol list file
depending on the platform, which makes `tools/napi/generate_link_win.js`
redundant.
- Fixes a missed instance of `i8` being used instead of `c_char`

Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2022-10-15 20:51:04 +05:30
Marcos Casagrande
e6e2898190
fix(ext/web/streams): enqueue to second branch before closing (#16269)
Co-authored-by: Luca Casonato <hello@lcas.dev>
2022-10-14 09:51:39 +00:00
Marcos Casagrande
0d6dbc08be
fix(ext/fetch): throw TypeError on non-Uint8Array chunk (#16262) 2022-10-14 11:38:17 +02:00
Marcos Casagrande
50c7b89369
fix(ext/web/streams): resolve cancelPromise in ReadableStreamTee (#16266) 2022-10-14 11:29:01 +02:00
Marcos Casagrande
d47b17d37d
fix(ext/fetch): throw TypeError on read failure (#16219) 2022-10-12 09:23:33 +02:00
Marcos Casagrande
cc3e2b9b1a
fix(ext/fetch): reject immediately on aborted signal (#16190)
Enabled the following test:

edc428e8e2/fetch/api/abort/general.any.js (L185-L201)
2022-10-08 16:08:47 -04:00
Marcos Casagrande
1fc1ae0005
test(ext/fetch): enable fetch/content-type/multipart.window WPT (#16209)
This PR enables the following test:

https://github.com/web-platform-tests/wpt/blob/master/fetch/content-type/multipart.window.js
2022-10-08 15:57:31 -04:00
Marcos Casagrande
a5d55fe6ea
fix(ext/fetch): support empty formdata (#16165)
This PR adds support for empty `FormData` parsing in
`Response`/`Request`

```js
new Response(new FormData()).formData()
```

ref: https://github.com/web-platform-tests/wpt/issues/28607
2022-10-07 13:59:30 +02:00
Colin Ihrig
c27234888f
fix(napi): move napi symbols file (#16179)
The current location was causing failures during v1.26.1 publication.

<!--
Before submitting a PR, please read http://deno.land/manual/contributing

1. Give the PR a descriptive title.

  Examples of good title:
    - fix(std/http): Fix race condition in server
    - docs(console): Update docstrings
    - feat(doc): Handle nested reexports

  Examples of bad title:
    - fix #7123
    - update docs
    - fix bugs

2. Ensure there is a related issue and it is referenced in the PR text.
3. Ensure there are tests that cover the changes.
4. Ensure `cargo test` passes.
5. Ensure `./tools/format.js` passes without changing files.
6. Ensure `./tools/lint.js` passes.
-->
2022-10-07 09:21:43 +05:30
Divy Srivastava
0b016a7fb8
feat(npm): implement Node API (#13633)
This PR implements the NAPI for loading native modules into Deno. 

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: DjDeveloper <43033058+DjDeveloperr@users.noreply.github.com>
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2022-10-05 19:36:44 +05:30
Marcos Casagrande
569287b15b
perf(ext/fetch): consume body using ops (#16038)
This commit adds a fast path to `Request` and `Response` that
make consuming request bodies much faster when using `Body#text`,
`Body#arrayBuffer`, and `Body#blob`, if the body is a FastStream.
Because the response bodies for `fetch` are FastStream, this speeds up
consuming `fetch` response bodies significantly.
2022-10-04 15:48:50 +02:00
Filip Skokan
aa710aac98
fix(ext/crypto): ecdh spki key import/export roundtrip (#16152) 2022-10-04 17:09:41 +05:30
Filip Skokan
7742ad77fa
fix(ext/crypto): curve25519 import export (#16140) 2022-10-03 23:06:25 -07:00
Bartek Iwańczuk
9c861ec430
chore(wpt): ignore some flaky tests (#16073) 2022-09-28 17:37:26 +02:00
Satya Rohith
b312279e58
feat: implement Web Cache API (#15829) 2022-09-28 17:41:12 +05:30
Bartek Iwańczuk
abdb6aad6e
chore(wpt): add ability to ignore a test file (#16056) 2022-09-27 23:32:17 +02:00
Divy Srivastava
f02f2425d5
feat(ext/crypto): add x25519 and Ed25519 CFRG curves (#14119) 2022-09-27 17:43:42 +05:30
Divy Srivastava
11ced3c10e
chore: update wpt (#15979) 2022-09-22 14:37:50 +05:30
David Sherret
1464b756a4
refactor: move out test files from root testdata directory into sub directories (#15949) 2022-09-19 10:32:21 -04:00
Divy Srivastava
5fe660ecd7
perf(web): optimize encodeInto() (#15922) 2022-09-17 16:48:15 +05:30
Divy Srivastava
429759fe8b
chore: bump url crate to 2.3.0 (#15800) 2022-09-07 19:07:46 +05:30
Bartek Iwańczuk
b62ef4d37b
refactor(cli): Remove cli/node dependency on cli/compat (#15654) 2022-08-29 20:19:54 +02:00
David Sherret
376665d115
fix: avoid global declaration collisions in cjs (#15608)
* Use a default stack size * 2 in debug for Windows because swc using so much stack size. We should look into this more later though.
2022-08-25 20:24:18 -04:00
David Sherret
0fe590bbcb
chore: fix publish for circular dependencies (#15598) 2022-08-25 17:01:02 -04:00
Nayeem Rahman
97954003cc
feat: queueMicrotask() error handling (#15522)
Adds error event dispatching for queueMicrotask(). Consequently unhandled errors are now reported with Deno.core.terminate(), which is immune to the existing quirk with plainly thrown errors (#14158).
2022-08-21 20:16:42 +02:00
Mathias Lafeldt
1848c7e361
Fix: Honor linter rules in CI and locally (#15492)
RUSTFLAGS take precedence over `target.<triple>.rustflags`. Therefore,
setting the env var globally in CI would always override whatever linter
rules are allowed or denied in .cargo/config.toml.

With this change, we ensure that problems are detected both in CI and
locally, using either cargo clippy or lint.js.
2022-08-19 08:17:18 -04:00
Divy Srivastava
25a109d9ea
chore(bench): add flash router benchmarks (#15495) 2022-08-19 15:54:54 +05:30
Divy Srivastava
cd21cff299
feat(ext/flash): An optimized http/1.1 server (#15405)
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Ben Noordhuis <info@bnoordhuis.nl>
Co-authored-by: crowlkats <crowlkats@toaxl.com>
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2022-08-18 17:35:02 +05:30
Bartek Iwańczuk
5a4f84a0e1
chore: upgrade rusty_v8 to 0.48.1 (#15310) 2022-08-15 14:12:11 +02:00
Mathias Lafeldt
883269f1f1
chore: move lint rules to cargo config for better editor integration (#15453) 2022-08-11 19:13:27 +05:30
David Sherret
af618e3b8f
chore: make the start_release workflow go faster (#15416) 2022-08-08 19:31:45 -04:00
David Sherret
102595976f
chore: use gist for release instruction checklist (#15414) 2022-08-06 09:45:34 -04:00
Nayeem Rahman
bfdce3cc35
chore(tools): update wpt setup to new spawn api (#15407) 2022-08-05 12:48:54 +02:00