fix(ext/node): use core.loadExtScript for deno_web/deno_io polyfill deps#33798
Merged
littledivy merged 1 commit intoMay 3, 2026
Merged
Conversation
The static imports
import { TextEncoder } from "ext:deno_web/08_text_encoding.js";
import * as io from "ext:deno_io/12_io.js";
import { TextDecoder } from "ext:deno_web/08_text_encoding.js";
added in denoland#33708 (tls.ts) and denoland#33731 (undici.js) make the snapshot build
fail with "Specifier ext:deno_web/08_text_encoding.js was not passed
as an extension module and was not included in the snapshot." Those
modules aren't snapshot deps for ext/node — every other polyfill in
this directory loads them at runtime via core.loadExtScript. Switch to
that pattern, and replace the io.stderr.writeSync debug write in tls.ts
with the existing core.print helper used elsewhere in node polyfills.
Co-authored-by: Divy Srivastava <me@littledivy.com>
Member
|
cc @bartlomieju merging to unblock CI on PRs |
bartlomieju
added a commit
that referenced
this pull request
May 3, 2026
Follow-up to #33784. Converts `ext/fs/30_fs.js` from ESM to IIFE-wrapped lazy-loaded script (`lazy_loaded_js`), eliminating ESM module resolution overhead. Updates three consumers to use `core.loadExtScript()`: - `ext/process/40_process.js` (`FsFile` import) - `ext/node/polyfills/_process/process.ts` (`fs` namespace import) - `runtime/js/90_deno_ns.js` (`fs` namespace import) No cross-extension blockers -- `30_fs.js` already uses `core.loadExtScript()` for its `ext:deno_io` and `ext:deno_web` dependencies (converted in #33798).
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.
Summary
Recent additions of
import(rather thancore.loadExtScript) forext:deno_web/08_text_encoding.jsandext:deno_io/12_io.jsin:ext/node/polyfills/tls.ts(feat(node/tls): support CA certificate introspection and off-thread loading tests #33708)ext/node/polyfills/internal/deps/undici/undici.js(fix(ext/node): support undici dispatcher for allowHTTP1 websocket upgrades #33731)make the snapshot build fail on
main:Those modules aren't snapshot deps for ext/node — every other polyfill that needs them loads via
core.loadExtScript. Switch the two new imports to that pattern, and replaceio.stderr.writeSync(new TextEncoder().encode(...))intls.tswith the existingcore.print(..., true)helper already used inprocess.ts.Verified locally with
cargo build -p deno_snapshots.Test plan