Skip to content
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

CI: Fix intermittent docs build failures #1307

Merged
merged 2 commits into from
Apr 23, 2024
Merged

Conversation

adamziel
Copy link
Collaborator

@adamziel adamziel commented Apr 23, 2024

What is this PR doing?

Building the documentation page often fails. This PR is an exploration to fix it. It:

  • Patches the typedoc library in node_modules as otherwise it won't work with TypeScript 5.4 🙈
  • Removes non-essential TypeDoc plugins (link API reference to MDN, cross-link Typedoc modules)
  • Copies the rollup.d.ts files to dist instead of moving them. TypeDoc, apparently, expects to find them in their original location:
error TS6053: File '/home/runner/work/wordpress-playground/wordpress-playground/packages/php-wasm/web/src/rollup.d.ts' not found.
  The file is in the program because:
    Root file specified for compilation

Testing Instructions

Restart the CI 5 times, confirm the build worked every single time.

@adamziel adamziel requested a review from a team as a code owner April 23, 2024 11:14
@adamziel adamziel changed the title Fix docs build CI: Fix intermittent docs build failures Apr 23, 2024
@adamziel adamziel merged commit cceb62c into update-typescript Apr 23, 2024
5 checks passed
@adamziel adamziel deleted the fix-docs-build-2 branch April 23, 2024 11:46
adamziel added a commit that referenced this pull request Apr 23, 2024
Related to #1287

TypeScript 5.4.5 (well, technically 5.2) gives us the
[Disposable](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-2.html)
interface for cleaning up resources.

Also includes the changes from [CI: Fix intermittent docs build
failures](#1307):

Building the documentation page often fails. This PR is an exploration
to fix it. It:

* Patches the typedoc library in `node_modules` as otherwise it won't
work with TypeScript 5.4 🙈
* Removes non-essential TypeDoc plugins (link API reference to MDN,
cross-link Typedoc modules)
* Copies the `rollup.d.ts` files to `dist` instead of moving them.
TypeDoc, apparently, expects to find them in their original location:

```
error TS6053: File '/home/runner/work/wordpress-playground/wordpress-playground/packages/php-wasm/web/src/rollup.d.ts' not found.
  The file is in the program because:
    Root file specified for compilation
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant