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

refactor(prerender): improve console formatting for failed routes #1471

Merged
merged 8 commits into from
Jul 21, 2023

Conversation

danielroe
Copy link
Member

πŸ”— Linked issue

resolves #1467

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This prints an extra bit of info to display what page(s) linked to a route that had an error being prerendered.

SCR-20230721-jxha

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@danielroe danielroe added enhancement New feature or request prerender labels Jul 21, 2023
@danielroe danielroe requested a review from pi0 July 21, 2023 09:52
@danielroe danielroe self-assigned this Jul 21, 2023
@codecov
Copy link

codecov bot commented Jul 21, 2023

Codecov Report

Merging #1471 (e6c84f2) into main (7b8475c) will increase coverage by 0.02%.
The diff coverage is 79.48%.

❗ Current head e6c84f2 differs from pull request most recent head a5c802e. Consider uploading reports for the commit a5c802e to get more accurate results

@@            Coverage Diff             @@
##             main    #1471      +/-   ##
==========================================
+ Coverage   76.22%   76.24%   +0.02%     
==========================================
  Files          73       73              
  Lines        7435     7455      +20     
  Branches      728      736       +8     
==========================================
+ Hits         5667     5684      +17     
- Misses       1767     1770       +3     
  Partials        1        1              
Impacted Files Coverage Ξ”
src/prerender.ts 86.87% <79.48%> (-0.11%) ⬇️

@pi0
Copy link
Member

pi0 commented Jul 21, 2023

Nice! Only i think we should show sources in sub-tree output as they can get long and there is possibly more than one.

@pi0
Copy link
Member

pi0 commented Jul 21, 2023

Updated format. Wdyt @danielroe

image

@pi0 pi0 changed the title feat(prerender): display sources for erroring links feat(prerender): display parent links for failed routes Jul 21, 2023
@danielroe
Copy link
Member Author

danielroe commented Jul 21, 2023

Much nicer πŸ‘Œ

We might also consider printing error down there too?

@pi0
Copy link
Member

pi0 commented Jul 21, 2023

Yeah seems a good idea!

image

@pi0 pi0 changed the title feat(prerender): display parent links for failed routes feat(prerender): improve console formatting for failed routes Jul 21, 2023
@pi0 pi0 changed the title feat(prerender): improve console formatting for failed routes refactor(prerender): improve console formatting for failed routes Jul 21, 2023
@pi0 pi0 merged commit 2f114e5 into main Jul 21, 2023
4 checks passed
@pi0 pi0 deleted the feat/link-source branch July 21, 2023 11:44
@pi0 pi0 mentioned this pull request Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request prerender
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crawler should tell where it found link to 404 path
2 participants