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

[Cloud Security] add sideEffects: false to shared csp packages #197486

Merged
merged 1 commit into from
Oct 25, 2024

Conversation

maxcold
Copy link
Contributor

@maxcold maxcold commented Oct 23, 2024

Summary

add sideEffects: false to shared packages for better tree shaking, see docs and related discussion

@maxcold maxcold added release_note:skip Skip the PR/issue when compiling release notes Team:Cloud Security Cloud Security team related backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) 8.17 candidate labels Oct 23, 2024
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

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

id before after diff
cloudSecurityPosture 508.7KB 509.0KB +337.0B
securitySolution 20.7MB 20.7MB -277.0B
total +60.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
cloudSecurityPosture 18.6KB 18.0KB -657.0B

@maxcold maxcold marked this pull request as ready for review October 24, 2024 09:28
@maxcold maxcold requested a review from a team as a code owner October 24, 2024 09:28
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-cloud-security-posture (Team:Cloud Security)

@maxcold maxcold merged commit 12ad715 into main Oct 25, 2024
40 checks passed
@maxcold maxcold deleted the csp-add-sideEffects-false-to-shared-packages branch October 25, 2024 07:36
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.16, 8.x

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

@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.16
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 25, 2024
…#197486) (#197766)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[Cloud Security] add sideEffects: false to shared csp packages
(#197486)](#197486)

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

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

<!--BACKPORT [{"author":{"name":"Maxim
Kholod","email":"maxim.kholod@elastic.co"},"sourceCommit":{"committedDate":"2024-10-25T07:36:21Z","message":"[Cloud
Security] add sideEffects: false to shared csp packages (#197486)\n\n##
Summary\r\n\r\nadd `sideEffects: false` to shared packages for better
tree shaking,
see\r\n[docs](https://webpack.js.org/guides/tree-shaking/#mark-the-file-as-side-effect-free)\r\nand
[related\r\ndiscussion](https://elastic.slack.com/archives/C5TQ33ND8/p1724317421954709?thread_ts=1724314732.061379&cid=C5TQ33ND8)","sha":"12ad7153535238dc4a68de4cbb98e27305efc956","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Cloud
Security","backport:prev-minor","v8.16.0","v8.17.0"],"title":"[Cloud
Security] add sideEffects: false to shared csp
packages","number":197486,"url":"https://github.com/elastic/kibana/pull/197486","mergeCommit":{"message":"[Cloud
Security] add sideEffects: false to shared csp packages (#197486)\n\n##
Summary\r\n\r\nadd `sideEffects: false` to shared packages for better
tree shaking,
see\r\n[docs](https://webpack.js.org/guides/tree-shaking/#mark-the-file-as-side-effect-free)\r\nand
[related\r\ndiscussion](https://elastic.slack.com/archives/C5TQ33ND8/p1724317421954709?thread_ts=1724314732.061379&cid=C5TQ33ND8)","sha":"12ad7153535238dc4a68de4cbb98e27305efc956"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197486","number":197486,"mergeCommit":{"message":"[Cloud
Security] add sideEffects: false to shared csp packages (#197486)\n\n##
Summary\r\n\r\nadd `sideEffects: false` to shared packages for better
tree shaking,
see\r\n[docs](https://webpack.js.org/guides/tree-shaking/#mark-the-file-as-side-effect-free)\r\nand
[related\r\ndiscussion](https://elastic.slack.com/archives/C5TQ33ND8/p1724317421954709?thread_ts=1724314732.061379&cid=C5TQ33ND8)","sha":"12ad7153535238dc4a68de4cbb98e27305efc956"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Maxim Kholod <maxim.kholod@elastic.co>
kibanamachine added a commit that referenced this pull request Oct 25, 2024
…197486) (#197767)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Cloud Security] add sideEffects: false to shared csp packages
(#197486)](#197486)

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

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

<!--BACKPORT [{"author":{"name":"Maxim
Kholod","email":"maxim.kholod@elastic.co"},"sourceCommit":{"committedDate":"2024-10-25T07:36:21Z","message":"[Cloud
Security] add sideEffects: false to shared csp packages (#197486)\n\n##
Summary\r\n\r\nadd `sideEffects: false` to shared packages for better
tree shaking,
see\r\n[docs](https://webpack.js.org/guides/tree-shaking/#mark-the-file-as-side-effect-free)\r\nand
[related\r\ndiscussion](https://elastic.slack.com/archives/C5TQ33ND8/p1724317421954709?thread_ts=1724314732.061379&cid=C5TQ33ND8)","sha":"12ad7153535238dc4a68de4cbb98e27305efc956","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Cloud
Security","backport:prev-minor","v8.16.0","v8.17.0"],"title":"[Cloud
Security] add sideEffects: false to shared csp
packages","number":197486,"url":"https://github.com/elastic/kibana/pull/197486","mergeCommit":{"message":"[Cloud
Security] add sideEffects: false to shared csp packages (#197486)\n\n##
Summary\r\n\r\nadd `sideEffects: false` to shared packages for better
tree shaking,
see\r\n[docs](https://webpack.js.org/guides/tree-shaking/#mark-the-file-as-side-effect-free)\r\nand
[related\r\ndiscussion](https://elastic.slack.com/archives/C5TQ33ND8/p1724317421954709?thread_ts=1724314732.061379&cid=C5TQ33ND8)","sha":"12ad7153535238dc4a68de4cbb98e27305efc956"}},"sourceBranch":"main","suggestedTargetBranches":["8.16","8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197486","number":197486,"mergeCommit":{"message":"[Cloud
Security] add sideEffects: false to shared csp packages (#197486)\n\n##
Summary\r\n\r\nadd `sideEffects: false` to shared packages for better
tree shaking,
see\r\n[docs](https://webpack.js.org/guides/tree-shaking/#mark-the-file-as-side-effect-free)\r\nand
[related\r\ndiscussion](https://elastic.slack.com/archives/C5TQ33ND8/p1724317421954709?thread_ts=1724314732.061379&cid=C5TQ33ND8)","sha":"12ad7153535238dc4a68de4cbb98e27305efc956"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Maxim Kholod <maxim.kholod@elastic.co>
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) release_note:skip Skip the PR/issue when compiling release notes Team:Cloud Security Cloud Security team related v8.16.0 v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants