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
Reformats real source via oxfmt and clears the lint errors that gated the push: node:os/node:path default + dotted imports, tolerantTimeout for the e2e per-test timeout, Record casts instead of inline import() types, and the cached-instance test no longer builds its expected value from the src-imported requireBuiltin. Lint 0 errors; module + e2e tests pass.
Copy file name to clipboardExpand all lines: src/node/module.ts
+15-15Lines changed: 15 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
1
/**
2
-
* @file Accessors for `node:module` that work across runtimes.
3
-
*
4
-
* Ambient `require` is bound in CommonJS but unbound in ESM and inside
5
-
* ahead-of-time-compiled package modules (e.g. Perry), where reading it throws.
6
-
* And Perry's `require('module')` value omits `isBuiltin`. So instead of the
7
-
* ambient `require('module')` lazy-loader, `isBuiltin`/`createRequire` are
8
-
* imported as named values from the bare `module` specifier — which resolves on
9
-
* Node and Perry, and which browser bundlers can stub via resolve.fallback (a
10
-
* `node:` prefix would throw UnhandledSchemeError there).
2
+
* @file Accessors for `node:module` that work across runtimes. Ambient
3
+
* `require` is bound in CommonJS but unbound in ESM and inside
4
+
* ahead-of-time-compiled package modules (e.g. Perry), where reading it
5
+
* throws. And Perry's `require('module')` value omits `isBuiltin`. So instead
6
+
* of the ambient `require('module')` lazy-loader, `isBuiltin`/`createRequire`
7
+
* are imported as named values from the bare `module` specifier — which
8
+
* resolves on Node and Perry, and which browser bundlers can stub via
9
+
* resolve.fallback (a `node:` prefix would throw UnhandledSchemeError
10
+
* there).
11
11
*/
12
12
13
13
// oxlint-disable-next-line unicorn/prefer-node-protocol -- bare `module` is browser-stubbable (resolve.fallback / browser field); a `node:` prefix breaks browser bundles. Named exports resolve on Node + Perry.
0 commit comments