codeceptjs 4.0.1-beta.34 → 4.0.1-beta.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/utils/typescript.js +2 -2
- package/package.json +1 -1
package/lib/utils/typescript.js
CHANGED
|
@@ -119,7 +119,7 @@ const __dirname = __dirname_fn(__filename);
|
|
|
119
119
|
let jsContent = transpileTS(filePath)
|
|
120
120
|
|
|
121
121
|
// Find all relative TypeScript imports in this file
|
|
122
|
-
const importRegex = /from\s+['"](
|
|
122
|
+
const importRegex = /from\s+['"](\.[^'"]+?)(?:\.ts)?['"]/g
|
|
123
123
|
let match
|
|
124
124
|
const imports = []
|
|
125
125
|
|
|
@@ -170,7 +170,7 @@ const __dirname = __dirname_fn(__filename);
|
|
|
170
170
|
|
|
171
171
|
// After all dependencies are transpiled, rewrite imports in this file
|
|
172
172
|
jsContent = jsContent.replace(
|
|
173
|
-
/from\s+['"](
|
|
173
|
+
/from\s+['"](\.[^'"]+?)(?:\.ts)?['"]/g,
|
|
174
174
|
(match, importPath) => {
|
|
175
175
|
let resolvedPath = path.resolve(fileBaseDir, importPath)
|
|
176
176
|
const originalExt = path.extname(importPath)
|