-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Updated js-yaml to v4 #190678
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
Updated js-yaml to v4 #190678
Conversation
|
/ci |
4 similar comments
|
/ci |
|
/ci |
|
/ci |
|
/ci |
cc25199 to
c6c985a
Compare
|
/ci |
1 similar comment
|
/ci |
|
@elasticmachine merge upstream |
|
/ci |
1 similar comment
|
/ci |
yarn.lock
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is coming from @istanbuljs/load-nyc-config, we can also set a resolution, though seems negligible for now.
"**/@istanbuljs/load-nyc-config/**/js-yaml": "4.1.0"There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. As this is a transitive development dependency, I think it is ok to leave this for now.
|
Pinging @elastic/kibana-security (Team:Security) |
3cab99a to
46dc19c
Compare
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Module Count
Async chunks
History
To update your PR or re-run it, just comment with: |
vgomez-el
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
## Summary Main seems to be broken because of a check. These are probably regenerated with a different shape since the js-yaml update: #190678
## Summary Since js-yaml update has been merged in #190678 we don't need `no_unsafe_js_yaml ` anymore
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
## Summary Updated `js-yaml` to `4.1.0`. This PR also introduces a type override for the `js-yaml` load function to maintain compatibility across the codebase. Specifically, updated type definition of the load function looks as follows: ```typescript function load<T = any>(str: string, opts?: jsyaml.LoadOptions): T; ``` The original type definition of the load function in `js-yaml` changed from `any` to `unknown`. This change would require extensive type updates throughout the entire repository to accommodate the `unknown` type. To avoid widespread type changes and potential issues in the codebase, the type is overriden back to `any` for now. This is a temporary measure, we plan to address the necessary type changes in subsequent PRs, where teams will gradually update the codebase to work with the `unknown` type. ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios ## Release note Updated `js-yaml` to `4.1.0`. --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Maxim Palenov <[email protected]> (cherry picked from commit 28aa274) # Conflicts: # package.json # src/platform/packages/shared/kbn-ftr-common-functional-services/services/saml_auth/serverless/auth_provider.ts # src/platform/packages/shared/kbn-ftr-common-functional-services/services/saml_auth/stateful/auth_provider.ts # src/platform/packages/shared/kbn-openapi-bundler/tsconfig.json # x-pack/platform/plugins/shared/fleet/cypress/tsconfig.json # x-pack/platform/plugins/shared/fleet/server/routes/agent_policy/handlers.ts # x-pack/platform/plugins/shared/fleet/server/services/epm/agent/agent.ts # x-pack/platform/plugins/shared/integration_assistant/server/integration_builder/build_integration.ts # x-pack/plugins/fleet/server/services/epm/packages/get_template_inputs.ts # x-pack/plugins/integration_assistant/server/integration_builder/build_integration.test.ts # x-pack/plugins/observability_solution/observability_onboarding/common/elastic_agent_logs/system_logs/__snapshots__/generate_system_logs_yml.test.ts.snap # x-pack/plugins/observability_solution/observability_onboarding/common/elastic_agent_logs/system_logs/generate_system_logs_yml.ts # x-pack/plugins/observability_solution/uptime/e2e/tasks/read_kibana_config.ts # x-pack/plugins/osquery/docs/openapi/ess/osquery_api_2023_10_31.bundled.schema.yaml # x-pack/plugins/osquery/docs/openapi/serverless/osquery_api_2023_10_31.bundled.schema.yaml # x-pack/plugins/security_solution/docs/openapi/ess/security_solution_endpoint_management_api_2023_10_31.bundled.schema.yaml # x-pack/plugins/security_solution/docs/openapi/ess/security_solution_entity_analytics_api_2023_10_31.bundled.schema.yaml # x-pack/plugins/security_solution/docs/openapi/serverless/security_solution_endpoint_management_api_2023_10_31.bundled.schema.yaml # x-pack/plugins/security_solution/docs/openapi/serverless/security_solution_entity_analytics_api_2023_10_31.bundled.schema.yaml # x-pack/solutions/observability/plugins/observability_onboarding/server/routes/flow/route.ts # x-pack/solutions/observability/plugins/observability_onboarding/tsconfig.json # x-pack/solutions/security/packages/kbn-securitysolution-lists-common/docs/openapi/ess/security_solution_lists_api_2023_10_31.bundled.schema.yaml # x-pack/solutions/security/packages/kbn-securitysolution-lists-common/docs/openapi/serverless/security_solution_lists_api_2023_10_31.bundled.schema.yaml # x-pack/solutions/security/plugins/security_solution/docs/openapi/ess/security_solution_detections_api_2023_10_31.bundled.schema.yaml # x-pack/solutions/security/plugins/security_solution/docs/openapi/ess/security_solution_timeline_api_2023_10_31.bundled.schema.yaml # x-pack/solutions/security/plugins/security_solution/docs/openapi/serverless/security_solution_detections_api_2023_10_31.bundled.schema.yaml # x-pack/solutions/security/plugins/security_solution/docs/openapi/serverless/security_solution_timeline_api_2023_10_31.bundled.schema.yaml # x-pack/test/observability_onboarding_api_integration/tests/elastic_agent/config.spec.ts # yarn.lock
# Backport This will backport the following commits from `main` to `8.19`: - [Updated js-yaml to v4 (#190678)](#190678) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Elena Shostak","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-19T10:25:03Z","message":"Updated js-yaml to v4 (#190678)\n\n## Summary\r\nUpdated `js-yaml` to `4.1.0`.\r\n\r\nThis PR also introduces a type override for the `js-yaml` load function\r\nto maintain compatibility across the codebase. Specifically, updated\r\ntype definition of the load function looks as follows:\r\n\r\n```typescript\r\nfunction load<T = any>(str: string, opts?: jsyaml.LoadOptions): T;\r\n```\r\n\r\nThe original type definition of the load function in `js-yaml` changed\r\nfrom `any` to `unknown`. This change would require extensive type\r\nupdates throughout the entire repository to accommodate the `unknown`\r\ntype. To avoid widespread type changes and potential issues in the\r\ncodebase, the type is overriden back to `any` for now.\r\nThis is a temporary measure, we plan to address the necessary type\r\nchanges in subsequent PRs, where teams will gradually update the\r\ncodebase to work with the `unknown` type.\r\n\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n## Release note\r\nUpdated `js-yaml` to `4.1.0`.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: Maxim Palenov <[email protected]>","sha":"28aa274f665b1aff891bf055a592851c8ec53d30","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","Team:Security","backport:skip","Team:Fleet","v9.0.0","Team:Obs AI Assistant","ci:project-deploy-observability","Team:obs-ux-infra_services","Team:obs-ux-management","apm:review"],"title":"Updated js-yaml to v4","number":190678,"url":"https://github.com/elastic/kibana/pull/190678","mergeCommit":{"message":"Updated js-yaml to v4 (#190678)\n\n## Summary\r\nUpdated `js-yaml` to `4.1.0`.\r\n\r\nThis PR also introduces a type override for the `js-yaml` load function\r\nto maintain compatibility across the codebase. Specifically, updated\r\ntype definition of the load function looks as follows:\r\n\r\n```typescript\r\nfunction load<T = any>(str: string, opts?: jsyaml.LoadOptions): T;\r\n```\r\n\r\nThe original type definition of the load function in `js-yaml` changed\r\nfrom `any` to `unknown`. This change would require extensive type\r\nupdates throughout the entire repository to accommodate the `unknown`\r\ntype. To avoid widespread type changes and potential issues in the\r\ncodebase, the type is overriden back to `any` for now.\r\nThis is a temporary measure, we plan to address the necessary type\r\nchanges in subsequent PRs, where teams will gradually update the\r\ncodebase to work with the `unknown` type.\r\n\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n## Release note\r\nUpdated `js-yaml` to `4.1.0`.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: Maxim Palenov <[email protected]>","sha":"28aa274f665b1aff891bf055a592851c8ec53d30"}},"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/190678","number":190678,"mergeCommit":{"message":"Updated js-yaml to v4 (#190678)\n\n## Summary\r\nUpdated `js-yaml` to `4.1.0`.\r\n\r\nThis PR also introduces a type override for the `js-yaml` load function\r\nto maintain compatibility across the codebase. Specifically, updated\r\ntype definition of the load function looks as follows:\r\n\r\n```typescript\r\nfunction load<T = any>(str: string, opts?: jsyaml.LoadOptions): T;\r\n```\r\n\r\nThe original type definition of the load function in `js-yaml` changed\r\nfrom `any` to `unknown`. This change would require extensive type\r\nupdates throughout the entire repository to accommodate the `unknown`\r\ntype. To avoid widespread type changes and potential issues in the\r\ncodebase, the type is overriden back to `any` for now.\r\nThis is a temporary measure, we plan to address the necessary type\r\nchanges in subsequent PRs, where teams will gradually update the\r\ncodebase to work with the `unknown` type.\r\n\r\n\r\n### Checklist\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n## Release note\r\nUpdated `js-yaml` to `4.1.0`.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: Maxim Palenov <[email protected]>","sha":"28aa274f665b1aff891bf055a592851c8ec53d30"}}]}] BACKPORT--> --------- Co-authored-by: kibanamachine <[email protected]>
Summary
Updated
js-yamlto4.1.0.This PR also introduces a type override for the
js-yamlload function to maintain compatibility across the codebase. Specifically, updated type definition of the load function looks as follows:The original type definition of the load function in
js-yamlchanged fromanytounknown. This change would require extensive type updates throughout the entire repository to accommodate theunknowntype. To avoid widespread type changes and potential issues in the codebase, the type is overriden back toanyfor now.This is a temporary measure, we plan to address the necessary type changes in subsequent PRs, where teams will gradually update the codebase to work with the
unknowntype.Checklist
Release note
Updated
js-yamlto4.1.0.