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: Even more language support #3138

Merged
merged 5 commits into from
Aug 26, 2024
Merged

Conversation

nicholas-codecov
Copy link
Contributor

Description

This PR extends support for our file renderer with the following languages:

  • cshtml
  • fortran
  • fsharp
  • powershell
  • solidity
  • swift
  • visual-basic

@codecov-staging
Copy link

codecov-staging bot commented Aug 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3138   +/-   ##
=======================================
  Coverage   98.31%   98.31%           
=======================================
  Files         919      919           
  Lines       14177    14186    +9     
  Branches     3840     3840           
=======================================
+ Hits        13938    13947    +9     
  Misses        234      234           
  Partials        5        5           
Files Coverage Δ
src/shared/utils/prismLanguageMapper.ts 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 54.05% <ø> (ø)
Layouts 98.80% <ø> (ø)
Pages 99.03% <ø> (ø)
Services 99.51% <ø> (ø)
Shared 99.71% <100.00%> (+<0.01%) ⬆️
UI 94.53% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7d7c0cb...477faaf. Read the comment docs.

Copy link

codecov-public-qa bot commented Aug 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.31%. Comparing base (7d7c0cb) to head (477faaf).

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3138   +/-   ##
=======================================
  Coverage   98.31%   98.31%           
=======================================
  Files         919      919           
  Lines       14177    14186    +9     
  Branches     3921     3840   -81     
=======================================
+ Hits        13938    13947    +9     
  Misses        234      234           
  Partials        5        5           
Files Coverage Δ
src/shared/utils/prismLanguageMapper.ts 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 54.05% <ø> (ø)
Layouts 98.80% <ø> (ø)
Pages 99.03% <ø> (ø)
Services 99.51% <ø> (ø)
Shared 99.71% <100.00%> (+<0.01%) ⬆️
UI 94.53% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7d7c0cb...477faaf. Read the comment docs.

@codecov-staging
Copy link

codecov-staging bot commented Aug 20, 2024

Bundle Report

Changes will increase total bundle size by 16.17kB ⬆️

Bundle name Size Change
gazebo-staging-array-push 5.79MB 16.17kB ⬆️

Copy link

codecov bot commented Aug 20, 2024

Bundle Report

Changes will increase total bundle size by 16.17kB ⬆️

Bundle name Size Change
gazebo-production-array-push 5.79MB 16.17kB ⬆️

@codecov-releaser
Copy link
Contributor

codecov-releaser commented Aug 20, 2024

✅ Deploy preview for gazebo ready!

Previews expire after 1 month automatically.

Storybook

Commit Created Cloud Enterprise
94a8b48 Tue, 20 Aug 2024 12:10:50 GMT Expired Expired
477faaf Tue, 20 Aug 2024 12:29:08 GMT Cloud Enterprise

@codecov-qa
Copy link

codecov-qa bot commented Aug 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.31%. Comparing base (7d7c0cb) to head (477faaf).
Report is 9 commits behind head on main.

✅ All tests successful. No failed tests found.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #3138   +/-   ##
=======================================
  Coverage   98.31%   98.31%           
=======================================
  Files         919      919           
  Lines       14177    14186    +9     
  Branches     3921     3926    +5     
=======================================
+ Hits        13938    13947    +9     
  Misses        234      234           
  Partials        5        5           
Files Coverage Δ
src/shared/utils/prismLanguageMapper.ts 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 54.05% <ø> (ø)
Layouts 98.80% <ø> (ø)
Pages 99.03% <ø> (ø)
Services 99.51% <ø> (ø)
Shared 99.71% <100.00%> (+<0.01%) ⬆️
UI 94.53% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7d7c0cb...477faaf. Read the comment docs.

Copy link

codecov bot commented Aug 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.31%. Comparing base (7d7c0cb) to head (477faaf).
Report is 9 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##               main      #3138   +/-   ##
===========================================
  Coverage   98.31000   98.31000           
===========================================
  Files           919        919           
  Lines         14177      14186    +9     
  Branches       3926       3840   -86     
===========================================
+ Hits          13938      13947    +9     
  Misses          234        234           
  Partials          5          5           
Files Coverage Δ
src/shared/utils/prismLanguageMapper.ts 100.00% <100.00%> (ø)
Components Coverage Δ
Assets 54.05% <ø> (ø)
Layouts 98.80% <ø> (ø)
Pages 99.03% <ø> (ø)
Services 99.51% <ø> (ø)
Shared 99.71% <100.00%> (+<0.01%) ⬆️
UI 94.53% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7d7c0cb...477faaf. Read the comment docs.

@@ -17,6 +17,9 @@ import Prism from 'prism-react-renderer/prism'
*/
require('prismjs/components/prism-csharp')
require('prismjs/components/prism-dart')
require('prismjs/components/prism-cshtml')
Copy link
Contributor

Choose a reason for hiding this comment

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

just some food for thought: is it possible to load these on-demand after matching the file extension?
its also weird that you are using require here instead of bare import statements. is there a particular reason for that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Uhh was just following along with the example that they provided in the documentation for the package we're using, it seems like just replacing require with import everything works fine. Gonna quickly make the change to only load in the language required.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually my "quick change" is a bit more involved, I think I'll merge what I have now, and tidy things up with your suggestion afterwards, sound all good to you @Swatinem ?

@nicholas-codecov nicholas-codecov added this pull request to the merge queue Aug 26, 2024
Merged via the queue into main with commit 6032eb0 Aug 26, 2024
61 checks passed
@nicholas-codecov nicholas-codecov deleted the feat-even-more-languages-added branch August 26, 2024 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants