Repository navigation
feat: backfill various missing node APIs - #75760
SimonSchick wants to merge 4 commits into
Conversation
|
@SimonSchick Thank you for submitting this PR! This is a live comment that I will keep updated. 1 package in this PRCode ReviewsBecause this is a widely-used package, a DT maintainer will need to review it before it can be merged. You can test the changes of this PR in the Playground. Status
Once every item on this list is checked, I'll ask you for permission to merge and publish the changes. InactiveThis PR has been inactive for 19 days. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 75760,
"author": "SimonSchick",
"headCommitOid": "70b3a5c61b132f6634914b89deed82d8f30ad289",
"mergeBaseOid": "235aee8e7f30998ceef46f616e4ddeca19db9788",
"lastPushDate": "2026-10-10T06:00:09.000Z",
"lastActivityDate": "2026-10-24T18:32:10.000Z",
"hasMergeConflict": true,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": false,
"tooManyCommits": false,
"tooManyReviews": false,
"popularityLevel": "Critical",
"pkgInfo": [
{
"name": "node",
"version": "26.10",
"kind": "edit",
"files": [
{
"path": "types/node/CLAUDE.md",
"kind": "markdown"
},
{
"path": "types/node/crypto.d.ts",
"kind": "definition"
},
{
"path": "types/node/ffi.d.ts",
"kind": "definition"
},
{
"path": "types/node/fs.d.ts",
"kind": "definition"
},
{
"path": "types/node/http2.d.ts",
"kind": "definition"
},
{
"path": "types/node/module.d.ts",
"kind": "definition"
},
{
"path": "types/node/net.d.ts",
"kind": "definition"
},
{
"path": "types/node/node-tests/crypto.ts",
"kind": "test"
},
{
"path": "types/node/node-tests/ffi.ts",
"kind": "test"
},
{
"path": "types/node/node-tests/fs.ts",
"kind": "test"
},
{
"path": "types/node/node-tests/http2.ts",
"kind": "test"
},
{
"path": "types/node/node-tests/module.ts",
"kind": "test"
},
{
"path": "types/node/node-tests/net.ts",
"kind": "test"
},
{
"path": "types/node/node-tests/perf_hooks.ts",
"kind": "test"
},
{
"path": "types/node/node-tests/process.ts",
"kind": "test"
},
{
"path": "types/node/node-tests/sqlite.ts",
"kind": "test"
},
{
"path": "types/node/node-tests/stream.ts",
"kind": "test"
},
{
"path": "types/node/node-tests/test.ts",
"kind": "test"
},
{
"path": "types/node/node-tests/tty.ts",
"kind": "test"
},
{
"path": "types/node/node-tests/util.ts",
"kind": "test"
},
{
"path": "types/node/node-tests/v8.ts",
"kind": "test"
},
{
"path": "types/node/node-tests/zlib.ts",
"kind": "test"
},
{
"path": "types/node/package.json",
"kind": "package-meta-ok"
},
{
"path": "types/node/perf_hooks.d.ts",
"kind": "definition"
},
{
"path": "types/node/process.d.ts",
"kind": "definition"
},
{
"path": "types/node/sqlite.d.ts",
"kind": "definition"
},
{
"path": "types/node/stream.d.ts",
"kind": "definition"
},
{
"path": "types/node/test.d.ts",
"kind": "definition"
},
{
"path": "types/node/tty.d.ts",
"kind": "definition"
},
{
"path": "types/node/util.d.ts",
"kind": "definition"
},
{
"path": "types/node/v8.d.ts",
"kind": "definition"
},
{
"path": "types/node/zlib.d.ts",
"kind": "definition"
}
],
"owners": [
"Microsoft",
"jkomyno",
"r3nya",
"btoueg",
"touffy",
"mohsen1",
"galkin",
"eps1lon",
"WilcoBakker",
"trivikr",
"yoursunny",
"ExE-Boss",
"peterblazejewicz",
"addaleax",
"NodeJS",
"LinusU",
"wafuwafu13",
"mcollina",
"Semigradsky",
"Renegade334",
"anonrig"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Critical"
}
],
"reviews": [],
"mainBotCommentID": 6179804120,
"ciResult": "fail",
"ciUrl": "https://github.com/DefinitelyTyped/DefinitelyTyped/commit/70b3a5c61b132f6634914b89deed82d8f30ad289/checks?check_suite_id=103049434285"
} |
|
🔔 @microsoft @jkomyno @r3nya @btoueg @Touffy @mohsen1 @galkin @eps1lon @WilcoBakker @trivikr @yoursunny @ExE-Boss @peterblazejewicz @addaleax @nodejs @LinusU @wafuwafu13 @mcollina @Semigradsky @Renegade334 @anonrig — please review this PR in the next few days. Be sure to explicitly select |
|
@SimonSchick The CI build failed! Please review the logs for more information. Once you've pushed the fixes, the build will automatically re-run. Thanks! Note: builds that are failing do not end up on the list of PRs for the DT maintainers to review. |
|
@peterblazejewicz can I get some feedback on this? |
|
@SimonSchick Unfortunately, this pull request currently has a merge conflict 😥. Please update your PR branch to be up-to-date with respect to master. Have a nice day! |
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).