sapling icon indicating copy to clipboard operation
sapling copied to clipboard

Module not processed correctly if directory name in path contains "."

Open MajorLift opened this issue 4 years ago • 0 comments

Steps to reproduce the behavior:

A. Module not recognized as file

  1. Load a js/ts file containing a static import statement where the source path contains one or more directories using "." in its name e.g. import { foo, bar } from '../example.directory/module';
  2. The imported live bindings show up on the Sapling tree as having been exported from non-files.
Screen Shot 2022-02-08 at 10 48 01

B. Input file node flagged as error

  1. Load js/ts file into Sapling that has a path containing one or more directories "." with in its name.
  2. Root node is flagged with error coloring (but open file icon is functional).
Screen Shot 2022-02-09 at 14 39 46

Expected behavior

File path parsing module handles this edge case correctly and icons for opening source files show up on the relevant Sapling tree nodes with no errors.

Desktop:

  • OS: Darwin Kernel Version 21.3.0; root:xnu-8019.80.24~20/RELEASE_ARM64_T8101
  • Version: v1.2.0

MajorLift avatar Feb 08 '22 19:02 MajorLift