Skip to content

Update array and object convert to value#2634

Merged
ryanmelt merged 1 commit intomainfrom
update_array_and_object_convert_to_value
Dec 16, 2025
Merged

Update array and object convert to value#2634
ryanmelt merged 1 commit intomainfrom
update_array_and_object_convert_to_value

Conversation

@ryanmelt
Copy link
Copy Markdown
Member

No description provided.

@ryanmelt ryanmelt requested a review from jmthomas December 14, 2025 23:30
@codecov
Copy link
Copy Markdown

codecov bot commented Dec 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.07%. Comparing base (24ca210) to head (01e9fbc).
⚠️ Report is 22 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2634      +/-   ##
==========================================
- Coverage   79.07%   79.07%   -0.01%     
==========================================
  Files         661      661              
  Lines       51990    51999       +9     
  Branches      732      732              
==========================================
+ Hits        41113    41119       +6     
- Misses      10797    10800       +3     
  Partials       80       80              
Flag Coverage Δ
python 81.03% <ø> (-0.03%) ⬇️
ruby-api 84.43% <ø> (ø)
ruby-backend 82.06% <100.00%> (+0.01%) ⬆️

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

☔ 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.

Copy link
Copy Markdown
Member

@jmthomas jmthomas left a comment

Choose a reason for hiding this comment

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

I looked for other eval usage and it is limited to api_shared and running_script where we need it

@@ -40,6 +41,8 @@ class String
HEX_CHECK_REGEX = /\A\s*0[xX][\dabcdefABCDEF]+\s*\z/
# Regular expression to identify a String as an Array of numbers
ARRAY_CHECK_REGEX = /\A\s*\[.*\]\s*\z/
# Regular expression to identify a String containing object notation
OBJECT_CHECK_REGEX = /\A\s*\{.*\}\s*\z/
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just checking for { ... }. Is this effectively a check for json? Should we be using JSON.parse?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

JSON.parse is really picky. YAML.safe_load handles single quotes and hex like you would expect.

@ryanmelt ryanmelt merged commit f642b78 into main Dec 16, 2025
27 of 28 checks passed
@ryanmelt ryanmelt deleted the update_array_and_object_convert_to_value branch December 16, 2025 00:36
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