Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use modern ES syntax rather than .call #29368

Merged
merged 3 commits into from
Feb 27, 2024

Conversation

renchap
Copy link
Sponsor Member

@renchap renchap commented Feb 22, 2024

I replaced Object.prototype.hasOwnProperty.call with the new ES2022 Object.hasOwn.

It is not transpiled by Babel in the final files, because this function is supported by all the browsers our BrowsersList is targetting.

If this causes issues, then we can change our supported browsers list and target earlier versions, then it will be polyfilled accordingly.

ykzts
ykzts previously approved these changes Feb 22, 2024
Copy link

codecov bot commented Feb 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.10%. Comparing base (86500e3) to head (e79926f).
Report is 172 commits behind head on main.

❗ Current head e79926f differs from pull request most recent head 880830e. Consider uploading reports for the commit 880830e to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #29368      +/-   ##
==========================================
+ Coverage   85.01%   85.10%   +0.08%     
==========================================
  Files        1059     1062       +3     
  Lines       28277    28352      +75     
  Branches     4538     4548      +10     
==========================================
+ Hits        24040    24129      +89     
+ Misses       3074     3061      -13     
+ Partials     1163     1162       -1     

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

Copy link
Contributor

@ClearlyClaire ClearlyClaire left a comment

Choose a reason for hiding this comment

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

Typo, plus some and every are not defined on NodeList afaik

app/javascript/packs/admin.jsx Outdated Show resolved Hide resolved
Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

Copy link
Contributor

This pull request has resolved merge conflicts and is ready for review.

app/javascript/packs/public.jsx Outdated Show resolved Hide resolved
Copy link
Contributor

@ClearlyClaire ClearlyClaire left a comment

Choose a reason for hiding this comment

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

Looks good now, although I'd like to see it run with the test introduced in #29424 first.

@renchap
Copy link
Sponsor Member Author

renchap commented Feb 27, 2024

Rebased to include your new test

@ClearlyClaire ClearlyClaire added this pull request to the merge queue Feb 27, 2024
Merged via the queue into mastodon:main with commit 899eac1 Feb 27, 2024
25 checks passed
lutoma pushed a commit to ohaisocial/mastodon that referenced this pull request Mar 19, 2024
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.

None yet

3 participants