Repository navigation
feat: backfill various missing node APIs - #75760
Draft
SimonSchick wants to merge 4 commits into
Draft
SimonSchick wants to merge 4 commits into
SimonSchick wants to merge 4 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
pnpm test <package to test>.Select one of these and delete the others:
package.json.References discussion #75608
I'm filing this in good faith having previously contributed these definitions a few years ago and wanting to make the backfill process generally less painful, there are some new features (such as throttle and debounce) that I'm particularly interested in but I think doing a set of larger backfill is generally beneficial for such a foundational definition package.
This PR exclusively adds missing declarations it makes no effort to correct existing ones (eg. function parameters), I deliberately limited the size of the PR but due to the sheer amount of JSDoc it is still quite large, if general consensus is 'too large' I will split it up.
Further I believe splitting these changes up too much adds undue burden on reviewers and would cause release 'spam', ideally changes would be released in sync with the nodejs releases to keep them small, but due to the lack of tight coupling of the types to the actual nodejs repo this has generally been infeasible and bulk backfilling is a more economical approach.
I also added a
CLAUDE.mdSummary of changes (from claude)
Citations
Docs: https://nodejs.org/docs/latest-v26.x/api/ · Changelog: CHANGELOG_V26.md
ZipFileZipEntryZipBuffercreateZipArchivecreateZipArchiveSynczipFilesgetMaxZipContentSizesetMaxZipContentSizecreateMacgetMacsMacBlockList#addCIDR,#addCIDRs,#addAddressesBlockList#removeAddress,#removeRange,#removeSubnet,#removeCIDRBlockList#clear,#size, staticPRIVATE_RANGESBoundSocketOptions.pathBoundSocket#isPipeServer#dropMaxConnectioncreateSlidingWindowHistogramimportHistogramHistogram#exportHistogram#cdf,#ccdf,#countAt,#percentilesAt,#linearBuckets,#logBuckets,#ksTest,#kurtosis,#skewnessHistogram#burnRate,#mannWhitneyTest,#welchTest,#cohensD,#cliffsD,#percentileCI,#ewmaMean,#ewmaStddev,#ewmaErrorRateHistogram#meanCIHistogram#qrdeRecordableHistogram#recordCorrected,#subtractPerformanceResourceTiming#finalResponseHeadersStart,#firstInterimResponseStart,#renderBlockingStatus,#contentType,#contentEncodingStatementSync#close,#[Symbol.dispose]StatementSync#stat,#resetStatsHTTP2_HEADER_*constantsHttp2ServerResponse#writeInformationHttp2Server#timeoutdebouncethrottlemarkPromiseAsHandledMIMEType.parseMIMEType#toJSONopenAsBlobSyncconstants.UV_FS_O_TEMPORARY,UV_FS_O_SHORT_LIVED,UV_FS_O_SEQUENTIAL,UV_FS_O_RANDOMsetHeapProfileNearHeapLimitSerializer#_setTreatArrayBufferViewsAsHostObjects,#_getDataCloneErrorDefaultSerializer#_writeHostObject,DefaultDeserializer#_readHostObjectinitgroupsisDestroyedReadStream#rawModeModuleHooks#[Symbol.dispose]DynamicLibrary#functions'float32'/'float64'type namesentryFileontest:stdout/test:stderrcounts.failedontest:summarypackage.json26.10Notes
zlibZIP API,crypto.createMac/getMacs,v8.setHeapProfileNearHeapLimit,node:ffi(enabled by default since v26.9.0, #65475). Marked@experimental.process.initgroups,counts.failed, v8_-prefixed serializer methods,MIMEType#toJSON,Server#dropMaxConnection,Http2Server#timeout,DynamicLibrary#functions.BlockList#clearandMIMEType.parse; the version is taken from the changelog.Histogram,RecordableHistogram,Http2ServerCommon.timeout,StatementSync,ModuleHooks[Symbol.dispose],TestSummary.counts.failed) affect only hand-written implementations or object literals typed as these interfaces. Existing subclasses overriding the v8_-prefixed methods requireoverrideundernoImplicitOverride.FileHandle#pullSync(--experimental-stream-iter),SourceTextModule#createCachedData(--experimental-vm-modules).tty.ReadStream#setRawModeaccepts'raw' | 'io'since v26.8.0 (#64140);BoundSocket#address()returns astringfor pipe binds (docs).