Skip to content

Commit

Permalink
Fix JSONC configuration files
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit0 committed Jun 22, 2024
1 parent aacfb8e commit 154e09d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- Fixed relative link detection for markdown links containing code in their label, #2606.
- Fixed an issue with packages mode where TypeDoc would use (much) more memory than required, #2607.
- TypeDoc will no longer crash when asked to render highlighted code for an unsupported language, #2609.
- `.jsonc` configuration files are now properly read as JSONC, rather than being passed to `require`.

### Thanks!

Expand Down
2 changes: 1 addition & 1 deletion src/lib/utils/options/readers/typedoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class TypeDocReader implements OptionsReader {
seen.add(file);

let fileContent: any;
if (file.endsWith(".json")) {
if (file.endsWith(".json") || file.endsWith(".jsonc")) {
const readResult = ts.readConfigFile(normalizePath(file), (path) =>
FS.readFileSync(path, "utf-8"),
);
Expand Down

0 comments on commit 154e09d

Please sign in to comment.