Skip to content

Commit

Permalink
Fix automatic declaration file resolution on Windows
Browse files Browse the repository at this point in the history
Ref: #2416 (more to do here)
  • Loading branch information
Gerrit0 committed Nov 26, 2023
1 parent deae36a commit 124354c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

### Bug Fixes

- Fixed automatic declaration file resolution on Windows, #2416.
- Fixed default option values on options declared by plugins in packages mode, #2433.
- `gitRevision` will now be replaced in `sourceLinkTemplate`, #2434.
- Improved handling of function-modules created with `Object.assign`, #2436.
Expand Down
8 changes: 5 additions & 3 deletions src/lib/models/reflections/ReflectionSymbolId.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,11 @@ export function addInferredDeclarationMapPaths(
const declDir = opts.declarationDir || opts.outDir || rootDir;

for (const file of files) {
const mapFile = resolve(declDir, relative(rootDir, file)).replace(
/\.([cm]?[tj]s)x?$/,
".d.$1",
const mapFile = normalizePath(
resolve(declDir, relative(rootDir, file)).replace(
/\.([cm]?[tj]s)x?$/,
".d.$1",
),
);
declarationMapCache.set(mapFile, file);
}
Expand Down

0 comments on commit 124354c

Please sign in to comment.