You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Bridge fs.ts `bridgeCall()` helper wraps applySyncPromise calls with ENOENT/EACCES/EEXIST error re-creation — use it for ALL new bridge fs methods
111
111
- runtime-node has two VFS adapters (createKernelVfsAdapter, createHostFallbackVfs) that both need new VFS methods forwarded
112
112
- diagnostics_channel is Tier 4 (deferred) with a custom no-op stub in require-setup.ts — channels report no subscribers, publish is no-op; needed for Fastify compatibility
113
+
- Sandbox fetch() accepts Request objects (not just strings/URLs) — axios fetch adapter passes Request to fetch(); extract .url/.method/.headers
114
+
- Sandbox process has Symbol.toStringTag = "process" — required by axios/libraries that check Object.prototype.toString.call(process)
113
115
- Fastify fixture uses `app.routing(req, res)` for programmatic dispatch — avoids light-my-request's deep ServerResponse dependency; `app.server.emit("request")` won't work because sandbox Server lacks full EventEmitter
114
116
- Sandbox Server class needs `setTimeout`, `keepAliveTimeout`, `requestTimeout` properties for framework compatibility — added as no-ops
115
117
- Moving a module from Unsupported (Tier 5) to Deferred (Tier 4) requires changes in: module-resolver.ts, require-setup.ts, node-stdlib.md contract, and adding BUILTIN_NAMED_EXPORTS entry
- packages/secure-exec-core/src/bridge/network.ts — fixed fetch() to accept Request objects (extract url/method/headers from Request input)
2245
+
- docs/nodejs-compatibility.mdx — added axios to Tested Packages table
2246
+
- **Learnings for future iterations:**
2247
+
- axios adapter selection: default order is ['xhr', 'http', 'fetch']; sandbox XHR is polyfill-based and unreliable, http adapter uses follow-redirects which has incompatible emit patterns, fetch adapter works best
2248
+
- axios http adapter checks `utils.kindOf(process) === 'process'` via Object.prototype.toString.call — sandbox process object needed Symbol.toStringTag = "process"
2249
+
- axios fetch adapter passes Request objects to fetch(), not just URL strings — sandbox fetch() must handle Request input by extracting .url, .method, .headers
2250
+
- hasBrowserEnv check in axios: `typeof window !== 'undefined' && typeof document !== 'undefined'` — sandbox does NOT define window/document (V8 isolate), so this is false
2251
+
- fixture uses `adapter: "fetch"` to explicitly select fetch adapter — this is valid sandbox-blind Node.js code (fetch adapter works in Node.js 18+)
0 commit comments