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

CPLAT-15062 Export generateJsProps #316

Merged
merged 3 commits into from
Aug 3, 2021
Merged

Conversation

greglittlefield-wf
Copy link
Collaborator

@greglittlefield-wf greglittlefield-wf commented Aug 2, 2021

Motivation

generateJsProps is used in ReactComponentFactoryProxy classes to construct React.createElement-compatible JS props objects from Dart props Maps, and includes conversion of refs and optional deep jsifiation of nested objects.

React.createElement is the primary recipient of these kinds of JS props objects, but there are cases in which consumers may need to pass those props to other JS recipients.

For example, you may want to call a JS callback with those props, or even opt to perform conversion of props before they get to the ReactComponentFactoryProxy.

Solution

  • Export generateJsProps as a public API

Unrelated changes

  • Fix build by pinning meta

Testing Steps

N/A (CI passes)

@aviary-wf
Copy link

Security Insights

(5) Vulnerable direct dependencies were detected
  • 1 vulns in browserslist < 4.16.5 via yarn.lock
  • 1 vulns in elliptic < 6.5.4 via yarn.lock
  • 1 vulns in glob-parent < 5.1.2 via yarn.lock
  • 1 vulns in lodash < 4.17.21 via yarn.lock
  • 1 vulns in ssri < 6.0.2 via yarn.lock
  • Action Items


    Questions or Comments? Reach out on Slack: #support-infosec.

    @semveraudit-wf
    Copy link

    semveraudit-wf commented Aug 2, 2021

    Public API Changes

    Recommendation: ⚠️ Minor version bump

    @@ line 112: package:react/src/react_client/factory_util.dart @@
    +  JsMap generateJsProps(Map<dynamic, dynamic> props, {bool convertRefValue = true, bool convertCallbackRefValue = true, List<String> additionalRefPropKeys = const [], bool wrapWithJsify = true})
    // Adding a top-level function is a minor change.

    Showing results for feac624

    Powered by semver-audit-service. Please report any problems by filing an issue.
    Reported by the dart semver audit client 2.2.2
    Browse public API.

    Last edited UTC Aug 02 at 19:38:59

    @rmconsole4-wk rmconsole4-wk changed the title Export generateJsProps CPLAT-15062 Export generateJsProps Aug 2, 2021
    Copy link
    Collaborator

    @aaronlademann-wf aaronlademann-wf left a comment

    Choose a reason for hiding this comment

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

    +1

    +10 (stable CI passing)

    @aaronlademann-wf
    Copy link
    Collaborator

    @Workiva/release-management-pp

    Copy link

    @rmconsole-wf rmconsole-wf left a comment

    Choose a reason for hiding this comment

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

    +1 from RM

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    6 participants