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

fix(ui): switch from js-yaml to yaml. Fixes #12205 #13750

Merged
merged 1 commit into from
Oct 14, 2024

Conversation

MasonM
Copy link
Contributor

@MasonM MasonM commented Oct 13, 2024

Fixes #12205

Motivation

js-yaml has had no releases in over 3 years. Also, the fact it only supports YAML 1.2 is leading to bugs, since Kubernetes uses YAML 1.1 (see kubernetes/kubernetes#34146).

Modifications

This switches over to yaml, which had a release last month, is licensed under ISC, and supports YAML 1.1. I also added test cases for the parsing/stringifying code.

Verification

Copied the example from #12205 over to http://localhost:8080/workflow-templates and verified the mode: 0755 was changed to mode: 493:

fix-12205.mp4

[js-yaml](https://www.npmjs.com/package/js-yaml) has had no releases in
over 3 years. Also, the fact it only supports YAML 1.2 is leading to
bugs, since Kubernetes uses YAML 1.1 (see
kubernetes/kubernetes#34146).

This switches over to [yaml](https://www.npmjs.com/package/yaml), which
had a release last month, is [licensed under
ISC](https://github.com/eemeli/yaml/blob/main/LICENSE), and supports
YAML 1.1. I also added test cases for the parsing/stringifying code.

Signed-off-by: Mason Malone <[email protected]>
@MasonM MasonM marked this pull request as ready for review October 13, 2024 18:46
Copy link
Member

@isubasinghe isubasinghe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@isubasinghe isubasinghe merged commit 0dfecd6 into argoproj:main Oct 14, 2024
16 checks passed
@agilgur5 agilgur5 changed the title fix(ui): switch from js-yaml to yaml. Fixes #12205 fix(ui): switch from js-yaml to yaml. Fixes #12205 Oct 14, 2024
@agilgur5 agilgur5 added type/dependencies PRs and issues specific to updating dependencies area/ui javascript Pull requests that update Javascript dependencies labels Oct 14, 2024
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For reference, js-yaml was not removed from the yarn.lock as it's still used by some devDeps like ESLint and Istanbul, and also by the Swagger UI.

Copy link
Contributor

@agilgur5 agilgur5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like yaml is a decent bit bigger than js-yaml (noticed while doing bundle analysis for #12611). We may want to consider a smaller dep or code-splitting out its usage a la #12059

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ui javascript Pull requests that update Javascript dependencies type/dependencies PRs and issues specific to updating dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mode: 0755 with "kubectl apply" -> mode: 493 with the UI
3 participants