Skip to content

Conversation

@Vishv04
Copy link
Contributor

@Vishv04 Vishv04 commented Mar 10, 2025

What kind of change does this PR introduce?
Feature - Adds case-insensitive unique validation for language entries
Bug fix - remove two entries of same name such as 'JavaScript' and 'Javascript'

Issue Number:

Screenshots/videos:
Forcefully made mistakes in the name of language,
image

Validator finds the mistake,
image

If relevant, did you update the documentation?

Summary
This PR introduces case-insensitive unique validation for language entries in the tooling data to solve several existing problems:

  1. Inconsistent language casing across tools (e.g., "JavaScript" vs "javascript" vs "JAVASCRIPT")
  2. Potential confusion for users seeing the same language listed multiple times

My solution:
Implements a custom AJV keyword caseInsensitiveUnique that:

  • Detects and reports case-insensitive duplicates using set
  • Provides clear error messages for easy fixes

For Tool Maintainers:

# Before
languages:
  - "JavaScript"
  - "javascript"
  - "Python"
  - "PYTHON"

# After
languages:
  - "JavaScript"  # Use consistent casing from schema enum
  - "Python"

Does this PR introduce a breaking change?

  • Existing tools with multiple case variants of the same language will fail validation

@Vishv04 Vishv04 requested a review from a team as a code owner March 10, 2025 13:16
@github-actions
Copy link

github-actions bot commented Mar 10, 2025

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
website ✅ Ready (View Log) Visit Preview 8caf38b

@codecov
Copy link

codecov bot commented Mar 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (219521e) to head (8caf38b).

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1494   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           10        10           
  Lines          396       396           
  Branches       106       106           
=========================================
  Hits           396       396           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Vishv04
Copy link
Contributor Author

Vishv04 commented Mar 10, 2025

Hi @benjagm @jdesrosiers @DhairyaMajmudar,
I kindly request you to review this PR at your convenience and share your feedback. Thank you!

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.

🐛 Bug: Two JavaScript labels for filter on Tools page

1 participant