-
-
Notifications
You must be signed in to change notification settings - Fork 735
typedoc 0.9.0 no longer processes files in tsconfig.json "files" order #617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Interesting. My guess is that the |
After some further testing, I suspect that the |
I was having trouble with that with #587 and CLI-specified files. I think I
have a pretty good idea where to fix this if you don't beat me to it.
…On Oct 10, 2017 7:19 PM, "Brett Vickers" ***@***.***> wrote:
After some further testing, I suspect that the "files" array in
tsconfig.json is being ignored completely. It appears to be processing
all *.ts files in the specified directory, in the order they appear.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#617 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AF9gku9wSDFWDpJduiOx2cxj5kfCINyWks5srAmigaJpZM4P0fdr>
.
|
#610 should fix that |
I added more detail about the issue on #610 for those interested. |
I haven't had a chance to test it yet, but did release 0.10.0 include a fix for this issue? If so, feel free to close it. |
Should be fixed by #610 which was released in v0.11.0 |
I just tried 0.11.0 and this bug still seems to be there. Apparently, #610 did not fix it. When running typedoc, I still see many errors like the following:
This is happening because files are still being processed in the order they appear in the directory (alphabetically). If files were processed in the order they show up in the |
@beevik The #610 PR was to change the read order of the option readers (arguments/tsconfig/typedoc) and NOT the individual loaded file order. Looking at the source for the typedoc reader, its using the Typescript config reader which handles its own load order: const { config } = ts.readConfigFile(fileName, ts.sys.readFile);
...
const { fileNames, options, raw: { typedocOptions }} = ts.parseJsonConfigFileContent(
config,
ts.sys,
Path.resolve(Path.dirname(fileName)),
{},
Path.resolve(fileName)); One option would be to specify the files array in the Example const path = require('path');
const tsconfig = require(path.resolve(__dirname, './tsconfig.json'));
tsconfig.out = path.resolve(__dirname, './docs');
tsconfig.name = 'Source Documentation';
tsconfig.mode = 'modules';
tsconfig.files = [
...
];
module.exports = tsconfig; Im not entirely sure if there is any sorting later on down the typedoc pipeline, but I would suggest starting there. |
So after debugging this a bit, I've discovered a few things. The first thing I've noticed is that typedoc doesn't seem to be reading the EDIT: It seems my best option is to follow a similar idea to the one presented by @pat841. I now have an const path = require('path');
module.exports = require(path.resolve(__dirname, 'path/to/tsconfig.json')); Then, instead of providing the source path on the command line, I do this:
This causes typedoc to process my files in the EDIT 2: Woops, just discovered that typedoc will load the current directory's |
Uh oh!
There was an error while loading. Please reload this page.
In typedoc 0.8.0, the following command:
processes files in the order they appear in the
"files"
array oftsconfig.json
.In typedoc 0.9.0, the same command processes files in the order they appear in the directory, regardless of what's in the
"files"
array oftsconfig.json
. This can lead to compile errors, because order of compile matters.Expected behavior: Files are processed in the order they appear in
tsconfig.json
'sfiles
list.I isolated the issue to 482821c . Before that commit, everything still works the way 0.8.0 did. The associated PR is #587
The text was updated successfully, but these errors were encountered: