Skip to content

Add temporary script to detect usage of Bootstrap v5 deprecated classes#42487

Open
julien-deramond wants to merge 1 commit into
v6-devfrom
v6-dev-add-temp-script-to-detect-v5-deprecated-classes-usage-in-v6-dev-branch
Open

Add temporary script to detect usage of Bootstrap v5 deprecated classes#42487
julien-deramond wants to merge 1 commit into
v6-devfrom
v6-dev-add-temp-script-to-detect-v5-deprecated-classes-usage-in-v6-dev-branch

Conversation

@julien-deramond

@julien-deramond julien-deramond commented Jun 8, 2026

Copy link
Copy Markdown
Member

Description

This PR adds a temporary vibe coded script to detect usages of Bootstrap v5 classes that no longer exist in v6 across our codebase, in a similar spirit to the approach used by the Bootstrap Deprecated Classes extension: https://github.com/julien-deramond/bootstrap-deprecated-classes-extension.

It's only been lightly tested so far (and only on my macOS environment), but the results I've spot-checked all appear to be legitimate v5 classes that should no longer be used in v6.

I'm not sure whether it makes sense to merge this, since its purpose is mainly to help with the migration work on this branch. If not, @mdo and/or @coliff may still find it useful.

Example output from a run today:

▶ Extracting v6 classes from dist/css/bootstrap.css…
  → 1140 unique classes

▶ Fetching v5 CSS from https://raw.githubusercontent.com/twbs/bootstrap/refs/heads/main/dist/css/bootstrap.css…
  → 2027 unique classes

▶ Classes only in v5 (deprecated in v6): 1428

▶ Scanning codebase for deprecated classes…
  → Scanned 435 files
  → 55 deprecated class(es) found in codebase

✖ Found 55 deprecated v5 class(es) with 526 occurrence(s) in the codebase.
  Report written to: deprecated-classes-2026-06-08T17-50-24.log

The corresponding report is generated at the repository root:
deprecated-classes-2026-06-08T17-50-24.log


Warning

Some classes are considered found in v6 codebase because of their simple names. For now, I've kept them in the results. I'm not sure it's easy to better spot what's a class or not in the docs.

Non-exhaustive list:

  • .clearfix is found 3 times, but only in the docs text content, not used or mentioned as a class/utility, but in URLs or as a single English word

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Inbox

Development

Successfully merging this pull request may close these issues.

1 participant