diff --git a/package.json b/package.json index c07508189..b436304e4 100644 --- a/package.json +++ b/package.json @@ -38,11 +38,10 @@ "@rnx-kit/tools-git": "^0.1.1", "@swc-node/register": "^1.11.1", "@swc/core": "^1.15.8", - "@types/js-yaml": "^4.0.5", "@types/node": "catalog:", "eslint-plugin-wdio": "^9.26.0", "globals": "^16.5.0", - "js-yaml": "^4.1.0", + "js-yaml": "^5.0.0", "knip": "^6.23.0", "minimatch": "^10.0.0", "nx": "^22.0.0", diff --git a/scripts/affected.ts b/scripts/affected.ts index 330b1d23c..2450a4566 100644 --- a/scripts/affected.ts +++ b/scripts/affected.ts @@ -1,5 +1,5 @@ import { getBaseCommit, getChangedFiles, git } from "@rnx-kit/tools-git"; -import yaml from "js-yaml"; +import * as yaml from "js-yaml"; import { Minimatch } from "minimatch"; import * as fs from "node:fs"; diff --git a/scripts/copy-yarnrc.js b/scripts/copy-yarnrc.js index 53f28df86..1c00270aa 100644 --- a/scripts/copy-yarnrc.js +++ b/scripts/copy-yarnrc.js @@ -1,8 +1,10 @@ // @ts-check -import yaml from "js-yaml"; +import * as yaml from "js-yaml"; import * as fs from "node:fs"; import * as path from "node:path"; +/** @import { JSONObject } from "../packages/app/scripts/types.ts" */ + /** * Copies specified `.yarnrc.yaml`. * @param {string} src @@ -16,9 +18,7 @@ function main(src, dst) { }); const yml = fs.readFileSync(src, { encoding: "utf-8" }); - const rc = /** @type {Record} */ ( - yaml.load(yml) - ); + const rc = /** @type {JSONObject} */ (yaml.load(yml)); rc["nodeLinker"] = "node-modules"; rc["plugins"] = []; diff --git a/yarn.lock b/yarn.lock index 2dc40adf4..f895ef458 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2503,11 +2503,10 @@ __metadata: "@rnx-kit/tools-git": "npm:^0.1.1" "@swc-node/register": "npm:^1.11.1" "@swc/core": "npm:^1.15.8" - "@types/js-yaml": "npm:^4.0.5" "@types/node": "catalog:" eslint-plugin-wdio: "npm:^9.26.0" globals: "npm:^16.5.0" - js-yaml: "npm:^4.1.0" + js-yaml: "npm:^5.0.0" knip: "npm:^6.23.0" minimatch: "npm:^10.0.0" nx: "npm:^22.0.0" @@ -5144,13 +5143,6 @@ __metadata: languageName: node linkType: hard -"@types/js-yaml@npm:^4.0.5": - version: 4.0.9 - resolution: "@types/js-yaml@npm:4.0.9" - checksum: 10c0/24de857aa8d61526bbfbbaa383aa538283ad17363fcd5bb5148e2c7f604547db36646440e739d78241ed008702a8920665d1add5618687b6743858fae00da211 - languageName: node - linkType: hard - "@types/mustache@npm:^4.0.0": version: 4.2.6 resolution: "@types/mustache@npm:4.2.6" @@ -10382,6 +10374,17 @@ __metadata: languageName: node linkType: hard +"js-yaml@npm:^5.0.0": + version: 5.2.1 + resolution: "js-yaml@npm:5.2.1" + dependencies: + argparse: "npm:^2.0.1" + bin: + js-yaml: bin/js-yaml.mjs + checksum: 10c0/8eadf08efc738a656c2838f6617b0cc508944f66f568eb4d435e858261b889a6806d98f44fb6ffdba21a0c68e4bdff1ac35516724882e1dab8fc2cc59150c881 + languageName: node + linkType: hard + "js2xmlparser2@npm:^0.x": version: 0.2.0 resolution: "js2xmlparser2@npm:0.2.0"