Declare the new runtime features in the scanner's literal order

JSON.stringify of the runtime-features record follows the declared field
order in the self-hosted compiler and the literal's insertion order under
Node. warningReplace and stdioExtended were declared before processEvents
but built after it, so the two compilers serialized the record differently
(self-hosting-runtime-features). The interface now lists them in the
literal's order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Malte Ubl
2026-10-18 17:58:04 -07:00
co-authored by Claude Opus 5.5
parent a1576d7c5f
commit 408c63baa2
+4 -2
View File
@@ -16,11 +16,13 @@ export interface RuntimeFeatures {
fileHandle: boolean;
fetch: boolean;
eventTarget: boolean;
/** process.emitWarning is assigned (process.setEmitWarning). */
processEvents: boolean;
/** process.emitWarning is assigned (process.setEmitWarning). Declared
* in the literal's order: JSON.stringify of the features record must
* match between the Node-run and self-hosted compilers. */
warningReplace: boolean;
/** stdin setEncoding / string data listeners / stdio 'resize' events. */
stdioExtended: boolean;
processEvents: boolean;
emitter: boolean;
stream: boolean;
zlib: boolean;