This PR primarily focuses on improving the handling of relative imports in the src/Import.ts. It adds a condition to handle cases where the importing file is in a directory with the same name as the file it is importing from a directory above it.
// --- BEFORE
// file doing the importing: ./foo/bar
// file being imported: ./foo
// resulting import statement: ./
// --- AFTER
// file doing the importing: ./foo/bar
// file being imported: ./foo
// resulting import statement: ../foo
It also includes minor changes to the src/standalone-tests.ts and src/Import-tests.ts files to test the import functionality.
This PR primarily focuses on improving the handling of relative imports in the
src/Import.ts
. It adds a condition to handle cases where the importing file is in a directory with the same name as the file it is importing from a directory above it.It also includes minor changes to the
src/standalone-tests.ts
andsrc/Import-tests.ts
files to test the import functionality.