mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
Updated js-yaml to v4 (#190678)
## 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 <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Maxim Palenov <maxim.palenov@elastic.co>
This commit is contained in:
parent
eabb102281
commit
28aa274f66
130 changed files with 514 additions and 490 deletions
|
@ -20,7 +20,7 @@ var allManifestPaths = Object.values(manifestsSource).flat();
|
|||
|
||||
try {
|
||||
for (var manifestRelPath of allManifestPaths) {
|
||||
var manifest = yaml.safeLoad(fs.readFileSync(manifestRelPath, 'utf8'));
|
||||
var manifest = yaml.load(fs.readFileSync(manifestRelPath, 'utf8'));
|
||||
if (manifest.enabled) {
|
||||
manifest.enabled.forEach(function (x) {
|
||||
console.log(x);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue