Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Upgrade @truffle/codec's typedoc to v0.20.36 #4112

Merged
merged 1 commit into from
Jun 15, 2021
Merged

Conversation

gnidan
Copy link
Contributor

@gnidan gnidan commented Jun 15, 2021

This PR removes @gnd/typedoc and replaces it with the latest stable typedoc release.

Few things were broken, which this PR accommodates:

  • typedoc-plugin-external-module-name seems to get broken, which we were using for @module. Fortunately it seems like this tag works without that, though!
  • Decoder re-exports a couple things from codec... to ensure these don't show up, this PR adds typedoc-plugin-remove-references.
  • All the documentation comments for each module/namespace, defined on the export identifier, needed to be moved into those modules themselves, and marked with @packageDocumentation. This PR hopefully got them all!
  • Inside docs/tsconfig and the typedoc config, paths no longer worked as specified relative to the tsconfig's rootDir; instead, this PR updates those to be relative to the docs/ directory itself.
  • Decoder stopped being recognized, so this PR adds that to the include.

@gnidan gnidan force-pushed the codec/upgrade-typedoc branch 2 times, most recently from 1b477d8 to f23ad08 Compare June 15, 2021 03:50
@gnidan gnidan changed the title Upgrade TypeDoc to v0.20.36 Upgrade typedoc to v0.20.36 Jun 15, 2021
@gnidan gnidan changed the title Upgrade typedoc to v0.20.36 Upgrade @truffle/codec's typedoc to v0.20.36 Jun 15, 2021
- Stop using @gnd/typedoc

- Remove typedoc-plugin-external-module-name, since it's now unnecessary
  (and broken)

- Add typedoc-plugin-remove-references to prevent decoder from now
  displaying ExtrasAllowed, et al. (which exist on codec)

- Forward CLI args to `yarn docs`

- Move module documentation comments into the modules themselves

- Ensure all module documentation comments include @packageDocumentation

- Update references inside docs/tsconfig.json's `include` to use proper
  relative path to that file; apparently it doesn't use rootDir anymore?

- Update docs/tsconfig.json to `include` decoder, since somehow it
  stopped finding those files

- Remove now-meaningless options from typedoc config

- Fix typedoc config's reference to our typedoc theme, maybe because
  it's not respecting rootDir?
Copy link
Contributor

@haltman-at haltman-at left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good to me. One additional thing you might want to do -- right now we have a bunch of

import * as Name from "path";
export { Name };

We should, if I'm not mistaken, be able to replace this with

export * as Name from "path";

I think the reason we didn't do this previously was due to it not playing nicely with typedoc. But with these changes I think it should work now? I could be wrong, it could blow up or something, but if you have the time you might want to try it?

Otherwise this seems good. Thanks for doing this!

"mode": "modules",
"module": "commonjs",
"theme": "../../../node_modules/@trufflesuite/typedoc-default-themes/bin/default/",
"includeDeclarations": false,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, why these deleted lines?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those options don't exist anymore!

@gnidan
Copy link
Contributor Author

gnidan commented Jun 15, 2021

I think the reason we didn't do this previously was due to it not playing nicely with typedoc.

I'm not sure - I tried this export * as syntax in another project recently, and it was still broken. Didn't think to try it here; maybe that can be a later change and we'll see?

@gnidan gnidan merged commit 46b90c1 into develop Jun 15, 2021
@gnidan gnidan deleted the codec/upgrade-typedoc branch June 15, 2021 13:33
@gnidan
Copy link
Contributor Author

gnidan commented Jun 15, 2021

Thanks Harry!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants