Skip to content

refactor!: Track runtime version numbers; use collector result format#110

Merged
ascorbic merged 9 commits intomainfrom
collector-results-format
Apr 15, 2024
Merged

refactor!: Track runtime version numbers; use collector result format#110
ascorbic merged 9 commits intomainfrom
collector-results-format

Conversation

@queengooborg
Copy link
Collaborator

🔗 Linked issue

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 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 PR performs a big update to the format of the runtime data output for two main reasons:

  • Track runtime versions in the data
  • Increase interopability with mdn-bcd-collector (using the same results)

To track the runtime versions directly in the data, it was determined that it would be better to utilize the collector's existing report structure and report the version using the userAgent property already provided by the schema. A simple, custom UA string is used: !! runtime/version. (The preceding exclamation points are to ensure that typical UA parsers do not attempt to parse the custom string and report incorrect info.)

The version information is then compiled into a __version property exported by the runtime-compat-data package. This property is then used in the website to show the runtime versions that were tested:

Screenshot 2024-03-28 at 09 18 00

Notes

Because the data structure was changed, the data has been regenerated locally.

Code has been implemented to prepare for the landing of #106.

Obtaining the version number for WinterJS within the runner has proven to be difficult. Since we are not currently updating WinterJS data, I've decided to just manually modify data.json to add the version number this time around.

📝 Checklist

  • I have updated the documentation accordingly.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Mar 28, 2024

Deploying runtime-compat with  Cloudflare Pages  Cloudflare Pages

Latest commit: dc66bbb
Status: ✅  Deploy successful!
Preview URL: https://6b4241f8.runtime-compat.pages.dev
Branch Preview URL: https://collector-results-format.runtime-compat.pages.dev

View logs

Co-authored-by: Matt Kane <m@mk.gg>
@ascorbic
Copy link
Collaborator

This is a great update. I think I've found the source of the failing action.

@ascorbic
Copy link
Collaborator

The tests are failing because of the new console.dir test. The fix is here: #113

@ascorbic ascorbic enabled auto-merge (squash) April 15, 2024 19:54
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.

2 participants