Mattias Buelens
20c63134fc
stream: fix code style
...
PR-URL: https://github.com/nodejs/node/pull/51168
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2023-12-26 13:43:36 +00:00
Debadree Chatterjee
7a2a4d07fe
stream: implement TransformStream cleanup using "transformer.cancel"
...
Fixes: https://github.com/nodejs/node/issues/49971
PR-URL: https://github.com/nodejs/node/pull/50126
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2023-12-15 07:54:19 +00:00
Mattias Buelens
177cfc88b9
test: add note about unresolved spec issue
...
PR-URL: https://github.com/nodejs/node/pull/50779
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2023-11-21 14:42:43 +00:00
Mattias Buelens
0a6a8d2b2f
test: add note about readable streams with type owning
...
PR-URL: https://github.com/nodejs/node/pull/50779
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2023-11-21 14:42:42 +00:00
Mattias Buelens
1829c49d34
stream: fix enumerability of ReadableStream.from
...
PR-URL: https://github.com/nodejs/node/pull/50779
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2023-11-21 14:42:42 +00:00
Mattias Buelens
1729bacd6a
stream: fix enumerability of ReadableStream.prototype.values
...
PR-URL: https://github.com/nodejs/node/pull/50779
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2023-11-21 14:42:41 +00:00
Filip Skokan
2e33b16ba6
test: use requires instead of flaky in console WPT status
...
PR-URL: https://github.com/nodejs/node/pull/50812
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-11-21 09:21:47 +00:00
Mattias Buelens
e870941fa4
test: enable idlharness tests for encoding
...
TextDecoderStream and TextEncoderStream are now exposed as globals,
so we can run the entire Encoding idlharness test suite.
PR-URL: https://github.com/nodejs/node/pull/50778
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2023-11-20 12:07:55 +00:00
Filip Skokan
e0bbe8fd52
test: update WPT files for WebIDL tests
...
PR-URL: https://github.com/nodejs/node/pull/50712
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2023-11-19 07:36:31 +00:00
Filip Skokan
2aff5cf638
stream: yield expected Error class on zlib errors
...
PR-URL: https://github.com/nodejs/node/pull/50712
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2023-11-19 07:36:30 +00:00
Filip Skokan
9d652f42eb
stream: treat compression web stream format per its WebIDL definition
...
PR-URL: https://github.com/nodejs/node/pull/50631
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2023-11-12 10:01:51 +00:00
Filip Skokan
635a5c8dcd
test,stream: enable compression WPTs
...
PR-URL: https://github.com/nodejs/node/pull/50631
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2023-11-12 10:01:50 +00:00
legendecas
a00f0b1f0a
test: recognize wpt completion error
...
PR-URL: https://github.com/nodejs/node/pull/50429
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
2023-11-03 16:04:32 +00:00
Debadree Chatterjee
23a3410f9f
lib: allow byob reader for 'blob.stream()'
...
Fixes: https://github.com/nodejs/node/issues/47993
PR-URL: https://github.com/nodejs/node/pull/49713
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2023-09-22 06:16:46 +00:00
Debadree Chatterjee
b361ad72ce
stream: implement ReadableStream.from
...
Fixes: https://github.com/nodejs/node/issues/48389
PR-URL: https://github.com/nodejs/node/pull/48395
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2023-07-18 09:50:22 +00:00
Chengzhong Wu
c5b0b894ed
lib: mark URL/URLSearchParams as uncloneable and untransferable
...
Mark URL/URLSearchParams as uncloneable and untransferable to reject
them in `structuredClone` and `port.postMessage`.
PR-URL: https://github.com/nodejs/node/pull/47497
Refs: https://github.com/nodejs/node/pull/47214
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-07-15 14:04:13 +00:00
Yagiz Nizipli
f2670a61e0
url: conform to origin getter spec changes
...
PR-URL: https://github.com/nodejs/node/pull/48319
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2023-06-07 11:42:02 +00:00
Yagiz Nizipli
e6e011097e
test: update url web-platform tests
...
PR-URL: https://github.com/nodejs/node/pull/48319
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2023-06-07 11:42:01 +00:00
Filip Skokan
c85407d869
Revert "test: unskip negative-settimeout.any.js WPT"
...
This reverts commit 8244e6c35c .
PR-URL: https://github.com/nodejs/node/pull/48182
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-05-29 19:23:30 +00:00
Filip Skokan
8244e6c35c
test: unskip negative-settimeout.any.js WPT
...
PR-URL: https://github.com/nodejs/node/pull/47946
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-05-12 07:26:31 +00:00
Yagiz Nizipli
ead407915e
url: drop ICU requirement for parsing hostnames
...
PR-URL: https://github.com/nodejs/node/pull/47339
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2023-04-05 09:05:29 -07:00
Santiago Gimeno
74b9cf2ee1
lib: define Event.isTrusted in the prototype
...
Don't conform to the spec with isTrusted. The spec defines it as
`LegacyUnforgeable` but defining it in the constructor has a big
performance impact and the property doesn't seem to be useful outside of
browsers.
Refs: https://github.com/nodejs/performance/issues/32
PR-URL: https://github.com/nodejs/node/pull/46974
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-04-03 17:02:26 +00:00
Michaël Zasso
3cf65bd268
test: skip instantiateStreaming-bad-imports WPT
...
This test is flaky on ARM with V8 >= 11.2.
Skip it so we can update V8 before the release of Nodejs 20.0.0.
PR-URL: https://github.com/nodejs/node/pull/47292
Refs: https://github.com/nodejs/node/pull/46815
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Jiawen Geng <technicalcute@gmail.com >
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2023-03-29 11:58:19 +00:00
Yagiz Nizipli
843856ead7
test: update URL web-platform-tests
...
PR-URL: https://github.com/nodejs/node/pull/47135
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-03-19 12:58:38 +00:00
Filip Skokan
68e83901f3
test: update WPT resources, common, streams, FileAPI, broadcastchannel
...
PR-URL: https://github.com/nodejs/node/pull/46912
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2023-03-07 10:19:23 +01:00
Filip Skokan
31e046b9dd
test: update encoding WPTs
...
PR-URL: https://github.com/nodejs/node/pull/46802
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2023-02-25 17:30:35 +00:00
Filip Skokan
f3596146bb
test: stop faking performance idlharness
...
PR-URL: https://github.com/nodejs/node/pull/46794
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2023-02-25 15:49:48 +00:00
Yagiz Nizipli and Daniel Lemire
76ae58297d
url: fix url spec compliance issues
...
Co-authored-by: Daniel Lemire <daniel@lemire.me >
PR-URL: https://github.com/nodejs/node/pull/46547
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2023-02-18 22:43:25 +00:00
Yagiz Nizipli
0850ddafca
test: update web-platform tests for url
...
PR-URL: https://github.com/nodejs/node/pull/46547
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2023-02-18 22:43:24 +00:00
Filip Skokan
4d36ebddda
test: enable api-invalid-label.any.js in encoding WPTs
...
PR-URL: https://github.com/nodejs/node/pull/46506
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2023-02-07 10:39:36 +00:00
Filip Skokan
95466deb19
test,crypto: update WebCryptoAPI WPT
...
PR-URL: https://github.com/nodejs/node/pull/46267
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-01-21 09:01:33 +00:00
Deokjin Kim
2ff8c5090e
events: add initEvent to Event
...
Refs: https://dom.spec.whatwg.org/#dom-event-initevent
PR-URL: https://github.com/nodejs/node/pull/46069
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Robert Nagy <ronagy@icloud.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-01-19 08:59:00 +00:00
Filip Skokan
3ef38c4bd7
crypto: use WebIDL converters in WebCryptoAPI
...
WebCryptoAPI functions' arguments are now coersed and validated as per
their WebIDL definitions like in other Web Crypto API implementations.
This further improves interoperability with other implementations of
Web Crypto API.
PR-URL: https://github.com/nodejs/node/pull/46067
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2023-01-17 08:57:58 +00:00
Deokjin Kim
2363634076
test: update Web Events WPT
...
This updates the tests and the status file via running
`git node wpt dom/events`.
PR-URL: https://github.com/nodejs/node/pull/46051
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-01-10 20:01:49 +00:00
Deokjin Kim
5d4cb8464d
events: check signal before listener
...
In WPT Events, TypeError is expected if both listener and
signal are null. But checking listener doesn't throw TypeError.
So check signal before listener because checking signal throws
TypeError if signal is null.
PR-URL: https://github.com/nodejs/node/pull/46054
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
2023-01-04 04:28:54 +00:00
Ben Noordhuis
8ec1b0870b
crypto: ensure exported webcrypto EC keys use uncompressed point format
...
The WebCrypto spec apparently mandates that EC keys must be exported in
uncompressed point format. This commit makes it so.
Fixes: https://github.com/nodejs/node/issues/45859
PR-URL: https://github.com/nodejs/node/pull/46021
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
2023-01-01 19:48:51 +01:00
Filip Skokan
3f3966cb82
crypto: fix globalThis.crypto this check
...
PR-URL: https://github.com/nodejs/node/pull/45857
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-12-20 13:36:00 +00:00
Filip Skokan
e8b56fb152
test: add all WebCryptoAPI globals to WPTRunner's loadLazyGlobals
...
PR-URL: https://github.com/nodejs/node/pull/45857
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-12-20 13:35:59 +00:00
Filip Skokan
560b24398c
crypto: fix CryptoKey prototype WPT
...
PR-URL: https://github.com/nodejs/node/pull/45857
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2022-12-20 13:35:58 +00:00
Yagiz Nizipli
8467aa2189
test: update encoding wpt to latest
...
PR-URL: https://github.com/nodejs/node/pull/45850
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2022-12-17 08:18:21 +00:00
Filip Skokan
10c1c05d71
test,crypto: update WebCryptoAPI WPT
...
PR-URL: https://github.com/nodejs/node/pull/45860
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2022-12-16 14:12:27 +01:00
Filip Skokan
43b7189883
crypto: fix CryptoKey WebIDL conformance
...
PR-URL: https://github.com/nodejs/node/pull/45855
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2022-12-16 14:11:52 +01:00
Filip Skokan
3014c5d511
crypto: fix error when getRandomValues is called without arguments
...
PR-URL: https://github.com/nodejs/node/pull/45854
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2022-12-16 14:11:15 +01:00
Filip Skokan
da416697fa
test: enable idlharness WebCryptoAPI WPTs
...
PR-URL: https://github.com/nodejs/node/pull/45822
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2022-12-13 21:58:03 +00:00
Filip Skokan
7d47b6a500
crypto: validate CFRG webcrypto JWK import "d" and "x" are a pair
...
PR-URL: https://github.com/nodejs/node/pull/45569
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2022-11-26 14:41:26 +00:00
Filip Skokan
4af341a499
crypto: use DataError for CFRG webcrypto raw and jwk import key checks
...
PR-URL: https://github.com/nodejs/node/pull/45569
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2022-11-26 14:41:25 +00:00
Filip Skokan
e73e89eedf
crypto: use DataError for webcrypto keyData import failures
...
PR-URL: https://github.com/nodejs/node/pull/45569
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2022-11-26 14:41:24 +00:00
Filip Skokan
8a2f21142e
crypto: fix X25519 and X448 webcrypto public CryptoKey usages
...
PR-URL: https://github.com/nodejs/node/pull/45569
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2022-11-26 14:41:23 +00:00
Filip Skokan
123b4dac5b
crypto: ensure "x" is present when importing private CFRG webcrypto keys
...
PR-URL: https://github.com/nodejs/node/pull/45569
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2022-11-26 14:41:22 +00:00
Filip Skokan
982d0c59db
test,crypto: update WebCryptoAPI WPT
...
PR-URL: https://github.com/nodejs/node/pull/45569
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2022-11-26 14:41:21 +00:00