Resolver CLI
Accept an importer path and a specifier, choose the right resolver branch, keep mode and condition options explicit, and print either text or JSON traces.
Build a local resolver tool that explains how Node turns an importer and specifier into a selected module, which package rules changed the path, and where CommonJS, ESM, caches, cycles, and symlinks can change what a developer sees.
$ npm run fixturesBuilds the package trees used by every trace.
$ npm run resolve -- fixtures/generated/app/src/index.cjs ./localShows extension probing and package boundary details.
$ npm run resolve -- fixtures/generated/app/src/index.cjs pkg-exports/featureWalks the package exports decision path.
$ npm run cache -- fixtures/generated/cycles/a.cjs --format jsonRecords loaded modules and cycle shape.
$ npm run inspect-package -- fixtures/generated/appPrints package metadata the resolver consumed.
Accept an importer path and a specifier, choose the right resolver branch, keep mode and condition options explicit, and print either text or JSON traces.
Generate small packages for main fields, exports maps, blocked subpaths, conditions, ESM, CJS, dual packages, cache cases, cycles, shadowing, and symlinks.
Record path probes, node_modules search directories, package metadata, selected export targets, condition checks, selected format, warnings, and errors.
Write text, JSON, Markdown, and self-contained HTML reports, plus cache graphs, cycle evidence, symlink notes, and interop warnings.
The build starts with the CLI contract and ends with shareable reports. Each phase adds one resolver branch, one runtime observation path, or one report surface.
A CLI shell that accepts the resolver command, prints help, validates flags, and emits a first report shape.
A fixture workspace whose package tree explains relative imports, built-ins, package lookup, metadata, exports, conditions, interop, cache, cycles, and symlinks.
A path resolver that shows every attempted candidate before a selected file or a clear missing-path error.
A built-in branch that resolves fs, path, node:fs, and node:path with no filesystem attempts.
A bare package lookup trace that shows the full upward search list and the selected package root.
A package entry trace that explains the selected file, fallback path, package boundary, and module format.
An exports resolver that shows matched keys, selected targets, hidden subpaths, and invalid export-target failures.
A condition trace that makes branch order visible and shows why changing mode or custom conditions changes the result.
A mode-aware resolver that can show why the same specifier resolves differently under require and import.
Interop warnings that separate resolution success from consumption risk and include evidence plus a suggested fix path.
A runtime cache report that shows loaded modules, child edges, repeated requests, and cache-hit evidence from the observed child process.
A cache graph with nodes, edges, cycle paths, closing edges, and partial-export observations.
Symlink evidence that compares lookup spelling, real filesystem target, and identity paths for workspace-style packages.
A final JSON model plus Markdown and HTML reports generated from the same evidence.
Lab 04 treats resolver evidence as data: attempted paths, package metadata, condition branches, warnings, runtime cache graphs, cycle paths, symlink notes, and final reports all come from the same model.
attempts[]exact, extension, directory, and package candidateswarnings[]interop risks with evidence and suggestionserrors[]missing files, blocked exports, and invalid targetsgraph.nodes[]loaded CommonJS module cache entriesgraph.edges[]parent-to-child require relationshipscycles[]ordered circular dependency pathssymlinks[]lookup, realpath, and identity notesmodule-inspector.htmlself-contained diagnostic reportBuy a single volume or lock in every volume at once. Switch between one-reader pricing and team licenses for up to 25 members.
Volume I as EPUB, light and dark PDFs, slides, cheatsheets, and future updates.
Volume I Labs plus its downloadable bundle in one purchase. Save $9.99 vs buying the Digital Bundle and Labs separately.
Volume I long-form builds with checkpoints, hints, debugging notes, and expected output.
The bundle includes seven runtime projects covering process observation, binary storage, streams, module resolution, file watching, async orchestration, and custom protocols.
Lab 04 is included in the Labs bundle and in NodeBook Pro, alongside six more complete runtime projects.