Skip to content

Lower cased globalFqn property in some ExternalModule and ExternalDeclaration nodes #34

@JohT

Description

@JohT

Hi 👋

I've discovered that some ExternalModule and ExternalDeclaration nodes have a lower-cased globalFqn property.
Is that intended or a technical necessity? Or might that be a bug?

There is for example an ExternalModule with lower-cased globalFqn = /users/johnny/repositories/git/react-router/packages/react-router/lib/context.ts. Another one has the original (unchanged) globalFqn = /Users/johnny/Repositories/git/react-router/packages/router/router.ts. (see Example Query 1)

Nodes labelled with ExternalModule and ExternalDeclaration are the only ones that are affected by this as far as i've seen.

Edit: As it seems this also applies to ExternalType nodes. Some of them have a lower-cased property ts.referencedGlobalFqn like "/users/johnny/repositories/git/react-router/packages/react-router/lib/context.ts".RouteObject", some not like "/users/johnny/repositories/git/react-router/packages/react-router/lib/context.ts".RouteObject". (see Example Query 2)

Example Query

 MATCH (ts:TS)
 WHERE ts.globalFqn IS NOT NULL
RETURN labels(ts)
      ,split(ts.globalFqn, '/')[1] AS globalRoot
      ,count(*) as nodeCount
      ,collect(ts.globalFqn)[0..4] AS exampleGlobalFqns

Example Query 2

 MATCH (ts:TS)
  WITH ts, split(ts.referencedGlobalFqn, '/')[1] AS globalRoot
 WHERE globalRoot IS NOT NULL
RETURN labels(ts)
      ,globalRoot
      ,count(*) as nodeCount
      ,collect(ts.referencedGlobalFqn)[0..4] AS exampleReferencedGlobalFqns

Example data

Taken from react-router: ts-output-react-router.json

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions