@@ -7,7 +7,7 @@ OPTIONAL MATCH (class:TS:Class)-[:DECLARES]->(ts)
77 ,reverse (split (reverse (replace (split (ts .globalFqn , '".' )[0 ],'"' , '' )), '/' )[0 ]) AS moduleName
88 ,replace (split (split (ts .globalFqn , '/index' )[0 ], '.default' )[0 ],'"' , '' ) AS modulePathNameWithoutIndexAndDefault
99 ,nullif (split (ts .globalFqn , '".' )[1 ], 'default' ) AS symbolName
10- ,split (nullif (reverse (split (reverse (ts .globalFqn ), '@' ) [0 ]), ts . globalFqn ) , '/' )[0 ] AS namespaceName
10+ ,split (split (reverse (split (reverse (ts .globalFqn ), reverse ( '/node_modules/' )) [0 ]),'@' )[ 1 ] , '/' )[0 ] AS namespaceName
1111 ,(ts .globalFqn contains '/node_modules/' ) AS isNodeModule
1212 ,((NOT ts .globalFqn STARTS WITH '/' ) AND size (split (ts .globalFqn , '/' )) < 3 ) AS isUnresolvedImport
1313 ,reverse (split (reverse (class .globalFqn ), '.' )[0 ]) AS optionalClassName
@@ -26,4 +26,15 @@ OPTIONAL MATCH (class:TS:Class)-[:DECLARES]->(ts)
2626 ,ts .isNodeModule = isNodeModule
2727 ,ts .isUnresolvedImport = isUnresolvedImport
2828 ,ts .isExternalImport = isNodeModule OR isUnresolvedImport
29- RETURN count (* ) AS updatedModules
29+ RETURN count (* ) AS updatedModules
30+ // For debugging
31+ // RETURN namespaceNameWithAtPrefixed AS namespace
32+ // ,modulePathName AS module
33+ // ,moduleName AS moduleName
34+ // ,coalesce(symbolNameWithoutClassName, indexAndExtensionOmittedName) AS name
35+ // ,moduleNameExtensionExtended AS extensionExtended
36+ // ,moduleNameExtension AS extension
37+ // ,isNodeModule AS isNodeModule
38+ // ,isUnresolvedImport AS isUnresolvedImport
39+ // ,isNodeModule OR isUnresolvedImport AS isExternalImport
40+ // LIMIT 50
0 commit comments