diff --git a/Testing/Tests/DotImport/package-lock.json b/Testing/Tests/DotImport/package-lock.json deleted file mode 100644 index d548247..0000000 --- a/Testing/Tests/DotImport/package-lock.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "dotimport", - "version": "0.0.0", - "lockfileVersion": 1 -} diff --git a/Testing/Tests/DotImport/package.json b/Testing/Tests/DotImport/package.json deleted file mode 100644 index 697af29..0000000 --- a/Testing/Tests/DotImport/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "dotimport", - "version": "0.0.0", - "description": "", - "main": "src/index.ts", - "type": "module", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC" -} diff --git a/Testing/Tests/DotImport/src/Hello/helloWorld.ts b/Testing/Tests/DotImport/src/Hello/helloWorld.ts deleted file mode 100644 index 7e07397..0000000 --- a/Testing/Tests/DotImport/src/Hello/helloWorld.ts +++ /dev/null @@ -1,5 +0,0 @@ -// DotImport/src/Hello/helloWorld.ts -import { helloString } from '.'; -import { deepEqual } from 'assert'; - -deepEqual(helloString, 'helloWorld', 'helloString does not equal helloWorld'); diff --git a/Testing/Tests/DotImport/src/Hello/index.ts b/Testing/Tests/DotImport/src/Hello/index.ts deleted file mode 100644 index 64b4837..0000000 --- a/Testing/Tests/DotImport/src/Hello/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -// src/Hello/index.ts -export const helloString = 'helloWorld'; diff --git a/Testing/Tests/DotImport/src/index.ts b/Testing/Tests/DotImport/src/index.ts deleted file mode 100644 index 0fa7691..0000000 --- a/Testing/Tests/DotImport/src/index.ts +++ /dev/null @@ -1,21 +0,0 @@ -// Template/src/index.ts - -export async function startApp(): Promise { - console.log('Starting DotImport test'); - - console.log('Loading randomLoader'); - - const { loadRandom } = await import('./randomLoader'); - - console.log('Running loadRandom()'); - - const result = await loadRandom(); - - console.log('loadRandom() result: ', result); - - console.debug('Done'); -} - -startApp(); - -export {}; diff --git a/Testing/Tests/DotImport/src/randomLoader.ts b/Testing/Tests/DotImport/src/randomLoader.ts deleted file mode 100644 index fb35a50..0000000 --- a/Testing/Tests/DotImport/src/randomLoader.ts +++ /dev/null @@ -1,10 +0,0 @@ -// DotImport/src/randomLoader.ts -export async function loadRandom(): Promise { - console.log('Importing Hello/helloWorld.ts'); - - await import('./Hello/helloWorld'); - - console.log('Imported Hello/helloWorld.ts'); - - return true; -} diff --git a/Testing/Tests/DotImport/tsconfig.json b/Testing/Tests/DotImport/tsconfig.json deleted file mode 100644 index c779ddb..0000000 --- a/Testing/Tests/DotImport/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "compilerOptions": { - "target": "ESNext", - "module": "ESNext", - "moduleResolution": "Node", - "allowSyntheticDefaultImports": true - } -} diff --git a/src/index.ts b/src/index.ts index d0420d0..fe220d6 100644 --- a/src/index.ts +++ b/src/index.ts @@ -17,7 +17,7 @@ import { getTSConfig } from './Utils'; const rootModulePath = `${process.cwd()}/`; const baseURL = pathToFileURL(rootModulePath).href; -const relativePathRegex = /^\.{1,2}[/]?/; +const relativePathRegex = /^\.{1,2}[/]/; const hasExtensionRegex = /\.\w+$/; // TODO: Allow customization of extensions