-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[js-yaml to yaml migration] @elastic/fleet #252345
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
Merged
jeramysoucy
merged 55 commits into
elastic:main
from
jeramysoucy:migrate-js-yaml-to-yaml--elastic-fleet
Apr 14, 2026
Merged
Changes from all commits
Commits
Show all changes
55 commits
Select commit
Hold shift + click to select a range
8c69358
[js-yaml to yaml migration] Migrate @elastic/fleet files\n\nMigrate f…
jeramysoucy 3bedfd2
Reduces complexity of agent policy to yaml
jeramysoucy de3d418
Fixes two replacements missed by Cursor
jeramysoucy 451035d
Changes from node scripts/eslint_all_files --no-cache --fix
kibanamachine 03e3dd1
Fixes another Cursor miss
jeramysoucy 301acac
Increases bundle limit for the Fleet plugin
jeramysoucy c43f145
Resolve unit test failures
jeramysoucy 0170d6f
Removes unused function input
jeramysoucy e859566
Resolves parsing differences from js-yaml
jeramysoucy b82d38f
Update YAML output formatting in getTemplateInputs and addCommentsToY…
jeramysoucy b8210e3
Fix error message formatting in parseAndVerifyArchive function to ens…
jeramysoucy fab2c15
Update contentForInstallation formatting to use single quotes
jeramysoucy 51bdcb3
Updates error check based on review feedback
jeramysoucy 99c8c13
Modularizes toYaml functionality in fullAgentConfigMapToYaml and full…
jeramysoucy ff5853e
Replaces import of toYaml with mock function in test file
jeramysoucy 521de77
Implements async loading of yaml
jeramysoucy 6fba99c
Changes from node scripts/generate codeowners
kibanamachine a823a22
Changes from node scripts/regenerate_moon_projects.js --update
kibanamachine a8620cf
Removes new usage of js-yaml
jeramysoucy 49e3883
Updates flyout to remove js-yaml - lost change
jeramysoucy 9701265
Fixes type issues
jeramysoucy c194741
Fixes moon file for new package
jeramysoucy ce8c12a
Fixes jest integration test failures
jeramysoucy 04b4802
Updates async loading to cache module
jeramysoucy b0f6c79
Updates cypress test code to account for async loading
jeramysoucy daba1c1
Update initialization in package policy input panel
jeramysoucy b6d4fca
Monaco editor test changes to address timeout failures
jeramysoucy 7e3cbfc
Address qa feedback
jeramysoucy a3e1bb8
Resolves advanced yaml settings issue
jeramysoucy 973357d
Add meta IDs to fleet output schemas for named OAS components (#258986)
TinaHeiligers 267fb83
[ResponseOps][Alerting] Alerting v2 (#247464)
cnasikas 6b52805
[Agent Builder] Add attachment origin to Converse API (#259043)
machadoum 7bec125
[Fleet] Update doc links in agent policy settings (#260245)
criamico 8ce27a1
[Observability:Streams] Add await for monaco code editor to fix query…
couvq 69fda14
Merge branch 'main' into migrate-js-yaml-to-yaml--elastic-fleet
jeramysoucy d87ef12
Changes from node scripts/lint.js --fix
kibanamachine a4e8274
Reverts bad merge changes
jeramysoucy aebda7f
Merge branch 'main' into migrate-js-yaml-to-yaml--elastic-fleet
jeramysoucy 389bb00
Fix duplicate import
jeramysoucy 55bf994
Changes from node scripts/regenerate_moon_projects.js --update
kibanamachine 0cbac49
Addresses review feedback
jeramysoucy 012d1f5
Merge branch 'main' into migrate-js-yaml-to-yaml--elastic-fleet
jeramysoucy 8acce6a
Merge branch 'main' into migrate-js-yaml-to-yaml--elastic-fleet
jeramysoucy a31c485
Resolves test failure
jeramysoucy 57c433b
Merge branch 'main' into migrate-js-yaml-to-yaml--elastic-fleet
jeramysoucy f1991b3
Merge branch 'main' into migrate-js-yaml-to-yaml--elastic-fleet
jeramysoucy 6511b6e
Fix validateYamlConfig ReferenceError in otelExporterConfigInput
jeramysoucy 0b674f3
Resolves bad merge
jeramysoucy 789c915
Merge branch 'main' into migrate-js-yaml-to-yaml--elastic-fleet
jeramysoucy 0520857
Removes unused variable
jeramysoucy 6b5a79a
Merge branch 'main' into migrate-js-yaml-to-yaml--elastic-fleet
jeramysoucy bdfa1f5
Merge branch 'main' into migrate-js-yaml-to-yaml--elastic-fleet
jeramysoucy 308057c
Removes unused transaltions
jeramysoucy c6fcf53
Merge branch 'main' into migrate-js-yaml-to-yaml--elastic-fleet
jeramysoucy d03d926
Merge branch 'main' into migrate-js-yaml-to-yaml--elastic-fleet
jeramysoucy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the "Elastic License | ||
| * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
| * Public License v 1"; you may not use this file except in compliance with, at | ||
| * your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
| * License v3.0 only", or the "Server Side Public License, v 1". | ||
| */ | ||
|
|
||
| export { loadYaml } from './src/load_yaml'; | ||
| export type { Document, Pair } from './src/types'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "type": "shared-common", | ||
| "id": "@kbn/yaml-loader", | ||
| "owner": ["@elastic/fleet"], | ||
| "group": "platform", | ||
| "visibility": "shared", | ||
| "description": "Async loader for the yaml package to enable code-splitting and reduce initial bundle size" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # This file is generated by the @kbn/moon package. Any manual edits will be erased! | ||
| # To extend this, write your extensions/overrides to 'moon.extend.yml' | ||
| # then regenerate this file with: 'node scripts/regenerate_moon_projects.js --update --filter @kbn/yaml-loader' | ||
|
|
||
| $schema: https://moonrepo.dev/schemas/project.json | ||
| id: '@kbn/yaml-loader' | ||
| layer: unknown | ||
| owners: | ||
| defaultOwner: '@elastic/fleet' | ||
| toolchains: | ||
| default: node | ||
| javascript: | ||
| rootPackageDependenciesOnly: false | ||
| language: typescript | ||
| project: | ||
| title: '@kbn/yaml-loader' | ||
| description: Moon project for @kbn/yaml-loader | ||
| channel: '' | ||
| owner: '@elastic/fleet' | ||
| sourceRoot: src/platform/packages/shared/kbn-yaml-loader | ||
| dependsOn: [] | ||
| tags: | ||
| - shared-common | ||
| - package | ||
| - prod | ||
| - group-platform | ||
| - shared | ||
| fileGroups: | ||
| src: | ||
| - '**/*.ts' | ||
| - '!target/**/*' | ||
| tasks: {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "name": "@kbn/yaml-loader", | ||
| "private": true, | ||
| "version": "1.0.0", | ||
| "license": "Elastic License 2.0 OR AGPL-3.0-only OR SSPL-1.0", | ||
| "main": "index.ts", | ||
| "types": "index.ts", | ||
| "dependencies": { | ||
| "yaml": "2.8.1" | ||
| } | ||
| } |
17 changes: 17 additions & 0 deletions
17
src/platform/packages/shared/kbn-yaml-loader/src/load_yaml.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the "Elastic License | ||
| * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
| * Public License v 1"; you may not use this file except in compliance with, at | ||
| * your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
| * License v3.0 only", or the "Server Side Public License, v 1". | ||
| */ | ||
|
|
||
| /** | ||
| * Loads the yaml package asynchronously. Use this in browser code to avoid | ||
| * pulling the full yaml library into the initial bundle. | ||
| * The returned promise resolves to the yaml module (parse, stringify, Document, etc.). | ||
| */ | ||
| export const loadYaml = (): Promise<typeof import('yaml')> => { | ||
| return import('yaml'); | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| /* | ||
| * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
| * or more contributor license agreements. Licensed under the "Elastic License | ||
| * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side | ||
| * Public License v 1"; you may not use this file except in compliance with, at | ||
| * your election, the "Elastic License 2.0", the "GNU Affero General Public | ||
| * License v3.0 only", or the "Server Side Public License, v 1". | ||
| */ | ||
|
|
||
| /** | ||
| * Type-only re-exports from the yaml package so consumers can type their APIs | ||
| * without pulling in the runtime. Use loadYaml() for runtime usage. | ||
| */ | ||
| export type { Document, Pair } from 'yaml'; |
10 changes: 10 additions & 0 deletions
10
src/platform/packages/shared/kbn-yaml-loader/tsconfig.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "extends": "@kbn/tsconfig-base/tsconfig.json", | ||
| "compilerOptions": { | ||
| "outDir": "target/types", | ||
| "types": ["node"] | ||
| }, | ||
| "include": ["**/*.ts"], | ||
| "exclude": ["target/**/*"], | ||
| "kbn_references": [] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 might be overkill