Skip to content

[wip] feat: implement web streams#1214

Closed
Sam Gammon (sgammon) wants to merge 1 commit intomainfrom
feat/streams-v2
Closed

[wip] feat: implement web streams#1214
Sam Gammon (sgammon) wants to merge 1 commit intomainfrom
feat/streams-v2

Conversation

@sgammon
Copy link
Copy Markdown
Member

@sgammon Sam Gammon (sgammon) commented Feb 16, 2025

Draft Powered by Pull Request Badge

Summary

Implements types like ReadableStream and WritableStream from the Web Streams API. This is our last remaining suite of polyfilled types, so this PR also begins to eliminate infra around our polyfills.

  • ReadableStream
    • ReadableStreamSource
    • ReadableByteStreamController
    • ReadableStreamDefaultController
  • WritableStream
  • TransformStream

@sgammon Sam Gammon (sgammon) added 🚧 WIP Works-in-progress. Blocks merge lang:javascript Issues relating to JavaScript api:node Node API and stdlib labels Feb 16, 2025
@sgammon Sam Gammon (sgammon) self-assigned this Feb 16, 2025
@sgammon Sam Gammon (sgammon) linked an issue Feb 16, 2025 that may be closed by this pull request
@sgammon Sam Gammon (sgammon) force-pushed the feat/streams-v2 branch 2 times, most recently from 5ad4429 to e614541 Compare February 16, 2025 07:38
@sgammon Sam Gammon (sgammon) changed the title feat: implement web streams [WIP] feat: implement web streams Feb 17, 2025
Signed-off-by: Sam Gammon <sam@elide.dev>
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 20, 2025

Codecov Report

Attention: Patch coverage is 20.20202% with 79 lines in your changes missing coverage. Please review.

Project coverage is 52.80%. Comparing base (c00e776) to head (5e40656).
Report is 135 commits behind head on main.

Files with missing lines Patch % Lines
...ls/intrinsics/js/webstreams/WebStreamsIntrinsic.kt 20.00% 52 Missing ⚠️
...tlin/elide/runtime/intrinsics/js/ReadableStream.kt 0.00% 8 Missing ⚠️
...e/runtime/intrinsics/js/stream/StreamSourceType.kt 0.00% 8 Missing ⚠️
.../runtime/gvm/internals/vfs/EmbeddedGuestVFSImpl.kt 33.33% 1 Missing and 1 partial ⚠️
...trinsics/js/stream/ReadableByteStreamController.kt 0.00% 2 Missing ⚠️
...nsics/js/stream/ReadableStreamDefaultController.kt 0.00% 2 Missing ⚠️
...main/kotlin/elide/runtime/plugins/js/JavaScript.kt 50.00% 1 Missing and 1 partial ⚠️
...in/elide/runtime/plugins/AbstractLanguagePlugin.kt 0.00% 1 Missing ⚠️
...ntime/intrinsics/js/stream/CountQueuingStrategy.kt 0.00% 1 Missing ⚠️
...ntime/intrinsics/js/stream/ReadableStreamSource.kt 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1214      +/-   ##
==========================================
- Coverage   53.16%   52.80%   -0.37%     
==========================================
  Files         429      434       +5     
  Lines       17242    17296      +54     
  Branches     3125     3107      -18     
==========================================
- Hits         9167     9133      -34     
- Misses       7055     7138      +83     
- Partials     1020     1025       +5     
Flag Coverage Δ
jvm 52.80% <20.20%> (-0.37%) ⬇️
lib 52.80% <20.20%> (-0.37%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...otlin/elide/runtime/plugins/js/JavaScriptConfig.kt 96.55% <100.00%> (+1.20%) ⬆️
...tlin/elide/runtime/plugins/js/JavaScriptVersion.kt 92.30% <100.00%> (+0.64%) ⬆️
...in/elide/runtime/plugins/AbstractLanguagePlugin.kt 0.00% <0.00%> (ø)
...ntime/intrinsics/js/stream/CountQueuingStrategy.kt 0.00% <0.00%> (ø)
...ntime/intrinsics/js/stream/ReadableStreamSource.kt 0.00% <0.00%> (ø)
.../runtime/gvm/internals/vfs/EmbeddedGuestVFSImpl.kt 68.64% <33.33%> (-1.91%) ⬇️
...trinsics/js/stream/ReadableByteStreamController.kt 0.00% <0.00%> (ø)
...nsics/js/stream/ReadableStreamDefaultController.kt 0.00% <0.00%> (ø)
...main/kotlin/elide/runtime/plugins/js/JavaScript.kt 83.18% <50.00%> (-9.95%) ⬇️
...tlin/elide/runtime/intrinsics/js/ReadableStream.kt 0.00% <0.00%> (ø)
... and 2 more

... and 6 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c00e776...5e40656. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sgammon Sam Gammon (sgammon) changed the title [WIP] feat: implement web streams [wip] feat: implement web streams Mar 9, 2025
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Elide Apr 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api:node Node API and stdlib lang:javascript Issues relating to JavaScript 🚧 WIP Works-in-progress. Blocks merge

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

JS API: Web Streams

1 participant