From 6bd0619a47b120b778a8767d6b6f4257c3c59521 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 26 Jun 2026 06:12:21 +0000 Subject: [PATCH 1/2] deps: bump js-yaml from 4.2.0 to 5.1.0 in /scripts Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.2.0 to 5.1.0. - [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md) - [Commits](https://github.com/nodeca/js-yaml/compare/4.2.0...5.1.0) --- updated-dependencies: - dependency-name: js-yaml dependency-version: 5.1.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- scripts/package.json | 2 +- scripts/yarn.lock | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/package.json b/scripts/package.json index de2c93f..5e84421 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "glob": "13.0.6", - "js-yaml": "4.2.0", + "js-yaml": "5.1.0", "tsx": "4.22.4" }, "devDependencies": { diff --git a/scripts/yarn.lock b/scripts/yarn.lock index 7e0a640..1682029 100644 --- a/scripts/yarn.lock +++ b/scripts/yarn.lock @@ -12,7 +12,7 @@ __metadata: "@types/js-yaml": "npm:4.0.9" "@types/node": "npm:26.0.1" glob: "npm:13.0.6" - js-yaml: "npm:4.2.0" + js-yaml: "npm:5.1.0" tsx: "npm:4.22.4" typescript: "npm:6.0.3" languageName: unknown @@ -546,14 +546,14 @@ __metadata: languageName: node linkType: hard -"js-yaml@npm:4.2.0": - version: 4.2.0 - resolution: "js-yaml@npm:4.2.0" +"js-yaml@npm:5.1.0": + version: 5.1.0 + resolution: "js-yaml@npm:5.1.0" dependencies: argparse: "npm:^2.0.1" bin: - js-yaml: bin/js-yaml.js - checksum: 10c0/1916456c118746603b067d74bbcbb0445d9a1d5e474ad4ae775e7b20525bed902e01d9d97dd0c81fcd8d4f596162309d0eb057f4aa38f3e9647f14075e9dea45 + js-yaml: bin/js-yaml.mjs + checksum: 10c0/a21c3817fb736ab3215c9d1ffb0a94823d02ecb51b481e88ab4bf0f9522baccbe9168bdf265bc315124d5087e2261de93e56176c2a7cd589d8275a18d7b3316e languageName: node linkType: hard From b4e326863d7edda071d4400671ec0fa93dea4def Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamila=20=C5=9Aroda?= Date: Fri, 26 Jun 2026 08:18:00 +0200 Subject: [PATCH 2/2] deps: migrate scripts to js-yaml 5 API js-yaml 5 dropped the default export, breaking the CI validate job. Switch to named imports (load/dump), migrate the deprecated dump option quotingType: '"' to quoteStyle: "double", and drop the now redundant @types/js-yaml (v5 ships its own types). Co-Authored-By: Claude Opus 4.8 (1M context) --- scripts/aggregate-manifests.ts | 8 ++++---- scripts/extract-snippets.ts | 24 +++++++++++++++--------- scripts/package.json | 1 - scripts/validate-structure.ts | 4 ++-- scripts/yarn.lock | 8 -------- 5 files changed, 21 insertions(+), 24 deletions(-) diff --git a/scripts/aggregate-manifests.ts b/scripts/aggregate-manifests.ts index 4305f4a..a9e86d7 100644 --- a/scripts/aggregate-manifests.ts +++ b/scripts/aggregate-manifests.ts @@ -1,6 +1,6 @@ import { readFileSync, writeFileSync } from "fs"; import { glob } from "glob"; -import yaml from "js-yaml"; +import { load, dump } from "js-yaml"; import path from "path"; import { fileURLToPath } from "url"; @@ -64,7 +64,7 @@ async function main() { for (const file of manifestFiles.sort()) { const fullPath = path.join(SAMPLES, file); const content = readFileSync(fullPath, "utf-8"); - const manifest = yaml.load(content) as FrameworkManifest; + const manifest = load(content) as FrameworkManifest; frameworks[manifest.framework] = { label: manifest.label, @@ -110,10 +110,10 @@ async function main() { ); const output = { frameworks: orderedFrameworks, scenarios }; - const yamlStr = yaml.dump(output, { + const yamlStr = dump(output, { lineWidth: 120, noRefs: true, - quotingType: '"', + quoteStyle: "double", }); const outputPath = path.join(ROOT, "snippet-manifest.yaml"); writeFileSync( diff --git a/scripts/extract-snippets.ts b/scripts/extract-snippets.ts index ea65883..5826e2d 100644 --- a/scripts/extract-snippets.ts +++ b/scripts/extract-snippets.ts @@ -1,6 +1,6 @@ import { readdirSync, readFileSync, writeFileSync } from "fs"; import { glob } from "glob"; -import yaml from "js-yaml"; +import { load } from "js-yaml"; import path from "path"; import { fileURLToPath } from "url"; @@ -62,7 +62,7 @@ function getPlaceholderMap(): PlaceholderMap { path.join(ROOT, "placeholder-map.yaml"), "utf-8", ); - return yaml.load(content) as PlaceholderMap; + return load(content) as PlaceholderMap; } function applyPlaceholders( @@ -84,7 +84,7 @@ function getLibVersion( manifestDir: string, libOverride?: string, ): string { - const manifest = yaml.load( + const manifest = load( readFileSync(path.join(manifestDir, "manifest.yaml"), "utf-8"), ) as FrameworkManifest; const lib = libOverride ?? manifest.lib; @@ -135,7 +135,7 @@ function getLibVersion( // Flutter — pubspec.yaml dependencies try { - const pubspec = yaml.load( + const pubspec = load( readFileSync(path.join(scenarioDir, "pubspec.yaml"), "utf-8"), ) as { dependencies?: Record }; const dep = pubspec?.dependencies?.[lib]; @@ -223,9 +223,11 @@ function getLibVersion( // lives inside *.xcworkspace/, which is typically gitignored, so CI checkouts // can't see it; project.yml is the committed source of truth for SPM pins. try { - const projectYml = yaml.load( + const projectYml = load( readFileSync(path.join(scenarioDir, "project.yml"), "utf-8"), - ) as { packages?: Record }; + ) as { + packages?: Record; + }; const libLower = lib.toLowerCase(); for (const [name, pkg] of Object.entries(projectYml?.packages ?? {})) { const url = (pkg?.url || "").toLowerCase(); @@ -291,7 +293,9 @@ function getLibVersion( if (module === libLower) { // Extract version.ref or version from this entry const entry = libMatch[0]; - const versionRefMatch = entry.match(/version\.ref\s*=\s*["']([^"']+)["']/); + const versionRefMatch = entry.match( + /version\.ref\s*=\s*["']([^"']+)["']/, + ); if (versionRefMatch) { const ref = versionRefMatch[1]; const versionLineRegex = new RegExp( @@ -301,7 +305,9 @@ function getLibVersion( const vMatch = versionsBlock.match(versionLineRegex); if (vMatch) return vMatch[1]; } - const versionMatch = entry.match(/version\s*=\s*["']([0-9][^"']+)["']/); + const versionMatch = entry.match( + /version\s*=\s*["']([0-9][^"']+)["']/, + ); if (versionMatch) return versionMatch[1]; } } @@ -439,7 +445,7 @@ async function main() { for (const manifestFile of manifestFiles.sort()) { const frameworkDir = path.join(SAMPLES, path.dirname(manifestFile)); const content = readFileSync(path.join(SAMPLES, manifestFile), "utf-8"); - const manifest = yaml.load(content) as FrameworkManifest; + const manifest = load(content) as FrameworkManifest; const fw = manifest.framework; const lang = manifest.lang; diff --git a/scripts/package.json b/scripts/package.json index 5e84421..833e2ae 100644 --- a/scripts/package.json +++ b/scripts/package.json @@ -15,7 +15,6 @@ "tsx": "4.22.4" }, "devDependencies": { - "@types/js-yaml": "4.0.9", "@types/node": "26.0.1", "typescript": "6.0.3" } diff --git a/scripts/validate-structure.ts b/scripts/validate-structure.ts index b109c37..40ef08e 100644 --- a/scripts/validate-structure.ts +++ b/scripts/validate-structure.ts @@ -1,6 +1,6 @@ import { existsSync, readFileSync } from "fs"; import { glob } from "glob"; -import yaml from "js-yaml"; +import { load } from "js-yaml"; import path from "path"; import { fileURLToPath } from "url"; @@ -41,7 +41,7 @@ async function main() { for (const manifestFile of manifestFiles) { const frameworkDir = path.join(SAMPLES, path.dirname(manifestFile)); const content = readFileSync(path.join(SAMPLES, manifestFile), "utf-8"); - const manifest = yaml.load(content) as FrameworkManifest; + const manifest = load(content) as FrameworkManifest; for (const scenarioId of Object.keys(manifest.scenarios)) { const dirName = scenarioId.replace(/^[^_]+_/, "").replaceAll("_", "-"); diff --git a/scripts/yarn.lock b/scripts/yarn.lock index 1682029..1ba24e3 100644 --- a/scripts/yarn.lock +++ b/scripts/yarn.lock @@ -9,7 +9,6 @@ __metadata: version: 0.0.0-use.local resolution: "@ciam-quickstart/scripts@workspace:." dependencies: - "@types/js-yaml": "npm:4.0.9" "@types/node": "npm:26.0.1" glob: "npm:13.0.6" js-yaml: "npm:5.1.0" @@ -245,13 +244,6 @@ __metadata: languageName: node linkType: hard -"@types/js-yaml@npm:4.0.9": - version: 4.0.9 - resolution: "@types/js-yaml@npm:4.0.9" - checksum: 10c0/24de857aa8d61526bbfbbaa383aa538283ad17363fcd5bb5148e2c7f604547db36646440e739d78241ed008702a8920665d1add5618687b6743858fae00da211 - languageName: node - linkType: hard - "@types/node@npm:26.0.1": version: 26.0.1 resolution: "@types/node@npm:26.0.1"