dotnet / docfx

Static site generator for .NET API documentation.
https://dotnet.github.io/docfx/
MIT License
4.09k stars 866 forks source link

chore: Remove `jest` dependencies #10301

Closed filzrev closed 1 month ago

filzrev commented 1 month ago

This PR remove jest related package dependencies. And migrate tests to run with Node.js build-in Test Runner.

This changes is needed to update TypeScript module versions. (https://github.com/dotnet/docfx/issues/10229)

What's changed in this PR

filzrev commented 1 month ago

Add following commits to resolve warning/errors.

1. chore: Run sass-migrator to fix scss warnings (53be532)

On npm run build steps. A lot of warnings are recorded. And recommended to run sass-migrator command.

So I've run following steps.

  1. Run npm install -g sass-migrator command
  2. Run sass-migrator --migrate-deps --load-path="../../node_modules" module docfx.scss command
  3. Modify code styles

2. chore: suppress stylelint error (49827a5)

When running npm run line step. stylelint report errors. that indicate following lines are redundant. https://github.com/dotnet/docfx/blob/main/templates/modern/src/layout.scss#L193-L194

I can’t determine whether it is a correct or false positive. So suppress error with comment.

3. chore: remove wild card that is not supported on windows with node20(49827a5) On windows environment. It seems wildcard is not supported when running on Node 20. https://github.com/nodejs/node/issues/50658

So I've removed wildcard from file name. Node 22 is expected to be LTS in the week of October 29th. This commit will be reverted later.