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

feat: Remove Node.js runtime dependencies from docfx tools #10066

Merged

Conversation

filzrev
Copy link
Contributor

@filzrev filzrev commented Jul 5, 2024

This PR intended to resolve #9396.

Background

Playwright 1.41 or later supports following environment variables. (It's not documented though)

  • PLAYWRIGHT_NODEJS_PATH
  • PLAYWRIGHT_DRIVER_SEARCH_PATH

So it can remove Node.js runtime from docfx package.
Instead. it can use locally installed Node.js runtime instead.

By this changes. docfx packages size can be reduced from 208MB -> 56 MB

BREAKING CHANGES
This PR remove Node.js runtime bundles.
So it may introduce breaking changes for some users who using docfx without Node.js installation.
(e.g. docker image users)

I'll try to fix official docker image later.
https://github.com/dotnet/docfx/blob/main/Dockerfile

@filzrev
Copy link
Contributor Author

filzrev commented Jul 5, 2024

When using CommandUtility.ExistCommand helper methods.
It need to handle stdout result parse logics.
Because of following reasons.

  • On GitHub runner environment multiple node.js installations found by where command (Windows)
  • it's possible to search node command on current directory by where command.
  • node is prefix string appended by type command (Linux/mac)

So I've reverted code to PATH based search logics.

Copy link
Contributor

@yufeih yufeih left a comment

Choose a reason for hiding this comment

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

Thank you @filzrev !

@yufeih yufeih added the new-feature Makes the pull request to appear in "New Features" section of the next release note label Jul 8, 2024
@yufeih yufeih changed the title chore: Remove Node.js runtime dependencies from docfx tools feat: Remove Node.js runtime dependencies from docfx tools Jul 8, 2024
@yufeih yufeih merged commit b40f492 into dotnet:main Jul 8, 2024
7 checks passed
@filzrev filzrev deleted the chore-remove-nodejs-runtime-dependencies branch September 15, 2024 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature Makes the pull request to appear in "New Features" section of the next release note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exploded package size and quality concerns
2 participants