My GitHub activity in the week of 2025-03-21

Highlights from this week

Here’s some of the more interesting things I learned or worked on.

Caching prettier runs

One of the most interesting findings was caching prettier runs. This is important in MDN content because there are 14,000 pages that we regularly need to format. Although we’re not formatting the whole repo locally very often, with pre-commit hooks running on changed files, there’s a lot of linting happening during development. Running prettier -w v prettier -w --cache on 14,000 files comes out at this:

# without a cache
prettier --write .  98.97s user 10.11s system 126% cpu 1:26.14 total
# with a cache
prettier --write --cache .  14.82s user 7.73s system 129% cpu 17.396 total

SVG section reorganization

We’re reorganizing the site (information) architecture to be uniform across all sections at the moment. That means per top-level technology category, we’re organizing the docs by reference, guides, tutorials, and how-tos. The tidied-up SVG section looks like this now:

web/svg
├── guides
│   ├── applying_svg_effects_to_html_content
│   ├── content_type
│   ├── index.md
│   ├── linking
│   ├── namespaces_crash_course
│   ├── scripting
│   ├── svg_animation_with_smil
│   ├── svg_as_an_image
│   ├── svg_filters
│   └── svg_in_html
├── index.md
├── reference
│   ├── attribute
│   ├── element
│   └── index.md
└── tutorials
    ├── index.md
    └── svg_from_scratch

User agent sniffing

I made a larger rewrite of the UA sniffing guide. There was a lot of outdated information in there, and I hope it’s a lot better now in terms of clarity and accuracy. I think it’s a pretty good document now, which modernizes the guidance while preserving some hints about better alternatives.

See the results here: Browser detection using the user agent string (UA sniffing)

Summary

I worked on 20 total PRs, broken down as 6 created & 14 reviewed in 3 repositories.

Most active day was 2025-03-18 with 14 total PRs.

Top repos:

  • mdn/content: 17
  • mdn/translated-content: 2
  • mdn/express-locallibrary-tutorial: 1

Pull requests

This is what I got up to on the week ending 21st March 2025:

2025-03-18:

2025-03-19:

2025-03-20:

2025-03-21:

See also


Published: