From 9cfeec0bb9857e6ab284b5c744fb492f48f6fa64 Mon Sep 17 00:00:00 2001 From: Guy Bedford Date: Thu, 18 Sep 2025 17:37:02 -0700 Subject: [PATCH 1/2] remove process unsupported section --- .../workers/runtime-apis/nodejs/process.mdx | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/src/content/docs/workers/runtime-apis/nodejs/process.mdx b/src/content/docs/workers/runtime-apis/nodejs/process.mdx index d63712793238675..6d2d475c5eab8c8 100644 --- a/src/content/docs/workers/runtime-apis/nodejs/process.mdx +++ b/src/content/docs/workers/runtime-apis/nodejs/process.mdx @@ -58,7 +58,7 @@ were set previously and will cause unexpected behavior for other Workers running same isolate. Specifically, it would cause inconsistency with the `process.env` object when accessed via named imports. -```js +````js import * as process from 'node:process'; import { env } from 'node:process'; @@ -82,7 +82,7 @@ console.log(env["FOO"]); // Prints: bar nextTick(() => { console.log("next tick"); }); -``` +```` ## Stdio @@ -102,18 +102,3 @@ This ensures compatibility with inspector and structured logging outputs. ## Hrtime While [`process.hrtime`](https://nodejs.org/docs/latest/api/process.html#processhrtimetime) high-resolution timer is available, it provides an inaccurate timer for compatibility only. - -## Unsupported Features - -The following `process` properties are currently entirely unsupported and return `undefined`: `binding`, `channel`, `connected`, `debugPort`, `dlopen`, -`exitCode`, `finalization`, `getActiveResourcesInfo`, `hasUncaughtExceptionCaptureCallback`, `kill`, `memoryUsage`, `noDeprecation`, `permission`, -`ref`, `release`, `report`, `resourceUsage`, `send`, `setUncaughtExceptionCaptureCallback`, `sourceMapsEnabled`, `threadCpuUsage`, -`throwDeprecation`, `traceDeprecation`, `unref`. - -These unimplemented features may be feature-detected via conditional gating patterns like: - -```js -if (process.dlopen) { - // use dlopen when available -} -``` From 9cd0f31c570bd674def59105d065d144c2c69d3d Mon Sep 17 00:00:00 2001 From: Guy Bedford Date: Thu, 18 Sep 2025 17:38:53 -0700 Subject: [PATCH 2/2] fixup formatting --- src/content/docs/workers/runtime-apis/nodejs/process.mdx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/content/docs/workers/runtime-apis/nodejs/process.mdx b/src/content/docs/workers/runtime-apis/nodejs/process.mdx index 6d2d475c5eab8c8..59b17aded14ba80 100644 --- a/src/content/docs/workers/runtime-apis/nodejs/process.mdx +++ b/src/content/docs/workers/runtime-apis/nodejs/process.mdx @@ -58,9 +58,9 @@ were set previously and will cause unexpected behavior for other Workers running same isolate. Specifically, it would cause inconsistency with the `process.env` object when accessed via named imports. -````js -import * as process from 'node:process'; -import { env } from 'node:process'; +```js +import * as process from "node:process"; +import { env } from "node:process"; process.env === env; // true! they are the same object process.env = {}; // replace the object! Do not do this! @@ -68,6 +68,7 @@ process.env === env; // false! they are no longer the same object // From this point forward, any changes to process.env will not be reflected in env, // and vice versa! +``` ## `process.nextTick()` @@ -82,7 +83,7 @@ console.log(env["FOO"]); // Prints: bar nextTick(() => { console.log("next tick"); }); -```` +``` ## Stdio