Skip to content

lib-core: useExtensions code improvement#299

Merged
openshift-merge-bot[bot] merged 2 commits intoopenshift:mainfrom
logonoff:useExtensions
Feb 10, 2026
Merged

lib-core: useExtensions code improvement#299
openshift-merge-bot[bot] merged 2 commits intoopenshift:mainfrom
logonoff:useExtensions

Conversation

@logonoff
Copy link
Member

@logonoff logonoff commented Jan 30, 2026

this PR aims to make useExtensions faster and more readable:

  • The fallback () => true predicate is moved to the module level and is given a name (truePredicate) and is now set as the default param for predicate. We also no longer create this function every iteration of the loop
  • Instead of the complex extensions.reduce, we simply use filter which makes the intent behind our goal (i.e., filtering an array) more clear. This also reduces the amount of intermediary arrays that are created when computing this

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jan 30, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: logonoff

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 30, 2026
@logonoff logonoff force-pushed the useExtensions branch 2 times, most recently from e31ad13 to 1f2eba9 Compare January 30, 2026 17:12
@codecov-commenter
Copy link

codecov-commenter commented Jan 30, 2026

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 18.25%. Comparing base (7dd14fe) to head (3626501).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
packages/lib-core/src/runtime/useExtensions.ts 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #299   +/-   ##
=======================================
  Coverage   18.25%   18.25%           
=======================================
  Files          58       58           
  Lines        1758     1758           
  Branches      326      327    +1     
=======================================
  Hits          321      321           
  Misses       1421     1421           
  Partials       16       16           

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

@logonoff logonoff force-pushed the useExtensions branch 3 times, most recently from 78417b5 to a806f0a Compare February 6, 2026 20:12
@logonoff
Copy link
Member Author

logonoff commented Feb 9, 2026

/retitle lib-core: useExtensions code improvement

@openshift-ci openshift-ci bot changed the title fix: useExtensions code improvement lib-core: useExtensions code improvement Feb 9, 2026
@vojtechszocs
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Feb 10, 2026
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Feb 10, 2026

@logonoff: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit efa1155 into openshift:main Feb 10, 2026
2 checks passed
@logonoff logonoff deleted the useExtensions branch February 10, 2026 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants