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

Refactor rules feature with new rules execution object contract + eslint license header rule update to support 2025 #7300

Merged
merged 8 commits into from
Jan 22, 2025

Conversation

jeradrutnam
Copy link
Member

@jeradrutnam jeradrutnam commented Jan 11, 2025

Purpose

$subject related to wso2/product-is#22423

Copy link

codecov bot commented Jan 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 32.02%. Comparing base (002b2af) to head (3660b64).
Report is 10 commits behind head on new-signup.

Additional details and impacted files
@@             Coverage Diff             @@
##           new-signup    #7300   +/-   ##
===========================================
  Coverage       32.02%   32.02%           
===========================================
  Files              41       41           
  Lines             893      893           
  Branches          204      220   +16     
===========================================
  Hits              286      286           
+ Misses            607      557   -50     
- Partials            0       50   +50     
Flag Coverage Δ
@wso2is/core 32.02% <ø> (ø)

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

see 14 files with indirect coverage changes


/**
* Method to get the context value
*
* @returns RuleInstanceData
*/
export const getRuleInstanceValue = () => RuleContextRef.ruleInstance;
export const getRuleInstanceValue = () => Object.freeze(RuleContextRef.ruleInstance);
Copy link
Member

@brionmario brionmario Jan 14, 2025

Choose a reason for hiding this comment

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

We'll be moving to to a hook in the future right? Since the object is a nested object, Object.freeze wouldn't be ideal.

Shall we do a deep clone, if we are planning to keep exposing the instance directly.
WDYT?

Suggested change
export const getRuleInstanceValue = () => Object.freeze(RuleContextRef.ruleInstance);
export const getRuleInstanceValue = (): RuleExecuteCollectionInterface => Object.freeze(RuleContextRef.ruleInstance);

@jeradrutnam jeradrutnam merged commit fcf7e27 into wso2:new-signup Jan 22, 2025
10 checks passed
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.

3 participants