(path)
| 7978 | } |
| 7979 | ts.getNormalizedAbsolutePath = getNormalizedAbsolutePath; |
| 7980 | function normalizePath(path) { |
| 7981 | path = normalizeSlashes(path); |
| 7982 | // Most paths don't require normalization |
| 7983 | if (!relativePathSegmentRegExp.test(path)) { |
| 7984 | return path; |
| 7985 | } |
| 7986 | // Some paths only require cleanup of `/./` or leading `./` |
| 7987 | var simplified = path.replace(/\/\.\//g, "/").replace(/^\.\//, ""); |
| 7988 | if (simplified !== path) { |
| 7989 | path = simplified; |
| 7990 | if (!relativePathSegmentRegExp.test(path)) { |
| 7991 | return path; |
| 7992 | } |
| 7993 | } |
| 7994 | // Other paths require full normalization |
| 7995 | var normalized = getPathFromPathComponents(reducePathComponents(getPathComponents(path))); |
| 7996 | return normalized && hasTrailingDirectorySeparator(path) ? ensureTrailingDirectorySeparator(normalized) : normalized; |
| 7997 | } |
| 7998 | ts.normalizePath = normalizePath; |
| 7999 | function getPathWithoutRoot(pathComponents) { |
| 8000 | if (pathComponents.length === 0) |
no test coverage detected
searching dependent graphs…