这是indexloc提供的服务,不要输入任何密码
Skip to content

ImportFinder does not track export statements #9828

@goloveychuk

Description

@goloveychuk

Verify canary release

  • I verified that the issue exists in the latest Turborepo canary release.

Link to code that reproduces this issue

if let ModuleDecl::Import(import) = decl {

Which canary version will you have in your reproduction?

master

Enviroment information


Expected behavior

if let ModuleDecl::Import(import) = decl {

ImportFinder should visit export **** from "mod" statements when creating list of dependencies.
You might want to check all list (e.g. TsImportEquals):
https://docs.rs/swc_ecma_ast/5.0.0/swc_ecma_ast/enum.ModuleDecl.html
Also you might want to check require.resolve and import.meta.resolve, which could also affect graph.

Actual behavior

It's currently visiting only import and require statements.

To Reproduce

Create
export * from './mod and run turbo query

file(path: "somefile.ts") {
    absolutePath
    ast
    dependencies(depth: 1 
       emitErrors:true) {
       errors {items {message, reason}}
       files{items{path}}
     }
  }

Additional context

No response
@NicholasLYang gently pinging

Metadata

Metadata

Assignees

Labels

kind: bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions