Skip to content

Commit

Permalink
chore(deps): bump js-yaml and @types/js-yaml in /ui (#18168)
Browse files Browse the repository at this point in the history
* chore(deps): bump js-yaml and @types/js-yaml in /ui

Bumps [js-yaml](https://github.com/nodeca/js-yaml) and [@types/js-yaml](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/js-yaml). These dependencies needed to be updated together.

Updates `js-yaml` from 3.14.1 to 4.1.0
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](nodeca/js-yaml@3.14.1...4.1.0)

Updates `@types/js-yaml` from 3.12.1 to 4.0.9
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/js-yaml)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: "@types/js-yaml"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* use new function names

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
  • Loading branch information
dependabot[bot] and crenshaw-dev committed May 12, 2024
1 parent f4fd97d commit df3bb3e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions ui/package.json
Expand Up @@ -25,7 +25,7 @@
"foundation-sites": "^6.7.5",
"git-url-parse": "^13.1.0",
"history": "^4.7.2",
"js-yaml": "^3.14.1",
"js-yaml": "^4.1.0",
"json-merge-patch": "^0.2.3",
"lodash-es": "^4.17.21",
"minimatch": "^3.1.2",
Expand Down Expand Up @@ -76,7 +76,7 @@
"@types/deepmerge": "^2.2.0",
"@types/git-url-parse": "^9.0.1",
"@types/jest": "^24.0.13",
"@types/js-yaml": "^3.11.2",
"@types/js-yaml": "^4.0.9",
"@types/lodash-es": "^4.17.6",
"@types/minimatch": "^3.0.3",
"@types/node": "20.6.3",
Expand Down
Expand Up @@ -266,7 +266,7 @@ export const ApplicationParameters = (props: {
input.spec.source.plugin.parameters = params;
}
if (input.spec.source.helm && input.spec.source.helm.valuesObject) {
input.spec.source.helm.valuesObject = jsYaml.safeLoad(input.spec.source.helm.values); // Deserialize json
input.spec.source.helm.valuesObject = jsYaml.load(input.spec.source.helm.values); // Deserialize json
input.spec.source.helm.values = '';
}
await props.save(input, {});
Expand All @@ -287,7 +287,7 @@ export const ApplicationParameters = (props: {
}

if (updatedApp.spec.source.helm && updatedApp.spec.source.helm.values) {
const parsedValues = jsYaml.safeLoad(updatedApp.spec.source.helm.values);
const parsedValues = jsYaml.load(updatedApp.spec.source.helm.values);
errors['spec.source.helm.values'] = typeof parsedValues === 'object' ? null : 'Values must be a map';
}

Expand Down Expand Up @@ -486,7 +486,7 @@ function gatherDetails(
}
} else if (repoDetails.type === 'Helm' && repoDetails.helm) {
const isValuesObject = source?.helm?.valuesObject;
const helmValues = isValuesObject ? jsYaml.safeDump(source.helm.valuesObject) : source?.helm?.values;
const helmValues = isValuesObject ? jsYaml.dump(source.helm.valuesObject) : source?.helm?.values;
attributes.push({
title: 'VALUES FILES',
view: (source.helm && (source.helm.valueFiles || []).join(', ')) || 'No values files selected',
Expand Down
Expand Up @@ -20,8 +20,8 @@ export const ApplicationResourcesDiff = (props: ApplicationResourcesDiffProps) =
const diffText = props.states
.map(state => {
return {
a: state.normalizedLiveState ? jsYaml.safeDump(state.normalizedLiveState, {indent: 2}) : '',
b: state.predictedLiveState ? jsYaml.safeDump(state.predictedLiveState, {indent: 2}) : '',
a: state.normalizedLiveState ? jsYaml.dump(state.normalizedLiveState, {indent: 2}) : '',
b: state.predictedLiveState ? jsYaml.dump(state.predictedLiveState, {indent: 2}) : '',
hook: state.hook,
// doubles as sort order
name: (state.group || '') + '/' + state.kind + '/' + (state.namespace ? state.namespace + '/' : '') + state.name
Expand Down
4 changes: 2 additions & 2 deletions ui/src/app/shared/components/yaml-editor/yaml-editor.tsx
Expand Up @@ -32,7 +32,7 @@ export class YamlEditor<T> extends React.Component<

public render() {
const props = this.props;
const yaml = props.input ? jsYaml.safeDump(props.input) : '';
const yaml = props.input ? jsYaml.dump(props.input) : '';

return (
<div className='yaml-editor'>
Expand Down Expand Up @@ -74,7 +74,7 @@ export class YamlEditor<T> extends React.Component<
</button>{' '}
<button
onClick={() => {
this.model.setValue(jsYaml.safeDump(props.input));
this.model.setValue(jsYaml.dump(props.input));
this.setState({editing: !this.state.editing});
if (props.onCancel) {
props.onCancel();
Expand Down
10 changes: 5 additions & 5 deletions ui/yarn.lock
Expand Up @@ -1927,10 +1927,10 @@
dependencies:
"@types/jest-diff" "*"

"@types/js-yaml@^3.11.2":
version "3.12.1"
resolved "https://registry.yarnpkg.com/@types/js-yaml/-/js-yaml-3.12.1.tgz#5c6f4a1eabca84792fbd916f0cb40847f123c656"
integrity sha512-SGGAhXLHDx+PK4YLNcNGa6goPf9XRWQNAUUbffkwVGGXIxmDKWyGGL4inzq2sPmExu431Ekb9aEMn9BkPqEYFA==
"@types/js-yaml@^4.0.9":
version "4.0.9"
resolved "https://registry.yarnpkg.com/@types/js-yaml/-/js-yaml-4.0.9.tgz#cd82382c4f902fed9691a2ed79ec68c5898af4c2"
integrity sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==

"@types/json-schema@*", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9":
version "7.0.11"
Expand Down Expand Up @@ -6860,7 +6860,7 @@ js-levenshtein@^1.1.3, js-levenshtein@^1.1.6:
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==

js-yaml@3.14.1, js-yaml@^3.13.1, js-yaml@^3.14.1, js-yaml@^3.9.0:
js-yaml@3.14.1, js-yaml@^3.13.1, js-yaml@^3.9.0:
version "3.14.1"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537"
integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==
Expand Down

0 comments on commit df3bb3e

Please sign in to comment.