Skip to content

fix(node): report directory imports with node error code - #34076

Merged
littledivy merged 4 commits into
mainfrom
orch/issue-87
May 15, 2026
Merged

littledivy merged 4 commits into
mainfrom
orch/issue-87

Conversation

@divybot

@divybot divybot commented May 15, 2026

Copy link
Copy Markdown
Contributor

Closes denoland/orchid#87

Maps local directory imports in the file fetcher to a Node-compatible TypeError with code ERR_UNSUPPORTED_DIR_IMPORT instead of surfacing raw IsADirectory/EISDIR OS errors. The graph loader now propagates that error through module loading.

Tests:

  • cargo fmt --check
  • cargo check -p deno_cache_dir -p deno_resolver
  • cargo test -p deno_cache_dir test_file_fetcher_redirects -- --nocapture
  • ./x test-spec node/esm_dir_import/local_relative

Note: ./x test-compat --list could not run in this checkout because the Node test suite directory is missing.

@littledivy
littledivy merged commit fb16718 into main May 15, 2026
136 checks passed
@littledivy
littledivy deleted the orch/issue-87 branch May 15, 2026 19:36
littledivy added a commit to crowlKats/deno that referenced this pull request Jun 10, 2026
…d#34076)

Closes denoland/orchid#87

Maps local directory imports in the file fetcher to a Node-compatible
TypeError with code ERR_UNSUPPORTED_DIR_IMPORT instead of surfacing raw
IsADirectory/EISDIR OS errors. The graph loader now propagates that
error through module loading.

Tests:
- cargo fmt --check
- cargo check -p deno_cache_dir -p deno_resolver
- cargo test -p deno_cache_dir test_file_fetcher_redirects --
--nocapture
- ./x test-spec node/esm_dir_import/local_relative

Note: ./x test-compat --list could not run in this checkout because the
Node test suite directory is missing.

---------

Co-authored-by: divybot <divybot@users.noreply.github.com>
Co-authored-by: Divy Srivastava <me@littledivy.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants