dsherret / dsherret/ts-morph

Is it possible to resolve node_modules?

Open
#1,617 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
6.2k
Forks
238
Avg merge
2m
Merged PRs (30d)
1

Description

Hi,

I have a project where I need to determine whether the module `fs` is imported into a codebase. This must include the node_modules too.
So far I've been using `addSourceFileAtPath` with the codebase's entry and the dependencies resolved entries.

But as far as I can tell `resolveSourceFileDependencies` does not resolve the node_modules' imports.

Do you know how I can resolve the full codebase?

Contributor guide

Open the contributing guide

Research direction

Start by tracing resolveSourceFileDependencies and the use of addSourceFileAtPath for the entry and dependency files. Confirm whether node_modules imports are intentionally excluded and document or implement the supported way to resolve the full codebase; no files or tests are named in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
compilers, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.