-
Notifications
You must be signed in to change notification settings - Fork 108
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
Split streams into more features #2491
base: main
Are you sure you want to change the base?
Changes from all commits
2157c01
79d84ce
f532853
85c7740
8df8499
fb4d357
eaa23a5
eedf8a5
d1c049d
4daeb7c
34a89a5
7b046e8
234f440
cc1c178
39e208e
4e97b25
a29ca3e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Readable byte streams | ||
description: Readable byte streams allow you to efficiently read bytes from a stream into a buffer without incurring extra copies. | ||
spec: https://streams.spec.whatwg.org/ | ||
caniuse: streams | ||
group: streams | ||
status: | ||
compute_from: | ||
- api.ReadableStreamBYOBReader | ||
compat_features: | ||
- api.ReadableByteStreamController | ||
- api.ReadableByteStreamController.byobRequest | ||
- api.ReadableByteStreamController.close | ||
- api.ReadableByteStreamController.desiredSize | ||
- api.ReadableByteStreamController.enqueue | ||
- api.ReadableByteStreamController.error | ||
- api.ReadableStreamBYOBReader | ||
- api.ReadableStreamBYOBReader.ReadableStreamBYOBReader | ||
- api.ReadableStreamBYOBReader.cancel | ||
- api.ReadableStreamBYOBReader.closed | ||
- api.ReadableStreamBYOBReader.read | ||
- api.ReadableStreamBYOBReader.releaseLock | ||
- api.ReadableStreamBYOBReader.releaseLock.reject_pending_read_request | ||
- api.ReadableStreamBYOBRequest | ||
- api.ReadableStreamBYOBRequest.respond | ||
- api.ReadableStreamBYOBRequest.respondWithNewView | ||
- api.ReadableStreamBYOBRequest.view |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Generated from: readable-byte-streams.yml | ||
# Do not edit this file by hand. Edit the source file instead! | ||
|
||
status: | ||
baseline: false | ||
support: | ||
chrome: "89" | ||
chrome_android: "89" | ||
edge: "89" | ||
firefox: "102" | ||
firefox_android: "102" | ||
compat_features: | ||
# ⬇️ Same status as overall feature ⬇️ | ||
# baseline: false | ||
# support: | ||
# chrome: "89" | ||
# chrome_android: "89" | ||
# edge: "89" | ||
# firefox: "102" | ||
# firefox_android: "102" | ||
- api.ReadableByteStreamController | ||
- api.ReadableByteStreamController.byobRequest | ||
- api.ReadableByteStreamController.close | ||
- api.ReadableByteStreamController.desiredSize | ||
- api.ReadableByteStreamController.enqueue | ||
- api.ReadableByteStreamController.error | ||
- api.ReadableStreamBYOBReader | ||
- api.ReadableStreamBYOBReader.ReadableStreamBYOBReader | ||
- api.ReadableStreamBYOBReader.cancel | ||
- api.ReadableStreamBYOBReader.closed | ||
- api.ReadableStreamBYOBReader.read | ||
- api.ReadableStreamBYOBReader.releaseLock | ||
- api.ReadableStreamBYOBRequest | ||
- api.ReadableStreamBYOBRequest.respond | ||
- api.ReadableStreamBYOBRequest.respondWithNewView | ||
- api.ReadableStreamBYOBRequest.view | ||
|
||
# baseline: false | ||
# support: | ||
# chrome: "105" | ||
# chrome_android: "105" | ||
# edge: "105" | ||
# firefox: "102" | ||
# firefox_android: "102" | ||
- api.ReadableStreamBYOBReader.releaseLock.reject_pending_read_request |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,6 @@ | ||||||
name: ReadableStream.from() | ||||||
description: The `ReadableStream.from()` static method wraps iterable and async iterable objects, such as arrays or async generator functions, as a readable stream. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "wraps … as" reads a little funny to me (though I see that MDN uses the same language). What do you think of this instead, which borrows a construction from the
Suggested change
|
||||||
spec: https://streams.spec.whatwg.org/#rs-from | ||||||
group: streams | ||||||
compat_features: | ||||||
- api.ReadableStream.from_static |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Generated from: readablestream-from.yml | ||
# Do not edit this file by hand. Edit the source file instead! | ||
|
||
status: | ||
baseline: false | ||
support: | ||
firefox: "117" | ||
firefox_android: "117" | ||
compat_features: | ||
- api.ReadableStream.from_static |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
name: "ReadableStreamBYOBReader.read(): min option" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm still not sure whether developers think of this as a distinct feature or an embellishment on the BYOB feature above. In other features, we've taken narrow options like this to be "later additions" to an existing feature. Searching Stack Overflow doesn't turn up much for me (though I'm not sure I'm using the right terminology). On the other hand, this is very new, so maybe it's an unsettled question in general. Basically, how sad would you be if we stuffed this compat_features key back into (We're working on some ways to improve this in the data model—to make it easier to split and merge things—so this isn't to say it must always be this way, but this the ongoing negotiation we've had to do in some features.) |
||
description: The `min` option for `ReadableStreamBYOBReader.read(view, options)` sets the minimum number of elements that must be available before the read request will fulfill. | ||
spec: https://streams.spec.whatwg.org/#ref-for-dom-readablestreambyobreaderreadoptions-min%E2%91%A0 | ||
group: streams | ||
compat_features: | ||
- api.ReadableStreamBYOBReader.read.options_min_parameter |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Generated from: readablestreambyobreader-read-min.yml | ||
# Do not edit this file by hand. Edit the source file instead! | ||
|
||
status: | ||
baseline: false | ||
support: | ||
firefox: "134" | ||
firefox_android: "134" | ||
compat_features: | ||
- api.ReadableStreamBYOBReader.read.options_min_parameter |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,8 @@ | ||||||
name: Transferable streams | ||||||
description: Streams are transferable objects, which can be moved between contexts such as workers. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "Between" implies two things and I think making it explicit is nice. Does this wording work for you?
Suggested change
|
||||||
spec: https://streams.spec.whatwg.org/#rs-transfer | ||||||
group: streams | ||||||
compat_features: | ||||||
- api.ReadableStream.transferable | ||||||
- api.TransformStream.transferable | ||||||
- api.WritableStream.transferable |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Generated from: transferable-streams.yml | ||
# Do not edit this file by hand. Edit the source file instead! | ||
|
||
status: | ||
baseline: false | ||
support: | ||
chrome: "87" | ||
chrome_android: "87" | ||
edge: "87" | ||
firefox: "103" | ||
firefox_android: "103" | ||
compat_features: | ||
- api.ReadableStream.transferable | ||
- api.TransformStream.transferable | ||
- api.WritableStream.transferable |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,6 @@ | ||||||
name: "TransformStream: transformer.cancel method" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To align with our naming conventions here:
Suggested change
|
||||||
description: The `cancel` method of a `TransformStream` transformer cleans up resources when the readable side is cancelled or the writable side is aborted. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Style nits:
Suggested change
|
||||||
spec: https://streams.spec.whatwg.org/#dom-transformer-cancel | ||||||
group: streams | ||||||
compat_features: | ||||||
- api.TransformStream.TransformStream.transformer_cancel |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Generated from: transformstream-transformer-cancel.yml | ||
# Do not edit this file by hand. Edit the source file instead! | ||
|
||
status: | ||
baseline: false | ||
support: {} | ||
compat_features: | ||
- api.TransformStream.TransformStream.transformer_cancel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For most features, we try to mention the most likely "entry point" to that feature in the description and then frame the feature in that context—in other words, what would a developer literally do with this feature? That said, I don't know a lot about this feature, other than what I've skimmed from the MDN and web.dev articles—so I'm really leaning on your input here. What do you think of something along these lines?
Also, given our discussion so far, I figure we should mention BYOB here. We have an "also known as" convention for feature names that I've suggested here.