diff --git a/.github/workflows/lighthouse.yml b/.github/workflows/lighthouse.yml index 6c79df1..536b21e 100644 --- a/.github/workflows/lighthouse.yml +++ b/.github/workflows/lighthouse.yml @@ -16,7 +16,7 @@ jobs: steps: - name: Check out repository - uses: actions/checkout@v6 + uses: actions/checkout@v7 - name: Verify embedded ApplicationSet Studio runtime run: python3 scripts/embed-applicationset-studio-runtime.py --check @@ -33,6 +33,9 @@ jobs: - name: Test JSON and YAML comparison run: node --test scripts/json-diff.test.cjs + - name: Test YAML parser compatibility + run: node --test scripts/yaml-compatibility.test.cjs + - name: Test timestamp parsing and comparison run: node --test scripts/timestamp-converter.test.cjs diff --git a/.github/workflows/redirects.yml b/.github/workflows/redirects.yml index 8a44333..18ad9dd 100644 --- a/.github/workflows/redirects.yml +++ b/.github/workflows/redirects.yml @@ -14,7 +14,7 @@ jobs: timeout-minutes: 10 steps: - name: Check out repository - uses: actions/checkout@v6 + uses: actions/checkout@v7 - name: Check deployed redirects and canonical destinations run: python3 scripts/check-redirects.py diff --git a/.github/workflows/terraform-modules.yml b/.github/workflows/terraform-modules.yml index b0ddf30..d02963e 100644 --- a/.github/workflows/terraform-modules.yml +++ b/.github/workflows/terraform-modules.yml @@ -37,10 +37,10 @@ jobs: steps: - name: Check out repository - uses: actions/checkout@v6 + uses: actions/checkout@v7 - name: Install JSON Schema validator - run: python3 -m pip install --disable-pip-version-check check-jsonschema==0.38.0 + run: python3 -m pip install --disable-pip-version-check check-jsonschema==0.39.0 - name: Validate catalogue schema run: check-jsonschema --schemafile terraform-modules/modules.schema.json terraform-modules/modules.json @@ -59,10 +59,10 @@ jobs: steps: - name: Check out repository - uses: actions/checkout@v6 + uses: actions/checkout@v7 - name: Install JSON Schema validator - run: python3 -m pip install --disable-pip-version-check check-jsonschema==0.38.0 + run: python3 -m pip install --disable-pip-version-check check-jsonschema==0.39.0 - name: Refresh Registry and GitHub metadata env: diff --git a/README.md b/README.md index 1b6a8cb..0d71d64 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,8 @@ Git, or an SCM provider, and generated output should be verified with the ApplicationSet controller before production use. The Studio ships one embedded v1 browser runtime so it also works on enterprise -networks that block JavaScript file responses. It includes js-yaml 5.2.2. After +networks that block JavaScript file responses. It embeds the shared js-yaml +5.5.0 browser bundle from `yaml-formatter/vendor/`. After changing `app.js` or upgrading the vendored parser, refresh and verify the page: ```sh @@ -88,7 +89,7 @@ can copy or download the formatted result. The shorter `/json-formatter/` alias redirects to this tool. -YAML parsing and serialization use the vendored `js-yaml` 4.1.0 browser +YAML parsing and serialization use the vendored `js-yaml` 5.5.0 browser bundle, distributed under the MIT license included with the tool. ## JSON & YAML Diff Checker @@ -153,7 +154,7 @@ snapshots, generates narrowly scoped RBAC drafts, and exports a Markdown review. The explorer accepts multi-document YAML, JSON arrays, and Kubernetes `List` objects. Parsing and analysis stay in the browser. Secret objects are rejected, and users should never provide a kubeconfig, token, or other credentials. YAML -input uses the existing vendored `js-yaml` 4.1.0 bundle. +input uses the shared vendored `js-yaml` 5.5.0 bundle. The random sample library demonstrates namespace read-only access, deployment operations, sensitive cluster access, RBAC administration, aggregated diff --git a/argocd-applicationset-studio/app.js b/argocd-applicationset-studio/app.js index c4fb645..85146b4 100644 --- a/argocd-applicationset-studio/app.js +++ b/argocd-applicationset-studio/app.js @@ -799,11 +799,9 @@ spec: if (text.length > MAX_INPUT_LENGTH) { throw new Error(`${label} exceeds the 2 MB local preview limit.`); } - const documents = []; + let documents; try { - window.jsyaml.loadAll(text, (document) => { - if (document !== null && document !== undefined) documents.push(document); - }, YAML_LOAD_OPTIONS); + documents = window.jsyaml.loadAll(text, YAML_LOAD_OPTIONS).filter((document) => document != null); } catch (error) { const location = error.mark ? ` at line ${error.mark.line + 1}, column ${error.mark.column + 1}` diff --git a/argocd-applicationset-studio/index.html b/argocd-applicationset-studio/index.html index a9eac89..179b72a 100644 --- a/argocd-applicationset-studio/index.html +++ b/argocd-applicationset-studio/index.html @@ -632,38 +632,45 @@