Skip to content

[api-minor] Convert getViewerPreferences to return data in a Map#21607

Merged
Snuffleupagus merged 2 commits into
mozilla:masterfrom
Snuffleupagus:viewerPreferences-Map
Jul 20, 2026
Merged

[api-minor] Convert getViewerPreferences to return data in a Map#21607
Snuffleupagus merged 2 commits into
mozilla:masterfrom
Snuffleupagus:viewerPreferences-Map

Conversation

@Snuffleupagus

Copy link
Copy Markdown
Collaborator

Compared to regular Objects there's a number of advantages to using Maps:

  • They support proper iteration.
  • They have a simple way to check for the existence of data.
  • They have a simple/efficient way to check the number of elements.

If this functionality was added today, I cannot imagine that we'd choose an Object for this data.

Compared to regular Objects there's a number of advantages to using Maps:
 - They support proper iteration.
 - They have a simple way to check for the existence of data.
 - They have a simple/efficient way to check the number of elements.

If this functionality was added today, I cannot imagine that we'd choose an Object for this data.
@codecov-commenter

codecov-commenter commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.85%. Comparing base (cd03276) to head (67ed457).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
src/core/catalog.js 33.33% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master   #21607   +/-   ##
=======================================
  Coverage   89.84%   89.85%           
=======================================
  Files         263      263           
  Lines       66758    66762    +4     
=======================================
+ Hits        59980    59989    +9     
+ Misses       6778     6773    -5     
Flag Coverage Δ
browsertest 66.55% <0.00%> (+0.01%) ⬆️
fonttest 9.05% <ø> (ø)
integrationtest 69.27% <0.00%> (+0.01%) ⬆️
unittest 57.49% <33.33%> (+<0.01%) ⬆️
unittestcli 56.45% <33.33%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.

@timvandermeij timvandermeij left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me, with passing browser tests. Thanks!

@timvandermeij

Copy link
Copy Markdown
Collaborator

/botio test

@moz-tools-bot

Copy link
Copy Markdown
Collaborator

From: Bot.io (Windows)


Received

Command cmd_test from @timvandermeij received. Current queue size: 0

Live output at: http://54.193.163.58:8877/45e963120908ff8/output.txt

@moz-tools-bot

Copy link
Copy Markdown
Collaborator

From: Bot.io (Linux m4)


Received

Command cmd_test from @timvandermeij received. Current queue size: 0

Live output at: http://54.241.84.105:8877/3db4a81d5782a83/output.txt

@moz-tools-bot

Copy link
Copy Markdown
Collaborator

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/3db4a81d5782a83/output.txt

Total script time: 46.82 mins

  • Unit tests: Passed
  • Integration Tests: FAILED
  • Regression tests: FAILED
  errors: 7

Image differences available at: http://54.241.84.105:8877/3db4a81d5782a83/reftest-analyzer.html#web=eq.log

@moz-tools-bot

Copy link
Copy Markdown
Collaborator

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/45e963120908ff8/output.txt

Total script time: 79.63 mins

  • Unit tests: Passed
  • Integration Tests: FAILED
  • Regression tests: Passed

@Snuffleupagus
Snuffleupagus merged commit 028c02f into mozilla:master Jul 20, 2026
21 checks passed
@Snuffleupagus
Snuffleupagus deleted the viewerPreferences-Map branch July 20, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants