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

Expression Parser Strictness #315

Merged
merged 2 commits into from
Mar 7, 2024
Merged

Conversation

KetanReddy
Copy link
Member

@KetanReddy KetanReddy commented Mar 6, 2024

While Player is strict about syntactically invalid expressions, it should still be allowed to execute them if the implementation desires. This change exposes the Expression Parser's strict attribute on the Expression Evaluator's hook to allow it to be set via the resolveOptions hook. This change also changes the behavior around throwing those errors to only throw recoverable errors if strict is true.

Change Type (required)

Indicate the type of change your pull request is:

  • patch
  • minor
  • major

Release Notes

Expose Expression Parser's strictness option via the resolveOptions hook

📦 Published PR as canary version: 0.7.2--canary.315.10130

Try this version out locally by upgrading relevant packages to 0.7.2--canary.315.10130

Version

Published prerelease version: 0.7.2-next.1

Changelog

Release Notes

Expression Parser Strictness (#315)

Expose Expression Parser's strictness option via the resolveOptions hook


🐛 Bug Fix

Authors: 3

@KetanReddy KetanReddy added the patch Increment the patch version when merged label Mar 6, 2024
@KetanReddy KetanReddy self-assigned this Mar 6, 2024
Copy link

codecov bot commented Mar 7, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 81.93%. Comparing base (bc01b43) to head (dc142f6).

Files Patch % Lines
core/player/src/expressions/parser.ts 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #315   +/-   ##
=======================================
  Coverage   81.93%   81.93%           
=======================================
  Files         133      133           
  Lines        4616     4616           
  Branches     1140     1140           
=======================================
  Hits         3782     3782           
  Misses        553      553           
  Partials      281      281           

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

@KetanReddy
Copy link
Member Author

/canary

@KetanReddy KetanReddy marked this pull request as ready for review March 7, 2024 04:38
@KetanReddy KetanReddy requested a review from adierkens as a code owner March 7, 2024 04:38
@KetanReddy KetanReddy merged commit 2a5ed15 into main Mar 7, 2024
10 of 11 checks passed
@KetanReddy KetanReddy deleted the expression-parser-strictness branch March 7, 2024 16:20
@intuit-svc intuit-svc mentioned this pull request Apr 10, 2024
15 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants