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

[deps] Replace compare-versions with semver #195287

Merged

Conversation

markov00
Copy link
Member

@markov00 markov00 commented Oct 7, 2024

Summary

We are reducing the number of dependencies by replacing the compare-versions library with the already used semver library that offer the same functionality.

@markov00 markov00 added release_note:skip Skip the PR/issue when compiling release notes dependencies Pull requests that update a dependency file backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) labels Oct 7, 2024
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
cloudSecurityPosture 654 653 -1
discover 991 992 +1
esqlDataGrid 362 363 +1
lens 1460 1461 +1
logsExplorer 561 562 +1
securitySolution 5925 5924 -1
slo 846 847 +1
visTypeVega 272 280 +8
total +11

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
cloudSecurityPosture 507.6KB 506.3KB -1.3KB
discover 820.0KB 819.4KB -648.0B
esqlDataGrid 154.1KB 153.4KB -653.0B
lens 1.5MB 1.5MB -647.0B
securitySolution 20.6MB 20.6MB -6.9KB
slo 855.4KB 854.8KB -644.0B
visTypeVega 1.8MB 1.9MB +7.5KB
total -3.2KB

History

@elastic elastic deleted a comment from kibana-ci Oct 8, 2024
@markov00 markov00 marked this pull request as ready for review October 8, 2024 07:56
@markov00 markov00 requested review from a team as code owners October 8, 2024 07:56
Copy link
Contributor

Choose a reason for hiding this comment

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

It may be worth to consider to put it into the shared bundle

Copy link
Member Author

Choose a reason for hiding this comment

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

What do you think is the bundle size gain in this case?
I believe this should be a choice of the semver library owner from now on :D

Copy link
Contributor

@nickofthyme nickofthyme left a comment

Choose a reason for hiding this comment

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

Code changes LGTM

@markov00 markov00 enabled auto-merge (squash) October 8, 2024 16:27
Copy link
Contributor

@opauloh opauloh left a comment

Choose a reason for hiding this comment

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

Cloud Security Posture changes LGTM - Tested locally

image

@markov00 markov00 merged commit 31f4f2c into elastic:main Oct 8, 2024
39 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/11242306572

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 8, 2024
## Summary

We are reducing the number of dependencies by replacing the
`compare-versions` library with the already used `semver` library that
offer the same functionality.

(cherry picked from commit 31f4f2c)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Oct 8, 2024
# Backport

This will backport the following commits from `main` to `8.x`:
- [[deps] Replace compare-versions with semver
(#195287)](#195287)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Marco
Vettorello","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-08T19:23:12Z","message":"[deps]
Replace compare-versions with semver (#195287)\n\n## Summary\r\n\r\nWe
are reducing the number of dependencies by replacing
the\r\n`compare-versions` library with the already used `semver` library
that\r\noffer the same
functionality.","sha":"31f4f2c9842f3f6713e004be22087379e9ccf3e7","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","dependencies","v9.0.0","backport:prev-minor"],"title":"[deps]
Replace compare-versions with
semver","number":195287,"url":"https://github.com/elastic/kibana/pull/195287","mergeCommit":{"message":"[deps]
Replace compare-versions with semver (#195287)\n\n## Summary\r\n\r\nWe
are reducing the number of dependencies by replacing
the\r\n`compare-versions` library with the already used `semver` library
that\r\noffer the same
functionality.","sha":"31f4f2c9842f3f6713e004be22087379e9ccf3e7"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/195287","number":195287,"mergeCommit":{"message":"[deps]
Replace compare-versions with semver (#195287)\n\n## Summary\r\n\r\nWe
are reducing the number of dependencies by replacing
the\r\n`compare-versions` library with the already used `semver` library
that\r\noffer the same
functionality.","sha":"31f4f2c9842f3f6713e004be22087379e9ccf3e7"}}]}]
BACKPORT-->

Co-authored-by: Marco Vettorello <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) dependencies Pull requests that update a dependency file release_note:skip Skip the PR/issue when compiling release notes v8.16.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants