-
Notifications
You must be signed in to change notification settings - Fork 133
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
Publishing specs for Buffer
and EventEmitter
#1176
Comments
It would be awesome if node also published a conformance test suite, so other implementations can verify their correctness. |
I'd be very supporting for this initiative. Both Buffer and EventEmitter are so widespread in usage that a polyfill for them in browsers is often needed as well. |
+1 from me as well. For
I think we'll have to define/document the review process needed for changes that would be considered breaking. |
Discussed in last TSC meeting, removing agenda tag |
Overall there were no objections raised on the TSC call but obviously there are many details to work through. My next step will be to draft a proposed spec for the |
@jasnell since I think this was mostly an FYI which has been accomplished a year ago, do we need the open issue in the TSC repo (just doing some cleanup). I assume any drarft specs etc. may be in a different repo/covered in other PRs. |
@jasnell Was a draft published or a repo for API specifications created? |
The
Buffer
andEventEmitter
objects in Node.js are quite possibly the most used APIs in the npm ecosystem. Thebuffer
polyfill on npm sees over 45 million downloads per week. Deno has decided to implement an entire Node.js compatibility layer that includes bothBuffer
andEventEmitter
. Other JavaScript runtimes (like Cloudflare Workers) that seek to support the existing ecosystem of npm modules have to make a decision about implementing these non-standard Node.js specific APIs. If they don't, they end up restricting themselves and what their users can do. While there are standardize alternatives (e.g. typed arrays and EventTarget),Buffer
andEventEmitter
are so broadly used as to qualify as de facto standards.What I'd like to propose is that we publish specifications for the
EventEmitter
andBuffer
APIs such that they can (a) be reliably implemented in other platforms with compatible semantics and (most importantly) ... (b) won't have any breaking changes made to the APIs decided unilaterally only by Node.js without seeking input from other implementing runtimes.I'd like to get this on the TSC agenda for discussion.
The text was updated successfully, but these errors were encountered: