From cf55c3c50d71052d29dd0cb7336b5637fba2e874 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 21 Mar 2025 19:29:32 +0000 Subject: [PATCH 1/2] Bump the dev-dependencies group across 1 directory with 8 updates Bumps the dev-dependencies group with 8 updates in the / directory: | Package | From | To | | --- | --- | --- | | [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) | `29.5.12` | `29.5.14` | | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `20.11.20` | `22.13.11` | | [@types/yargs](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/yargs) | `17.0.32` | `17.0.33` | | [dotenv](https://github.com/motdotla/dotenv) | `16.4.5` | `16.4.7` | | [nock](https://github.com/nock/nock) | `13.5.3` | `14.0.1` | | [ts-jest](https://github.com/kulshekhar/ts-jest) | `29.1.2` | `29.2.6` | | [typescript](https://github.com/microsoft/TypeScript) | `5.3.3` | `5.8.2` | | [yaml](https://github.com/eemeli/yaml) | `2.4.0` | `2.7.0` | Updates `@types/jest` from 29.5.12 to 29.5.14 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest) Updates `@types/node` from 20.11.20 to 22.13.11 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `@types/yargs` from 17.0.32 to 17.0.33 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/yargs) Updates `dotenv` from 16.4.5 to 16.4.7 - [Changelog](https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md) - [Commits](https://github.com/motdotla/dotenv/compare/v16.4.5...v16.4.7) Updates `nock` from 13.5.3 to 14.0.1 - [Release notes](https://github.com/nock/nock/releases) - [Changelog](https://github.com/nock/nock/blob/main/CHANGELOG.md) - [Commits](https://github.com/nock/nock/compare/v13.5.3...v14.0.1) Updates `ts-jest` from 29.1.2 to 29.2.6 - [Release notes](https://github.com/kulshekhar/ts-jest/releases) - [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md) - [Commits](https://github.com/kulshekhar/ts-jest/compare/v29.1.2...v29.2.6) Updates `typescript` from 5.3.3 to 5.8.2 - [Release notes](https://github.com/microsoft/TypeScript/releases) - [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml) - [Commits](https://github.com/microsoft/TypeScript/compare/v5.3.3...v5.8.2) Updates `yaml` from 2.4.0 to 2.7.0 - [Release notes](https://github.com/eemeli/yaml/releases) - [Commits](https://github.com/eemeli/yaml/compare/v2.4.0...v2.7.0) --- updated-dependencies: - dependency-name: "@types/jest" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev-dependencies - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-major dependency-group: dev-dependencies - dependency-name: "@types/yargs" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev-dependencies - dependency-name: dotenv dependency-type: direct:development update-type: version-update:semver-patch dependency-group: dev-dependencies - dependency-name: nock dependency-type: direct:development update-type: version-update:semver-major dependency-group: dev-dependencies - dependency-name: ts-jest dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dev-dependencies - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dev-dependencies - dependency-name: yaml dependency-type: direct:development update-type: version-update:semver-minor dependency-group: dev-dependencies ... Signed-off-by: dependabot[bot] --- package-lock.json | 426 +++++++++++++++++++++++++++++++++++++--------- package.json | 16 +- 2 files changed, 353 insertions(+), 89 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7a5f80b..2a3e214 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,24 +17,24 @@ "devDependencies": { "@eslint/eslintrc": "^3.3.0", "@eslint/js": "^9.22.0", - "@types/jest": "^29.5.12", - "@types/node": "^20.11.20", - "@types/yargs": "^17.0.32", + "@types/jest": "^29.5.14", + "@types/node": "^22.13.11", + "@types/yargs": "^17.0.33", "@typescript-eslint/eslint-plugin": "^8.27.0", "@typescript-eslint/parser": "^8.27.0", "@vercel/ncc": "^0.38.3", - "dotenv": "^16.4.5", + "dotenv": "^16.4.7", "eslint": "^9.22.0", "eslint-plugin-import": "^2.31.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^7.2.1", "globals": "^16.0.0", "jest": "^29.7.0", - "nock": "^13.5.3", - "ts-jest": "^29.1.2", + "nock": "^14.0.1", + "ts-jest": "^29.2.6", "ts-node": "^10.9.2", - "typescript": "^5.3.3", - "yaml": "^2.4.0", + "typescript": "^5.8.2", + "yaml": "^2.7.0", "yargs": "^17.7.2" }, "engines": { @@ -1397,6 +1397,24 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "node_modules/@mswjs/interceptors": { + "version": "0.37.6", + "resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.37.6.tgz", + "integrity": "sha512-wK+5pLK5XFmgtH3aQ2YVvA3HohS3xqV/OxuVOdNx9Wpnz7VE/fnC+e1A7ln6LFYeck7gOJ/dsZV6OLplOtAJ2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@open-draft/deferred-promise": "^2.2.0", + "@open-draft/logger": "^0.3.0", + "@open-draft/until": "^2.0.0", + "is-node-process": "^1.2.0", + "outvariant": "^1.4.3", + "strict-event-emitter": "^0.5.1" + }, + "engines": { + "node": ">=18" + } + }, "node_modules/@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -1569,6 +1587,31 @@ "@octokit/openapi-types": "^11.2.0" } }, + "node_modules/@open-draft/deferred-promise": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@open-draft/deferred-promise/-/deferred-promise-2.2.0.tgz", + "integrity": "sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@open-draft/logger": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@open-draft/logger/-/logger-0.3.0.tgz", + "integrity": "sha512-X2g45fzhxH238HKO4xbSr7+wBS8Fvw6ixhTDuvLd5mqh6bJJCFAPwU9mPDxbcrRtfxv4u5IHCEH77BmxvXmmxQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-node-process": "^1.2.0", + "outvariant": "^1.4.0" + } + }, + "node_modules/@open-draft/until": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@open-draft/until/-/until-2.1.0.tgz", + "integrity": "sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==", + "dev": true, + "license": "MIT" + }, "node_modules/@rtsao/scc": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", @@ -1704,10 +1747,11 @@ } }, "node_modules/@types/jest": { - "version": "29.5.12", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz", - "integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==", + "version": "29.5.14", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.14.tgz", + "integrity": "sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==", "dev": true, + "license": "MIT", "dependencies": { "expect": "^29.0.0", "pretty-format": "^29.0.0" @@ -1726,12 +1770,13 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.11.20", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.20.tgz", - "integrity": "sha512-7/rR21OS+fq8IyHTgtLkDK949uzsa6n8BkziAKtPVpugIkO6D+/ooXMvzXxDnZrmtXVfjb1bKQafYpb8s89LOg==", + "version": "22.13.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.11.tgz", + "integrity": "sha512-iEUCUJoU0i3VnrCmgoWCXttklWcvoCIx4jzcP22fioIVSdTmjgoEvmAO/QPw6TcS9k5FrNgn4w7q5lGOd1CT5g==", "dev": true, + "license": "MIT", "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~6.20.0" } }, "node_modules/@types/stack-utils": { @@ -1741,10 +1786,11 @@ "dev": true }, "node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "version": "17.0.33", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", + "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", "dev": true, + "license": "MIT", "dependencies": { "@types/yargs-parser": "*" } @@ -2203,6 +2249,13 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "dev": true, + "license": "MIT" + }, "node_modules/async-function": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", @@ -2806,10 +2859,11 @@ } }, "node_modules/dotenv": { - "version": "16.4.5", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", - "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "version": "16.4.7", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", + "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=12" }, @@ -2831,6 +2885,22 @@ "node": ">= 0.4" } }, + "node_modules/ejs": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "jake": "^10.8.5" + }, + "bin": { + "ejs": "bin/cli.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/electron-to-chromium": { "version": "1.4.465", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.465.tgz", @@ -3577,6 +3647,39 @@ "node": ">=16.0.0" } }, + "node_modules/filelist": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "minimatch": "^5.0.1" + } + }, + "node_modules/filelist/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/filelist/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", @@ -4273,6 +4376,13 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-node-process": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-node-process/-/is-node-process-1.2.0.tgz", + "integrity": "sha512-Vg4o6/fqPxIjtxgUH5QLJhwZ7gW5diGCVlXpuUfELC62CuxM1iHcRe51f2W1FDy04Ai4KJkagKjx3XaqyfRKXw==", + "dev": true, + "license": "MIT" + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -4541,6 +4651,25 @@ "node": ">=8" } }, + "node_modules/jake": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz", + "integrity": "sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.4", + "minimatch": "^3.1.2" + }, + "bin": { + "jake": "bin/cli.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", @@ -5349,17 +5478,18 @@ "dev": true }, "node_modules/nock": { - "version": "13.5.3", - "resolved": "https://registry.npmjs.org/nock/-/nock-13.5.3.tgz", - "integrity": "sha512-2NlGmHIK2rTeyy7UaY1ZNg0YZfEJMxghXgZi0b4DBsUyoDNTTxZeCSG1nmirAWF44RkkoV8NnegLVQijgVapNQ==", + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/nock/-/nock-14.0.1.tgz", + "integrity": "sha512-IJN4O9pturuRdn60NjQ7YkFt6Rwei7ZKaOwb1tvUIIqTgeD0SDDAX3vrqZD4wcXczeEy/AsUXxpGpP/yHqV7xg==", "dev": true, + "license": "MIT", "dependencies": { - "debug": "^4.1.0", + "@mswjs/interceptors": "^0.37.3", "json-stringify-safe": "^5.0.1", "propagate": "^2.0.0" }, "engines": { - "node": ">= 10.13" + "node": ">=18.20.0 <20 || >=20.12.1" } }, "node_modules/node-fetch": { @@ -5564,6 +5694,13 @@ "node": ">= 0.8.0" } }, + "node_modules/outvariant": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/outvariant/-/outvariant-1.4.3.tgz", + "integrity": "sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==", + "dev": true, + "license": "MIT" + }, "node_modules/own-keys": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz", @@ -6281,6 +6418,13 @@ "node": ">=8" } }, + "node_modules/strict-event-emitter": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/strict-event-emitter/-/strict-event-emitter-0.5.1.tgz", + "integrity": "sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==", + "dev": true, + "license": "MIT" + }, "node_modules/string-length": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", @@ -6484,28 +6628,31 @@ } }, "node_modules/ts-jest": { - "version": "29.1.2", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.2.tgz", - "integrity": "sha512-br6GJoH/WUX4pu7FbZXuWGKGNDuU7b8Uj77g/Sp7puZV6EXzuByl6JrECvm0MzVzSTkSHWTihsXt+5XYER5b+g==", + "version": "29.2.6", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.6.tgz", + "integrity": "sha512-yTNZVZqc8lSixm+QGVFcPe6+yj7+TWZwIesuOWvfcn4B9bz5x4NDzVCQQjOs7Hfouu36aEqfEbo9Qpo+gq8dDg==", "dev": true, + "license": "MIT", "dependencies": { - "bs-logger": "0.x", - "fast-json-stable-stringify": "2.x", + "bs-logger": "^0.2.6", + "ejs": "^3.1.10", + "fast-json-stable-stringify": "^2.1.0", "jest-util": "^29.0.0", "json5": "^2.2.3", - "lodash.memoize": "4.x", - "make-error": "1.x", - "semver": "^7.5.3", - "yargs-parser": "^21.0.1" + "lodash.memoize": "^4.1.2", + "make-error": "^1.3.6", + "semver": "^7.7.1", + "yargs-parser": "^21.1.1" }, "bin": { "ts-jest": "cli.js" }, "engines": { - "node": "^16.10.0 || ^18.0.0 || >=20.0.0" + "node": "^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0" }, "peerDependencies": { "@babel/core": ">=7.0.0-beta.0 <8", + "@jest/transform": "^29.0.0", "@jest/types": "^29.0.0", "babel-jest": "^29.0.0", "jest": "^29.0.0", @@ -6515,6 +6662,9 @@ "@babel/core": { "optional": true }, + "@jest/transform": { + "optional": true + }, "@jest/types": { "optional": true }, @@ -6715,10 +6865,11 @@ } }, "node_modules/typescript": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", - "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "version": "5.8.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz", + "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==", "dev": true, + "license": "Apache-2.0", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -6746,10 +6897,11 @@ } }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", + "dev": true, + "license": "MIT" }, "node_modules/universal-user-agent": { "version": "6.0.0", @@ -6993,10 +7145,11 @@ } }, "node_modules/yaml": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.0.tgz", - "integrity": "sha512-j9iR8g+/t0lArF4V6NE/QCfT+CO7iLqrXAHZbJdo+LfjqP1vR8Fg5bSiaq6Q2lOD1AUEVrEVIgABvBFYojJVYQ==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz", + "integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==", "dev": true, + "license": "ISC", "bin": { "yaml": "bin.mjs" }, @@ -8107,6 +8260,20 @@ "@jridgewell/sourcemap-codec": "^1.4.10" } }, + "@mswjs/interceptors": { + "version": "0.37.6", + "resolved": "https://registry.npmjs.org/@mswjs/interceptors/-/interceptors-0.37.6.tgz", + "integrity": "sha512-wK+5pLK5XFmgtH3aQ2YVvA3HohS3xqV/OxuVOdNx9Wpnz7VE/fnC+e1A7ln6LFYeck7gOJ/dsZV6OLplOtAJ2w==", + "dev": true, + "requires": { + "@open-draft/deferred-promise": "^2.2.0", + "@open-draft/logger": "^0.3.0", + "@open-draft/until": "^2.0.0", + "is-node-process": "^1.2.0", + "outvariant": "^1.4.3", + "strict-event-emitter": "^0.5.1" + } + }, "@nodelib/fs.scandir": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", @@ -8267,6 +8434,28 @@ "@octokit/openapi-types": "^11.2.0" } }, + "@open-draft/deferred-promise": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@open-draft/deferred-promise/-/deferred-promise-2.2.0.tgz", + "integrity": "sha512-CecwLWx3rhxVQF6V4bAgPS5t+So2sTbPgAzafKkVizyi7tlwpcFpdFqq+wqF2OwNBmqFuu6tOyouTuxgpMfzmA==", + "dev": true + }, + "@open-draft/logger": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@open-draft/logger/-/logger-0.3.0.tgz", + "integrity": "sha512-X2g45fzhxH238HKO4xbSr7+wBS8Fvw6ixhTDuvLd5mqh6bJJCFAPwU9mPDxbcrRtfxv4u5IHCEH77BmxvXmmxQ==", + "dev": true, + "requires": { + "is-node-process": "^1.2.0", + "outvariant": "^1.4.0" + } + }, + "@open-draft/until": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@open-draft/until/-/until-2.1.0.tgz", + "integrity": "sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==", + "dev": true + }, "@rtsao/scc": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", @@ -8402,9 +8591,9 @@ } }, "@types/jest": { - "version": "29.5.12", - "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.12.tgz", - "integrity": "sha512-eDC8bTvT/QhYdxJAulQikueigY5AsdBRH2yDKW3yveW7svY3+DzN84/2NUgkw10RTiJbWqZrTtoGVdYlvFJdLw==", + "version": "29.5.14", + "resolved": "https://registry.npmjs.org/@types/jest/-/jest-29.5.14.tgz", + "integrity": "sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==", "dev": true, "requires": { "expect": "^29.0.0", @@ -8424,12 +8613,12 @@ "dev": true }, "@types/node": { - "version": "20.11.20", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.20.tgz", - "integrity": "sha512-7/rR21OS+fq8IyHTgtLkDK949uzsa6n8BkziAKtPVpugIkO6D+/ooXMvzXxDnZrmtXVfjb1bKQafYpb8s89LOg==", + "version": "22.13.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.11.tgz", + "integrity": "sha512-iEUCUJoU0i3VnrCmgoWCXttklWcvoCIx4jzcP22fioIVSdTmjgoEvmAO/QPw6TcS9k5FrNgn4w7q5lGOd1CT5g==", "dev": true, "requires": { - "undici-types": "~5.26.4" + "undici-types": "~6.20.0" } }, "@types/stack-utils": { @@ -8439,9 +8628,9 @@ "dev": true }, "@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "version": "17.0.33", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", + "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", "dev": true, "requires": { "@types/yargs-parser": "*" @@ -8743,6 +8932,12 @@ "is-array-buffer": "^3.0.4" } }, + "async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "dev": true + }, "async-function": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/async-function/-/async-function-1.0.0.tgz", @@ -9161,9 +9356,9 @@ "dev": true }, "dotenv": { - "version": "16.4.5", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", - "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "version": "16.4.7", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", + "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", "dev": true }, "dunder-proto": { @@ -9177,6 +9372,15 @@ "gopd": "^1.2.0" } }, + "ejs": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.10.tgz", + "integrity": "sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==", + "dev": true, + "requires": { + "jake": "^10.8.5" + } + }, "electron-to-chromium": { "version": "1.4.465", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.465.tgz", @@ -9734,6 +9938,35 @@ "flat-cache": "^4.0.0" } }, + "filelist": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", + "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", + "dev": true, + "requires": { + "minimatch": "^5.0.1" + }, + "dependencies": { + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + } + } + }, "fill-range": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", @@ -10201,6 +10434,12 @@ "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", "dev": true }, + "is-node-process": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-node-process/-/is-node-process-1.2.0.tgz", + "integrity": "sha512-Vg4o6/fqPxIjtxgUH5QLJhwZ7gW5diGCVlXpuUfELC62CuxM1iHcRe51f2W1FDy04Ai4KJkagKjx3XaqyfRKXw==", + "dev": true + }, "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -10381,6 +10620,18 @@ "istanbul-lib-report": "^3.0.0" } }, + "jake": { + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz", + "integrity": "sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==", + "dev": true, + "requires": { + "async": "^3.2.3", + "chalk": "^4.0.2", + "filelist": "^1.0.4", + "minimatch": "^3.1.2" + } + }, "jest": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest/-/jest-29.7.0.tgz", @@ -11009,12 +11260,12 @@ "dev": true }, "nock": { - "version": "13.5.3", - "resolved": "https://registry.npmjs.org/nock/-/nock-13.5.3.tgz", - "integrity": "sha512-2NlGmHIK2rTeyy7UaY1ZNg0YZfEJMxghXgZi0b4DBsUyoDNTTxZeCSG1nmirAWF44RkkoV8NnegLVQijgVapNQ==", + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/nock/-/nock-14.0.1.tgz", + "integrity": "sha512-IJN4O9pturuRdn60NjQ7YkFt6Rwei7ZKaOwb1tvUIIqTgeD0SDDAX3vrqZD4wcXczeEy/AsUXxpGpP/yHqV7xg==", "dev": true, "requires": { - "debug": "^4.1.0", + "@mswjs/interceptors": "^0.37.3", "json-stringify-safe": "^5.0.1", "propagate": "^2.0.0" } @@ -11167,6 +11418,12 @@ "type-check": "^0.4.0" } }, + "outvariant": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/outvariant/-/outvariant-1.4.3.tgz", + "integrity": "sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==", + "dev": true + }, "own-keys": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/own-keys/-/own-keys-1.0.1.tgz", @@ -11655,6 +11912,12 @@ } } }, + "strict-event-emitter": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/strict-event-emitter/-/strict-event-emitter-0.5.1.tgz", + "integrity": "sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==", + "dev": true + }, "string-length": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", @@ -11796,19 +12059,20 @@ "requires": {} }, "ts-jest": { - "version": "29.1.2", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.2.tgz", - "integrity": "sha512-br6GJoH/WUX4pu7FbZXuWGKGNDuU7b8Uj77g/Sp7puZV6EXzuByl6JrECvm0MzVzSTkSHWTihsXt+5XYER5b+g==", + "version": "29.2.6", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.6.tgz", + "integrity": "sha512-yTNZVZqc8lSixm+QGVFcPe6+yj7+TWZwIesuOWvfcn4B9bz5x4NDzVCQQjOs7Hfouu36aEqfEbo9Qpo+gq8dDg==", "dev": true, "requires": { - "bs-logger": "0.x", - "fast-json-stable-stringify": "2.x", + "bs-logger": "^0.2.6", + "ejs": "^3.1.10", + "fast-json-stable-stringify": "^2.1.0", "jest-util": "^29.0.0", "json5": "^2.2.3", - "lodash.memoize": "4.x", - "make-error": "1.x", - "semver": "^7.5.3", - "yargs-parser": "^21.0.1" + "lodash.memoize": "^4.1.2", + "make-error": "^1.3.6", + "semver": "^7.7.1", + "yargs-parser": "^21.1.1" } }, "ts-node": { @@ -11943,9 +12207,9 @@ } }, "typescript": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", - "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "version": "5.8.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.2.tgz", + "integrity": "sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==", "dev": true }, "unbox-primitive": { @@ -11961,9 +12225,9 @@ } }, "undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", "dev": true }, "universal-user-agent": { @@ -12142,9 +12406,9 @@ "dev": true }, "yaml": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.4.0.tgz", - "integrity": "sha512-j9iR8g+/t0lArF4V6NE/QCfT+CO7iLqrXAHZbJdo+LfjqP1vR8Fg5bSiaq6Q2lOD1AUEVrEVIgABvBFYojJVYQ==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.7.0.tgz", + "integrity": "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA==", "dev": true }, "yargs": { diff --git a/package.json b/package.json index 9f54d99..e536cf4 100644 --- a/package.json +++ b/package.json @@ -30,24 +30,24 @@ "devDependencies": { "@eslint/eslintrc": "^3.3.0", "@eslint/js": "^9.22.0", - "@types/jest": "^29.5.12", - "@types/node": "^20.11.20", - "@types/yargs": "^17.0.32", + "@types/jest": "^29.5.14", + "@types/node": "^22.13.11", + "@types/yargs": "^17.0.33", "@typescript-eslint/eslint-plugin": "^8.27.0", "@typescript-eslint/parser": "^8.27.0", "@vercel/ncc": "^0.38.3", - "dotenv": "^16.4.5", + "dotenv": "^16.4.7", "eslint": "^9.22.0", "eslint-plugin-import": "^2.31.0", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^7.2.1", "globals": "^16.0.0", "jest": "^29.7.0", - "nock": "^13.5.3", - "ts-jest": "^29.1.2", + "nock": "^14.0.1", + "ts-jest": "^29.2.6", "ts-node": "^10.9.2", - "typescript": "^5.3.3", - "yaml": "^2.4.0", + "typescript": "^5.8.2", + "yaml": "^2.7.0", "yargs": "^17.7.2" } } From 52024a6955ae078d7056ed2b630abdc72c69595f Mon Sep 17 00:00:00 2001 From: Jeff Widman Date: Fri, 21 Mar 2025 19:47:15 +0000 Subject: [PATCH 2/2] `npm ci && npm run build` --- dist/index.js | 665 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 434 insertions(+), 231 deletions(-) diff --git a/dist/index.js b/dist/index.js index 2ce4a13..4e269d7 100644 --- a/dist/index.js +++ b/dist/index.js @@ -10054,18 +10054,28 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( }) : function(o, v) { o["default"] = v; }); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.set = void 0; +exports.set = set; const pluralize_1 = __importDefault(__nccwpck_require__(6112)); const core = __importStar(__nccwpck_require__(7484)); const DEPENDENCY_TYPES_PRIORITY = [ @@ -10128,7 +10138,6 @@ function set(updatedDependencies) { core.setOutput('ghsa-id', ghsaId); core.setOutput('cvss', cvss); } -exports.set = set; function maxDependencyTypes(updatedDependencies) { const dependencyTypes = updatedDependencies.reduce(function (dependencyTypes, dependency) { dependencyTypes.add(dependency.dependencyType); @@ -10168,15 +10177,26 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( }) : function(o, v) { o["default"] = v; }); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.calculateUpdateType = exports.parse = void 0; +exports.parse = parse; +exports.calculateUpdateType = calculateUpdateType; const YAML = __importStar(__nccwpck_require__(8815)); function branchNameToDirectoryName(chunks, delimiter, updatedDependencies, dependencyGroup) { // We can always slice after the first 2 pieces, because they will always contain "dependabot" followed by the name @@ -10247,7 +10267,6 @@ async function parse(commitMessage, body, branchName, mainBranch, lookup, getSco } return Promise.resolve([]); } -exports.parse = parse; function calculateUpdateType(lastVersion, nextVersion) { if (!lastVersion || !nextVersion || lastVersion === nextVersion) { return ''; @@ -10262,7 +10281,6 @@ function calculateUpdateType(lastVersion, nextVersion) { } return 'version-update:semver-patch'; } -exports.calculateUpdateType = calculateUpdateType; /***/ }), @@ -10273,7 +10291,9 @@ exports.calculateUpdateType = calculateUpdateType; "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getBody = exports.getBranchNames = exports.parseNwo = void 0; +exports.parseNwo = parseNwo; +exports.getBranchNames = getBranchNames; +exports.getBody = getBody; function parseNwo(nwo) { const [owner, name] = nwo.split('/'); if (!owner || !name) { @@ -10281,17 +10301,14 @@ function parseNwo(nwo) { } return { owner, repo: name }; } -exports.parseNwo = parseNwo; function getBranchNames(context) { const { pull_request: pr } = context.payload; return { headName: pr?.head.ref || '', baseName: pr?.base.ref }; } -exports.getBranchNames = getBranchNames; function getBody(context) { const { pull_request: pr } = context.payload; return pr?.body || ''; } -exports.getBody = getBody; /***/ }), @@ -10317,18 +10334,31 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( }) : function(o, v) { o["default"] = v; }); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getCompatibility = exports.trimSlashes = exports.getAlert = exports.getMessage = void 0; +exports.getMessage = getMessage; +exports.getAlert = getAlert; +exports.trimSlashes = trimSlashes; +exports.getCompatibility = getCompatibility; const core = __importStar(__nccwpck_require__(7484)); const https_1 = __importDefault(__nccwpck_require__(5692)); const DEPENDABOT_LOGIN = 'dependabot[bot]'; @@ -10368,7 +10398,6 @@ async function getMessage(client, context, skipCommitVerification = false, skipV } return commit.message; } -exports.getMessage = getMessage; async function getAlert(name, version, directory, client, context) { const alerts = await client.graphql(` { @@ -10400,11 +10429,9 @@ async function getAlert(name, version, directory, client, context) { cvss: found?.securityAdvisory.cvss.score ?? 0.0 }; } -exports.getAlert = getAlert; function trimSlashes(value) { return value.replace(/^\/+/, '').replace(/\/+$/, ''); } -exports.trimSlashes = trimSlashes; async function getCompatibility(name, oldVersion, newVersion, ecosystem) { const svg = await new Promise((resolve) => { https_1.default.get(`https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=${name}&package-manager=${ecosystem}&previous-version=${oldVersion}&new-version=${newVersion}`, res => { @@ -10416,7 +10443,6 @@ async function getCompatibility(name, oldVersion, newVersion, ecosystem) { const scoreChunk = svg.match(/compatibility: (?<score>\d+)%<\/title>/m); return scoreChunk?.groups ? parseInt(scoreChunk.groups.score) : 0; } -exports.getCompatibility = getCompatibility; /***/ }), @@ -10442,15 +10468,25 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? ( }) : function(o, v) { o["default"] = v; }); -var __importStar = (this && this.__importStar) || function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; -}; +var __importStar = (this && this.__importStar) || (function () { + var ownKeys = function(o) { + ownKeys = Object.getOwnPropertyNames || function (o) { + var ar = []; + for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; + return ar; + }; + return ownKeys(o); + }; + return function (mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); + __setModuleDefault(result, mod); + return result; + }; +})(); Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.run = void 0; +exports.run = run; const core = __importStar(__nccwpck_require__(7484)); const github = __importStar(__nccwpck_require__(3228)); const request_error_1 = __nccwpck_require__(3708); @@ -10505,7 +10541,6 @@ async function run() { } } } -exports.run = run; run(); @@ -10575,6 +10610,22 @@ module.exports = require("net"); /***/ }), +/***/ 4573: +/***/ ((module) => { + +"use strict"; +module.exports = require("node:buffer"); + +/***/ }), + +/***/ 1708: +/***/ ((module) => { + +"use strict"; +module.exports = require("node:process"); + +/***/ }), + /***/ 857: /***/ ((module) => { @@ -10670,10 +10721,23 @@ function resolveCollection(CN, ctx, token, onError, tagName, tag) { coll.tag = tagName; return coll; } -function composeCollection(CN, ctx, token, tagToken, onError) { +function composeCollection(CN, ctx, token, props, onError) { + const tagToken = props.tag; const tagName = !tagToken ? null : ctx.directives.tagName(tagToken.source, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg)); + if (token.type === 'block-seq') { + const { anchor, newlineAfterProp: nl } = props; + const lastProp = anchor && tagToken + ? anchor.offset > tagToken.offset + ? anchor + : tagToken + : (anchor ?? tagToken); + if (lastProp && (!nl || nl.offset < lastProp.offset)) { + const message = 'Missing newline after block sequence props'; + onError(lastProp, 'MISSING_CHAR', message); + } + } const expType = token.type === 'block-map' ? 'map' : token.type === 'block-seq' @@ -10687,8 +10751,7 @@ function composeCollection(CN, ctx, token, tagToken, onError) { !tagName || tagName === '!' || (tagName === YAMLMap.YAMLMap.tagName && expType === 'map') || - (tagName === YAMLSeq.YAMLSeq.tagName && expType === 'seq') || - !expType) { + (tagName === YAMLSeq.YAMLSeq.tagName && expType === 'seq')) { return resolveCollection(CN, ctx, token, onError, tagName); } let tag = ctx.schema.tags.find(t => t.tag === tagName && t.collection === expType); @@ -10740,6 +10803,7 @@ function composeDoc(options, directives, { offset, start, value, end }, onError) const opts = Object.assign({ _directives: directives }, options); const doc = new Document.Document(undefined, opts); const ctx = { + atKey: false, atRoot: true, directives: doc.directives, options: doc.options, @@ -10750,6 +10814,7 @@ function composeDoc(options, directives, { offset, start, value, end }, onError) next: value ?? end?.[0], offset, onError, + parentIndent: 0, startOnNewline: true }); if (props.found) { @@ -10783,6 +10848,7 @@ exports.composeDoc = composeDoc; var Alias = __nccwpck_require__(4065); +var identity = __nccwpck_require__(1127); var composeCollection = __nccwpck_require__(7349); var composeScalar = __nccwpck_require__(5413); var resolveEnd = __nccwpck_require__(7788); @@ -10790,6 +10856,7 @@ var utilEmptyScalarPosition = __nccwpck_require__(2599); const CN = { composeNode, composeEmptyNode }; function composeNode(ctx, token, props, onError) { + const atKey = ctx.atKey; const { spaceBefore, comment, anchor, tag } = props; let node; let isSrcToken = true; @@ -10810,7 +10877,7 @@ function composeNode(ctx, token, props, onError) { case 'block-map': case 'block-seq': case 'flow-collection': - node = composeCollection.composeCollection(CN, ctx, token, tag, onError); + node = composeCollection.composeCollection(CN, ctx, token, props, onError); if (anchor) node.anchor = anchor.source.substring(1); break; @@ -10825,6 +10892,14 @@ function composeNode(ctx, token, props, onError) { } if (anchor && node.anchor === '') onError(anchor, 'BAD_ALIAS', 'Anchor cannot be an empty string'); + if (atKey && + ctx.options.stringKeys && + (!identity.isScalar(node) || + typeof node.value !== 'string' || + (node.tag && node.tag !== 'tag:yaml.org,2002:str'))) { + const msg = 'With stringKeys, all keys must be strings'; + onError(tag ?? token, 'NON_STRING_KEY', msg); + } if (spaceBefore) node.spaceBefore = true; if (comment) { @@ -10892,16 +10967,21 @@ var resolveFlowScalar = __nccwpck_require__(6842); function composeScalar(ctx, token, tagToken, onError) { const { value, type, comment, range } = token.type === 'block-scalar' - ? resolveBlockScalar.resolveBlockScalar(token, ctx.options.strict, onError) + ? resolveBlockScalar.resolveBlockScalar(ctx, token, onError) : resolveFlowScalar.resolveFlowScalar(token, ctx.options.strict, onError); const tagName = tagToken ? ctx.directives.tagName(tagToken.source, msg => onError(tagToken, 'TAG_RESOLVE_FAILED', msg)) : null; - const tag = tagToken && tagName - ? findScalarTagByName(ctx.schema, value, tagName, tagToken, onError) - : token.type === 'scalar' - ? findScalarTagByTest(ctx, value, token, onError) - : ctx.schema[identity.SCALAR]; + let tag; + if (ctx.options.stringKeys && ctx.atKey) { + tag = ctx.schema[identity.SCALAR]; + } + else if (tagName) + tag = findScalarTagByName(ctx.schema, value, tagName, tagToken, onError); + else if (token.type === 'scalar') + tag = findScalarTagByTest(ctx, value, token, onError); + else + tag = ctx.schema[identity.SCALAR]; let scalar; try { const res = tag.resolve(value, msg => onError(tagToken ?? token, 'TAG_RESOLVE_FAILED', msg), ctx.options); @@ -10949,8 +11029,9 @@ function findScalarTagByName(schema, value, tagName, tagToken, onError) { onError(tagToken, 'TAG_RESOLVE_FAILED', `Unresolved tag: ${tagName}`, tagName !== 'tag:yaml.org,2002:str'); return schema[identity.SCALAR]; } -function findScalarTagByTest({ directives, schema }, value, token, onError) { - const tag = schema.tags.find(tag => tag.default && tag.test?.test(value)) || schema[identity.SCALAR]; +function findScalarTagByTest({ atKey, directives, schema }, value, token, onError) { + const tag = schema.tags.find(tag => (tag.default === true || (atKey && tag.default === 'key')) && + tag.test?.test(value)) || schema[identity.SCALAR]; if (schema.compat) { const compat = schema.compat.find(tag => tag.default && tag.test?.test(value)) ?? schema[identity.SCALAR]; @@ -10975,6 +11056,7 @@ exports.composeScalar = composeScalar; "use strict"; +var node_process = __nccwpck_require__(1708); var directives = __nccwpck_require__(1342); var Document = __nccwpck_require__(3021); var errors = __nccwpck_require__(1464); @@ -11108,7 +11190,7 @@ class Composer { } /** Advance the composer by one CST token. */ *next(token) { - if (process.env.LOG_STREAM) + if (node_process.env.LOG_STREAM) console.dir(token, { depth: null }); switch (token.type) { case 'directive': @@ -11227,6 +11309,7 @@ function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError, ta next: key ?? sep?.[0], offset, onError, + parentIndent: bm.indent, startOnNewline: true }); const implicitKey = !keyProps.found; @@ -11247,7 +11330,7 @@ function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError, ta } continue; } - if (keyProps.hasNewlineAfterProp || utilContainsNewline.containsNewline(key)) { + if (keyProps.newlineAfterProp || utilContainsNewline.containsNewline(key)) { onError(key ?? start[start.length - 1], 'MULTILINE_IMPLICIT_KEY', 'Implicit keys need to be on a single line'); } } @@ -11255,12 +11338,14 @@ function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError, ta onError(offset, 'BAD_INDENT', startColMsg); } // key value + ctx.atKey = true; const keyStart = keyProps.end; const keyNode = key ? composeNode(ctx, key, keyProps, onError) : composeEmptyNode(ctx, keyStart, start, null, keyProps, onError); if (ctx.schema.compat) utilFlowIndentCheck.flowIndentCheck(bm.indent, key, onError); + ctx.atKey = false; if (utilMapIncludes.mapIncludes(ctx, map.items, keyNode)) onError(keyStart, 'DUPLICATE_KEY', 'Map keys must be unique'); // value properties @@ -11269,6 +11354,7 @@ function resolveBlockMap({ composeNode, composeEmptyNode }, ctx, bm, onError, ta next: value, offset: keyNode.range[2], onError, + parentIndent: bm.indent, startOnNewline: !key || key.type === 'block-scalar' }); offset = valueProps.end; @@ -11327,9 +11413,9 @@ exports.resolveBlockMap = resolveBlockMap; var Scalar = __nccwpck_require__(3301); -function resolveBlockScalar(scalar, strict, onError) { +function resolveBlockScalar(ctx, scalar, onError) { const start = scalar.offset; - const header = parseBlockScalarHeader(scalar, strict, onError); + const header = parseBlockScalarHeader(scalar, ctx.options.strict, onError); if (!header) return { value: '', type: null, comment: '', range: [start, start, start] }; const type = header.mode === '>' ? Scalar.Scalar.BLOCK_FOLDED : Scalar.Scalar.BLOCK_LITERAL; @@ -11371,6 +11457,10 @@ function resolveBlockScalar(scalar, strict, onError) { if (header.indent === 0) trimIndent = indent.length; contentStart = i; + if (trimIndent === 0 && !ctx.atRoot) { + const message = 'Block scalar values in collections must be indented'; + onError(offset, 'BAD_INDENT', message); + } break; } offset += indent.length + content.length + 1; @@ -11538,6 +11628,8 @@ function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError, ta const seq = new NodeClass(ctx.schema); if (ctx.atRoot) ctx.atRoot = false; + if (ctx.atKey) + ctx.atKey = false; let offset = bs.offset; let commentEnd = null; for (const { start, value } of bs.items) { @@ -11546,6 +11638,7 @@ function resolveBlockSeq({ composeNode, composeEmptyNode }, ctx, bs, onError, ta next: value, offset, onError, + parentIndent: bs.indent, startOnNewline: true }); if (!props.found) { @@ -11652,6 +11745,8 @@ function resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onErr const atRoot = ctx.atRoot; if (atRoot) ctx.atRoot = false; + if (ctx.atKey) + ctx.atKey = false; let offset = fc.offset + fc.start.source.length; for (let i = 0; i < fc.items.length; ++i) { const collItem = fc.items[i]; @@ -11662,6 +11757,7 @@ function resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onErr next: key ?? sep?.[0], offset, onError, + parentIndent: fc.indent, startOnNewline: false }); if (!props.found) { @@ -11730,12 +11826,14 @@ function resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onErr else { // item is a key+value pair // key value + ctx.atKey = true; const keyStart = props.end; const keyNode = key ? composeNode(ctx, key, props, onError) : composeEmptyNode(ctx, keyStart, start, null, props, onError); if (isBlock(key)) onError(keyNode.range, 'BLOCK_IN_FLOW', blockMsg); + ctx.atKey = false; // value properties const valueProps = resolveProps.resolveProps(sep ?? [], { flow: fcName, @@ -11743,6 +11841,7 @@ function resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onErr next: value, offset: keyNode.range[2], onError, + parentIndent: fc.indent, startOnNewline: false }); if (valueProps.found) { @@ -11795,6 +11894,8 @@ function resolveFlowCollection({ composeNode, composeEmptyNode }, ctx, fc, onErr const map = new YAMLMap.YAMLMap(ctx.schema); map.flow = true; map.items.push(pair); + const endRange = (valueNode ?? keyNode).range; + map.range = [keyNode.range[0], endRange[1], endRange[2]]; coll.items.push(map); } offset = valueNode ? valueNode.range[2] : valueProps.end; @@ -11927,7 +12028,7 @@ function foldLines(source) { first = new RegExp('(.*?)(?<![ \t])[ \t]*\r?\n', 'sy'); line = new RegExp('[ \t]*(.*?)(?:(?<![ \t])[ \t]*)?\r?\n', 'sy'); } - catch (_) { + catch { first = /(.*?)[ \t]*\r?\n/sy; line = /[ \t]*(.*?)[ \t]*\r?\n/sy; } @@ -12074,17 +12175,18 @@ exports.resolveFlowScalar = resolveFlowScalar; "use strict"; -function resolveProps(tokens, { flow, indicator, next, offset, onError, startOnNewline }) { +function resolveProps(tokens, { flow, indicator, next, offset, onError, parentIndent, startOnNewline }) { let spaceBefore = false; let atNewline = startOnNewline; let hasSpace = startOnNewline; let comment = ''; let commentSep = ''; let hasNewline = false; - let hasNewlineAfterProp = false; let reqSpace = false; + let tab = null; let anchor = null; let tag = null; + let newlineAfterProp = null; let comma = null; let found = null; let start = null; @@ -12096,16 +12198,22 @@ function resolveProps(tokens, { flow, indicator, next, offset, onError, startOnN onError(token.offset, 'MISSING_CHAR', 'Tags and anchors must be separated from the next token by white space'); reqSpace = false; } + if (tab) { + if (atNewline && token.type !== 'comment' && token.type !== 'newline') { + onError(tab, 'TAB_AS_INDENT', 'Tabs are not allowed as indentation'); + } + tab = null; + } switch (token.type) { case 'space': // At the doc level, tabs at line start may be parsed // as leading white space rather than indentation. // In a flow collection, only the parser handles indent. if (!flow && - atNewline && - indicator !== 'doc-start' && - token.source[0] === '\t') - onError(token, 'TAB_AS_INDENT', 'Tabs are not allowed as indentation'); + (indicator !== 'doc-start' || next?.type !== 'flow-collection') && + token.source.includes('\t')) { + tab = token; + } hasSpace = true; break; case 'comment': { @@ -12124,7 +12232,7 @@ function resolveProps(tokens, { flow, indicator, next, offset, onError, startOnN if (atNewline) { if (comment) comment += token.source; - else + else if (!found || indicator !== 'seq-item-ind') spaceBefore = true; } else @@ -12132,7 +12240,7 @@ function resolveProps(tokens, { flow, indicator, next, offset, onError, startOnN atNewline = true; hasNewline = true; if (anchor || tag) - hasNewlineAfterProp = true; + newlineAfterProp = token; hasSpace = true; break; case 'anchor': @@ -12165,7 +12273,8 @@ function resolveProps(tokens, { flow, indicator, next, offset, onError, startOnN if (found) onError(token, 'UNEXPECTED_TOKEN', `Unexpected ${token.source} in ${flow ?? 'collection'}`); found = token; - atNewline = false; + atNewline = + indicator === 'seq-item-ind' || indicator === 'explicit-key-ind'; hasSpace = false; break; case 'comma': @@ -12191,17 +12300,23 @@ function resolveProps(tokens, { flow, indicator, next, offset, onError, startOnN next.type !== 'space' && next.type !== 'newline' && next.type !== 'comma' && - (next.type !== 'scalar' || next.source !== '')) + (next.type !== 'scalar' || next.source !== '')) { onError(next.offset, 'MISSING_CHAR', 'Tags and anchors must be separated from the next token by white space'); + } + if (tab && + ((atNewline && tab.indent <= parentIndent) || + next?.type === 'block-map' || + next?.type === 'block-seq')) + onError(tab, 'TAB_AS_INDENT', 'Tabs are not allowed as indentation'); return { comma, found, spaceBefore, comment, hasNewline, - hasNewlineAfterProp, anchor, tag, + newlineAfterProp, end, start: start ?? end }; @@ -12332,11 +12447,7 @@ function mapIncludes(ctx, items, search) { return false; const isEqual = typeof uniqueKeys === 'function' ? uniqueKeys - : (a, b) => a === b || - (identity.isScalar(a) && - identity.isScalar(b) && - a.value === b.value && - !(a.value === '<<' && ctx.schema.merge)); + : (a, b) => a === b || (identity.isScalar(a) && identity.isScalar(b) && a.value === b.value); return items.some(pair => isEqual(pair.key, search)); } @@ -12388,6 +12499,7 @@ class Document { logLevel: 'warn', prettyErrors: true, strict: true, + stringKeys: false, uniqueKeys: true, version: '1.2' }, options); @@ -12611,7 +12723,7 @@ class Document { this.directives.yaml.version = '1.1'; else this.directives = new directives.Directives({ version: '1.1' }); - opt = { merge: true, resolveKnownTags: false, schema: 'yaml-1.1' }; + opt = { resolveKnownTags: false, schema: 'yaml-1.1' }; break; case '1.2': case 'next': @@ -12619,7 +12731,7 @@ class Document { this.directives.yaml.version = version; else this.directives = new directives.Directives({ version }); - opt = { merge: false, resolveKnownTags: true, schema: 'core' }; + opt = { resolveKnownTags: true, schema: 'core' }; break; case null: if (this.directives) @@ -12793,6 +12905,7 @@ function applyReviver(reviver, obj, key, val) { for (let i = 0, len = val.length; i < len; ++i) { const v0 = val[i]; const v1 = applyReviver(reviver, val, String(i), v0); + // eslint-disable-next-line @typescript-eslint/no-array-delete if (v1 === undefined) delete val[i]; else if (v1 !== v0) @@ -13252,21 +13365,21 @@ exports.visitAsync = visit.visitAsync; /***/ }), /***/ 7249: -/***/ ((__unused_webpack_module, exports) => { +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +var node_process = __nccwpck_require__(1708); + function debug(logLevel, ...messages) { if (logLevel === 'debug') console.log(...messages); } function warn(logLevel, warning) { if (logLevel === 'debug' || logLevel === 'warn') { - // https://github.com/typescript-eslint/typescript-eslint/issues/7478 - // eslint-disable-next-line @typescript-eslint/prefer-optional-chain - if (typeof process !== 'undefined' && process.emitWarning) - process.emitWarning(warning); + if (typeof node_process.emitWarning === 'function') + node_process.emitWarning(warning); else console.warn(warning); } @@ -13540,7 +13653,6 @@ class Collection extends Node.NodeBase { } } } -Collection.maxFlowStringSingleLineLength = 60; exports.Collection = Collection; exports.collectionFromPath = collectionFromPath; @@ -13964,24 +14076,17 @@ exports.YAMLSeq = YAMLSeq; var log = __nccwpck_require__(7249); +var merge = __nccwpck_require__(452); var stringify = __nccwpck_require__(2148); var identity = __nccwpck_require__(1127); -var Scalar = __nccwpck_require__(3301); var toJS = __nccwpck_require__(4043); -const MERGE_KEY = '<<'; function addPairToJSMap(ctx, map, { key, value }) { - if (ctx?.doc.schema.merge && isMergeKey(key)) { - value = identity.isAlias(value) ? value.resolve(ctx.doc) : value; - if (identity.isSeq(value)) - for (const it of value.items) - mergeToJSMap(ctx, map, it); - else if (Array.isArray(value)) - for (const it of value) - mergeToJSMap(ctx, map, it); - else - mergeToJSMap(ctx, map, value); - } + if (identity.isNode(key) && key.addToJSMap) + key.addToJSMap(ctx, map, value); + // TODO: Should drop this special case for bare << handling + else if (merge.isMergeKey(ctx, key)) + merge.addMergeToJSMap(ctx, map, value); else { const jsKey = toJS.toJS(key, '', ctx); if (map instanceof Map) { @@ -14006,41 +14111,6 @@ function addPairToJSMap(ctx, map, { key, value }) { } return map; } -const isMergeKey = (key) => key === MERGE_KEY || - (identity.isScalar(key) && - key.value === MERGE_KEY && - (!key.type || key.type === Scalar.Scalar.PLAIN)); -// If the value associated with a merge key is a single mapping node, each of -// its key/value pairs is inserted into the current mapping, unless the key -// already exists in it. If the value associated with the merge key is a -// sequence, then this sequence is expected to contain mapping nodes and each -// of these nodes is merged in turn according to its order in the sequence. -// Keys in mapping nodes earlier in the sequence override keys specified in -// later mapping nodes. -- http://yaml.org/type/merge.html -function mergeToJSMap(ctx, map, value) { - const source = ctx && identity.isAlias(value) ? value.resolve(ctx.doc) : value; - if (!identity.isMap(source)) - throw new Error('Merge sources must be maps or map aliases'); - const srcMap = source.toJSON(null, ctx, Map); - for (const [key, value] of srcMap) { - if (map instanceof Map) { - if (!map.has(key)) - map.set(key, value); - } - else if (map instanceof Set) { - map.add(key); - } - else if (!Object.prototype.hasOwnProperty.call(map, key)) { - Object.defineProperty(map, key, { - value, - writable: true, - enumerable: true, - configurable: true - }); - } - } - return map; -} function stringifyKey(key, jsKey, ctx) { if (jsKey === null) return ''; @@ -14205,7 +14275,7 @@ function resolveAsScalar(token, strict = true, onError) { case 'double-quoted-scalar': return resolveFlowScalar.resolveFlowScalar(token, strict, _onError); case 'block-scalar': - return resolveBlockScalar.resolveBlockScalar(token, strict, _onError); + return resolveBlockScalar.resolveBlockScalar({ options: { strict } }, token, _onError); } } return null; @@ -14790,11 +14860,11 @@ function isEmpty(ch) { return false; } } -const hexDigits = '0123456789ABCDEFabcdef'.split(''); -const tagChars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()".split(''); -const invalidFlowScalarChars = ',[]{}'.split(''); -const invalidAnchorChars = ' ,[]{}\n\r\t'.split(''); -const isNotAnchorChar = (ch) => !ch || invalidAnchorChars.includes(ch); +const hexDigits = new Set('0123456789ABCDEFabcdef'); +const tagChars = new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"); +const flowIndicatorChars = new Set(',[]{}'); +const invalidAnchorChars = new Set(' ,[]{}\n\r\t'); +const isNotAnchorChar = (ch) => !ch || invalidAnchorChars.has(ch); /** * Splits an input string into lexical tokens, i.e. smaller strings that are * easily identifiable by `tokens.tokenType()`. @@ -14860,6 +14930,8 @@ class Lexer { */ *lex(source, incomplete = false) { if (source) { + if (typeof source !== 'string') + throw TypeError('source is not a string'); this.buffer = this.buffer ? this.buffer + source : source; this.lineEndPos = null; } @@ -14959,11 +15031,16 @@ class Lexer { } if (line[0] === '%') { let dirEnd = line.length; - const cs = line.indexOf('#'); - if (cs !== -1) { + let cs = line.indexOf('#'); + while (cs !== -1) { const ch = line[cs - 1]; - if (ch === ' ' || ch === '\t') + if (ch === ' ' || ch === '\t') { dirEnd = cs - 1; + break; + } + else { + cs = line.indexOf('#', cs + 1); + } } while (true) { const ch = line[dirEnd - 1]; @@ -14994,15 +15071,11 @@ class Lexer { if (!this.atEnd && !this.hasChars(4)) return this.setNext('line-start'); const s = this.peek(3); - if (s === '---' && isEmpty(this.charAt(3))) { + if ((s === '---' || s === '...') && isEmpty(this.charAt(3))) { yield* this.pushCount(3); this.indentValue = 0; this.indentNext = 0; - return 'doc'; - } - else if (s === '...' && isEmpty(this.charAt(3))) { - yield* this.pushCount(3); - return 'stream'; + return s === '---' ? 'doc' : 'stream'; } } this.indentValue = yield* this.pushSpaces(false); @@ -15229,8 +15302,10 @@ class Lexer { if (indent >= this.indentNext) { if (this.blockScalarIndent === -1) this.indentNext = indent; - else - this.indentNext += this.blockScalarIndent; + else { + this.indentNext = + this.blockScalarIndent + (this.indentNext === 0 ? 1 : this.indentNext); + } do { const cs = this.continueScalar(nl + 1); if (cs === -1) @@ -15243,14 +15318,25 @@ class Lexer { nl = this.buffer.length; } } - if (!this.blockScalarKeep) { + // Trailing insufficiently indented tabs are invalid. + // To catch that during parsing, we include them in the block scalar value. + let i = nl + 1; + ch = this.buffer[i]; + while (ch === ' ') + ch = this.buffer[++i]; + if (ch === '\t') { + while (ch === '\t' || ch === ' ' || ch === '\r' || ch === '\n') + ch = this.buffer[++i]; + nl = i - 1; + } + else if (!this.blockScalarKeep) { do { let i = nl - 1; let ch = this.buffer[i]; if (ch === '\r') ch = this.buffer[--i]; const lastChar = i; // Drop the line if last char not more indented - while (ch === ' ' || ch === '\t') + while (ch === ' ') ch = this.buffer[--i]; if (ch === '\n' && i >= this.pos && i + 1 + indent > lastChar) nl = i; @@ -15270,7 +15356,7 @@ class Lexer { while ((ch = this.buffer[++i])) { if (ch === ':') { const next = this.buffer[i + 1]; - if (isEmpty(next) || (inFlow && next === ',')) + if (isEmpty(next) || (inFlow && flowIndicatorChars.has(next))) break; end = i; } @@ -15285,7 +15371,7 @@ class Lexer { else end = i; } - if (next === '#' || (inFlow && invalidFlowScalarChars.includes(next))) + if (next === '#' || (inFlow && flowIndicatorChars.has(next))) break; if (ch === '\n') { const cs = this.continueScalar(i + 1); @@ -15295,7 +15381,7 @@ class Lexer { } } else { - if (inFlow && invalidFlowScalarChars.includes(ch)) + if (inFlow && flowIndicatorChars.has(ch)) break; end = i; } @@ -15340,7 +15426,7 @@ class Lexer { case ':': { const inFlow = this.flowLevel > 0; const ch1 = this.charAt(1); - if (isEmpty(ch1) || (inFlow && invalidFlowScalarChars.includes(ch1))) { + if (isEmpty(ch1) || (inFlow && flowIndicatorChars.has(ch1))) { if (!inFlow) this.indentNext = this.indentValue + 1; else if (this.flowKey) @@ -15365,11 +15451,11 @@ class Lexer { let i = this.pos + 1; let ch = this.buffer[i]; while (ch) { - if (tagChars.includes(ch)) + if (tagChars.has(ch)) ch = this.buffer[++i]; else if (ch === '%' && - hexDigits.includes(this.buffer[i + 1]) && - hexDigits.includes(this.buffer[i + 2])) { + hexDigits.has(this.buffer[i + 1]) && + hexDigits.has(this.buffer[i + 2])) { ch = this.buffer[(i += 3)]; } else @@ -15469,6 +15555,7 @@ exports.LineCounter = LineCounter; "use strict"; +var node_process = __nccwpck_require__(1708); var cst = __nccwpck_require__(3461); var lexer = __nccwpck_require__(361); @@ -15635,7 +15722,7 @@ class Parser { */ *next(source) { this.source = source; - if (process.env.LOG_TOKENS) + if (node_process.env.LOG_TOKENS) console.log('|', cst.prettyToken(source)); if (this.atScalar) { this.atScalar = false; @@ -15777,7 +15864,7 @@ class Parser { } else { Object.assign(it, { key: token, sep: [] }); - this.onKeyLine = !includesToken(it.start, 'explicit-key-ind'); + this.onKeyLine = !it.explicitKey; return; } break; @@ -15986,7 +16073,10 @@ class Parser { return; } if (this.indent >= map.indent) { - const atNextItem = !this.onKeyLine && this.indent === map.indent && it.sep; + const atMapIndent = !this.onKeyLine && this.indent === map.indent; + const atNextItem = atMapIndent && + (it.sep || it.explicitKey) && + this.type !== 'seq-item-ind'; // For empty nodes, assign newline-separated not indented empty tokens to following node let start = []; if (atNextItem && it.sep && !it.value) { @@ -16026,25 +16116,26 @@ class Parser { } return; case 'explicit-key-ind': - if (!it.sep && !includesToken(it.start, 'explicit-key-ind')) { + if (!it.sep && !it.explicitKey) { it.start.push(this.sourceToken); + it.explicitKey = true; } else if (atNextItem || it.value) { start.push(this.sourceToken); - map.items.push({ start }); + map.items.push({ start, explicitKey: true }); } else { this.stack.push({ type: 'block-map', offset: this.offset, indent: this.indent, - items: [{ start: [this.sourceToken] }] + items: [{ start: [this.sourceToken], explicitKey: true }] }); } this.onKeyLine = true; return; case 'map-value-ind': - if (includesToken(it.start, 'explicit-key-ind')) { + if (it.explicitKey) { if (!it.sep) { if (includesToken(it.start, 'newline')) { Object.assign(it, { key: null, sep: [this.sourceToken] }); @@ -16077,7 +16168,9 @@ class Parser { const sep = it.sep; sep.push(this.sourceToken); // @ts-expect-error type guard is wrong here - delete it.key, delete it.sep; + delete it.key; + // @ts-expect-error type guard is wrong here + delete it.sep; this.stack.push({ type: 'block-map', offset: this.offset, @@ -16135,9 +16228,7 @@ class Parser { default: { const bv = this.startBlockValue(map); if (bv) { - if (atNextItem && - bv.type !== 'block-seq' && - includesToken(it.start, 'explicit-key-ind')) { + if (atMapIndent && bv.type !== 'block-seq') { map.items.push({ start }); } this.stack.push(bv); @@ -16358,7 +16449,7 @@ class Parser { type: 'block-map', offset: this.offset, indent: this.indent, - items: [{ start }] + items: [{ start, explicitKey: true }] }; } case 'map-value-ind': { @@ -16435,6 +16526,7 @@ var composer = __nccwpck_require__(9984); var Document = __nccwpck_require__(3021); var errors = __nccwpck_require__(1464); var log = __nccwpck_require__(7249); +var identity = __nccwpck_require__(1127); var lineCounter = __nccwpck_require__(6628); var parser = __nccwpck_require__(3456); @@ -16526,6 +16618,8 @@ function stringify(value, replacer, options) { if (!keepUndefined) return undefined; } + if (identity.isDocument(value) && !_replacer) + return value.toString(options); return new Document.Document(value, _replacer, options).toString(options); } @@ -16557,10 +16651,9 @@ class Schema { : compat ? tags.getTags(null, compat) : null; - this.merge = !!merge; this.name = (typeof schema === 'string' && schema) || 'core'; this.knownTags = resolveKnownTags ? tags.coreKnownTags : {}; - this.tags = tags.getTags(customTags, this.name); + this.tags = tags.getTags(customTags, this.name, merge); this.toStringOptions = toStringDefaults ?? null; Object.defineProperty(this, identity.MAP, { value: map.map }); Object.defineProperty(this, identity.SCALAR, { value: string.string }); @@ -16730,7 +16823,7 @@ const floatNaN = { identify: value => typeof value === 'number', default: true, tag: 'tag:yaml.org,2002:float', - test: /^(?:[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN))$/, + test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/, resolve: str => str.slice(-3).toLowerCase() === 'nan' ? NaN : str[0] === '-' @@ -16890,7 +16983,7 @@ const jsonScalars = [ identify: value => typeof value === 'boolean', default: true, tag: 'tag:yaml.org,2002:bool', - test: /^true|false$/, + test: /^true$|^false$/, resolve: str => str === 'true', stringify: stringifyJSON }, @@ -16943,6 +17036,7 @@ var int = __nccwpck_require__(9874); var schema = __nccwpck_require__(896); var schema$1 = __nccwpck_require__(3559); var binary = __nccwpck_require__(6083); +var merge = __nccwpck_require__(452); var omap = __nccwpck_require__(303); var pairs = __nccwpck_require__(8385); var schema$2 = __nccwpck_require__(5913); @@ -16968,6 +17062,7 @@ const tagsByName = { intOct: int.intOct, intTime: timestamp.intTime, map: map.map, + merge: merge.merge, null: _null.nullTag, omap: omap.omap, pairs: pairs.pairs, @@ -16977,13 +17072,20 @@ const tagsByName = { }; const coreKnownTags = { 'tag:yaml.org,2002:binary': binary.binary, + 'tag:yaml.org,2002:merge': merge.merge, 'tag:yaml.org,2002:omap': omap.omap, 'tag:yaml.org,2002:pairs': pairs.pairs, 'tag:yaml.org,2002:set': set.set, 'tag:yaml.org,2002:timestamp': timestamp.timestamp }; -function getTags(customTags, schemaName) { - let tags = schemas.get(schemaName); +function getTags(customTags, schemaName, addMergeTag) { + const schemaTags = schemas.get(schemaName); + if (schemaTags && !customTags) { + return addMergeTag && !schemaTags.includes(merge.merge) + ? schemaTags.concat(merge.merge) + : schemaTags.slice(); + } + let tags = schemaTags; if (!tags) { if (Array.isArray(customTags)) tags = []; @@ -17002,17 +17104,21 @@ function getTags(customTags, schemaName) { else if (typeof customTags === 'function') { tags = customTags(tags.slice()); } - return tags.map(tag => { - if (typeof tag !== 'string') - return tag; - const tagObj = tagsByName[tag]; - if (tagObj) - return tagObj; - const keys = Object.keys(tagsByName) - .map(key => JSON.stringify(key)) - .join(', '); - throw new Error(`Unknown custom tag "${tag}"; use one of ${keys}`); - }); + if (addMergeTag) + tags = tags.concat(merge.merge); + return tags.reduce((tags, tag) => { + const tagObj = typeof tag === 'string' ? tagsByName[tag] : tag; + if (!tagObj) { + const tagName = JSON.stringify(tag); + const keys = Object.keys(tagsByName) + .map(key => JSON.stringify(key)) + .join(', '); + throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`); + } + if (!tags.includes(tagObj)) + tags.push(tagObj); + return tags; + }, []); } exports.coreKnownTags = coreKnownTags; @@ -17027,6 +17133,7 @@ exports.getTags = getTags; "use strict"; +var node_buffer = __nccwpck_require__(4573); var Scalar = __nccwpck_require__(3301); var stringifyString = __nccwpck_require__(3069); @@ -17043,8 +17150,8 @@ const binary = { * document.querySelector('#photo').src = URL.createObjectURL(blob) */ resolve(src, onError) { - if (typeof Buffer === 'function') { - return Buffer.from(src, 'base64'); + if (typeof node_buffer.Buffer === 'function') { + return node_buffer.Buffer.from(src, 'base64'); } else if (typeof atob === 'function') { // On IE 11, atob() can't handle newlines @@ -17062,11 +17169,11 @@ const binary = { stringify({ comment, type, value }, ctx, onComment, onChompKeep) { const buf = value; // checked earlier by binary.identify() let str; - if (typeof Buffer === 'function') { + if (typeof node_buffer.Buffer === 'function') { str = - buf instanceof Buffer + buf instanceof node_buffer.Buffer ? buf.toString('base64') - : Buffer.from(buf.buffer).toString('base64'); + : node_buffer.Buffer.from(buf.buffer).toString('base64'); } else if (typeof btoa === 'function') { let s = ''; @@ -17123,7 +17230,7 @@ const falseTag = { identify: value => value === false, default: true, tag: 'tag:yaml.org,2002:bool', - test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i, + test: /^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/, resolve: () => new Scalar.Scalar(false), stringify: boolStringify }; @@ -17147,7 +17254,7 @@ const floatNaN = { identify: value => typeof value === 'number', default: true, tag: 'tag:yaml.org,2002:float', - test: /^[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN)$/, + test: /^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/, resolve: (str) => str.slice(-3).toLowerCase() === 'nan' ? NaN : str[0] === '-' @@ -17274,6 +17381,82 @@ exports.intHex = intHex; exports.intOct = intOct; +/***/ }), + +/***/ 452: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var identity = __nccwpck_require__(1127); +var Scalar = __nccwpck_require__(3301); + +// If the value associated with a merge key is a single mapping node, each of +// its key/value pairs is inserted into the current mapping, unless the key +// already exists in it. If the value associated with the merge key is a +// sequence, then this sequence is expected to contain mapping nodes and each +// of these nodes is merged in turn according to its order in the sequence. +// Keys in mapping nodes earlier in the sequence override keys specified in +// later mapping nodes. -- http://yaml.org/type/merge.html +const MERGE_KEY = '<<'; +const merge = { + identify: value => value === MERGE_KEY || + (typeof value === 'symbol' && value.description === MERGE_KEY), + default: 'key', + tag: 'tag:yaml.org,2002:merge', + test: /^<<$/, + resolve: () => Object.assign(new Scalar.Scalar(Symbol(MERGE_KEY)), { + addToJSMap: addMergeToJSMap + }), + stringify: () => MERGE_KEY +}; +const isMergeKey = (ctx, key) => (merge.identify(key) || + (identity.isScalar(key) && + (!key.type || key.type === Scalar.Scalar.PLAIN) && + merge.identify(key.value))) && + ctx?.doc.schema.tags.some(tag => tag.tag === merge.tag && tag.default); +function addMergeToJSMap(ctx, map, value) { + value = ctx && identity.isAlias(value) ? value.resolve(ctx.doc) : value; + if (identity.isSeq(value)) + for (const it of value.items) + mergeValue(ctx, map, it); + else if (Array.isArray(value)) + for (const it of value) + mergeValue(ctx, map, it); + else + mergeValue(ctx, map, value); +} +function mergeValue(ctx, map, value) { + const source = ctx && identity.isAlias(value) ? value.resolve(ctx.doc) : value; + if (!identity.isMap(source)) + throw new Error('Merge sources must be maps or map aliases'); + const srcMap = source.toJSON(null, ctx, Map); + for (const [key, value] of srcMap) { + if (map instanceof Map) { + if (!map.has(key)) + map.set(key, value); + } + else if (map instanceof Set) { + map.add(key); + } + else if (!Object.prototype.hasOwnProperty.call(map, key)) { + Object.defineProperty(map, key, { + value, + writable: true, + enumerable: true, + configurable: true + }); + } + } + return map; +} + +exports.addMergeToJSMap = addMergeToJSMap; +exports.isMergeKey = isMergeKey; +exports.merge = merge; + + /***/ }), /***/ 303: @@ -17465,6 +17648,7 @@ var binary = __nccwpck_require__(6083); var bool = __nccwpck_require__(8398); var float = __nccwpck_require__(5782); var int = __nccwpck_require__(873); +var merge = __nccwpck_require__(452); var omap = __nccwpck_require__(303); var pairs = __nccwpck_require__(8385); var set = __nccwpck_require__(1528); @@ -17485,6 +17669,7 @@ const schema = [ float.floatExp, float.float, binary.binary, + merge.merge, omap.omap, pairs.pairs, set.set, @@ -17705,7 +17890,7 @@ const timestamp = { } return new Date(date); }, - stringify: ({ value }) => value.toISOString().replace(/((T00:00)?:00)?\.000Z$/, '') + stringify: ({ value }) => value.toISOString().replace(/(T00:00:00)?\.000Z$/, '') }; exports.floatTime = floatTime; @@ -17732,6 +17917,8 @@ const FOLD_QUOTED = 'quoted'; function foldFlowLines(text, indent, mode = 'flow', { indentAtStart, lineWidth = 80, minContentWidth = 20, onFold, onOverflow } = {}) { if (!lineWidth || lineWidth < 0) return text; + if (lineWidth < minContentWidth) + minContentWidth = 0; const endStep = Math.max(1 + minContentWidth, 1 + lineWidth - indent.length); if (text.length <= endStep) return text; @@ -17751,7 +17938,7 @@ function foldFlowLines(text, indent, mode = 'flow', { indentAtStart, lineWidth = let escStart = -1; let escEnd = -1; if (mode === FOLD_BLOCK) { - i = consumeMoreIndentedLines(text, i); + i = consumeMoreIndentedLines(text, i, indent.length); if (i !== -1) end = i + endStep; } @@ -17775,8 +17962,8 @@ function foldFlowLines(text, indent, mode = 'flow', { indentAtStart, lineWidth = } if (ch === '\n') { if (mode === FOLD_BLOCK) - i = consumeMoreIndentedLines(text, i); - end = i + endStep; + i = consumeMoreIndentedLines(text, i, indent.length); + end = i + indent.length + endStep; split = undefined; } else { @@ -17844,15 +18031,24 @@ function foldFlowLines(text, indent, mode = 'flow', { indentAtStart, lineWidth = * Presumes `i + 1` is at the start of a line * @returns index of last newline in more-indented block */ -function consumeMoreIndentedLines(text, i) { - let ch = text[i + 1]; +function consumeMoreIndentedLines(text, i, indent) { + let end = i; + let start = i + 1; + let ch = text[start]; while (ch === ' ' || ch === '\t') { - do { - ch = text[(i += 1)]; - } while (ch && ch !== '\n'); - ch = text[i + 1]; + if (i < start + indent) { + ch = text[++i]; + } + else { + do { + ch = text[++i]; + } while (ch && ch !== '\n'); + end = i; + start = i + 1; + ch = text[start]; + } } - return i; + return end; } exports.FOLD_BLOCK = FOLD_BLOCK; @@ -17925,7 +18121,12 @@ function getTagObject(tags, item) { let obj; if (identity.isScalar(item)) { obj = item.value; - const match = tags.filter(t => t.identify?.(obj)); + let match = tags.filter(t => t.identify?.(obj)); + if (match.length > 1) { + const testMatch = match.filter(t => t.test); + if (testMatch.length > 0) + match = testMatch; + } tagObj = match.find(t => t.format === item.format) ?? match.find(t => !t.format); } @@ -18064,7 +18265,7 @@ function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, fl onChompKeep(); return str; } -function stringifyFlowCollection({ comment, items }, ctx, { flowChars, itemIndent, onComment }) { +function stringifyFlowCollection({ items }, ctx, { flowChars, itemIndent }) { const { indent, indentStep, flowCollectionPadding: fcPadding, options: { commentString } } = ctx; itemIndent += indentStep; const itemCtx = Object.assign({}, ctx, { @@ -18117,10 +18318,9 @@ function stringifyFlowCollection({ comment, items }, ctx, { flowChars, itemInden lines.push(str); linesAtValue = lines.length; } - let str; const { start, end } = flowChars; if (lines.length === 0) { - str = start + end; + return start + end; } else { if (!reqNewline) { @@ -18128,21 +18328,15 @@ function stringifyFlowCollection({ comment, items }, ctx, { flowChars, itemInden reqNewline = ctx.options.lineWidth > 0 && len > ctx.options.lineWidth; } if (reqNewline) { - str = start; + let str = start; for (const line of lines) str += line ? `\n${indentStep}${indent}${line}` : '\n'; - str += `\n${indent}${end}`; + return `${str}\n${indent}${end}`; } else { - str = `${start}${fcPadding}${lines.join(' ')}${fcPadding}${end}`; + return `${start}${fcPadding}${lines.join(' ')}${fcPadding}${end}`; } } - if (comment) { - str += stringifyComment.lineComment(str, indent, commentString(comment)); - if (onComment) - onComment(); - } - return str; } function addCommentBefore({ indent, options: { commentString } }, lines, comment, chompKeep) { if (comment && chompKeep) @@ -18337,7 +18531,7 @@ function stringifyPair({ key, value }, ctx, onComment, onChompKeep) { if (keyComment) { throw new Error('With simple keys, key nodes cannot have comments'); } - if (identity.isCollection(key)) { + if (identity.isCollection(key) || (!identity.isNode(key) && typeof key === 'object')) { const msg = 'With simple keys, collection cannot be used as a key value'; throw new Error(msg); } @@ -18706,23 +18900,32 @@ function blockString({ comment, type, value }, ctx, onComment, onChompKeep) { start = start.replace(/\n+/g, `$&${indent}`); } const indentSize = indent ? '2' : '1'; // root is at -1 - let header = (literal ? '|' : '>') + (startWithSpace ? indentSize : '') + chomp; + // Leading | or > is added later + let header = (startWithSpace ? indentSize : '') + chomp; if (comment) { header += ' ' + commentString(comment.replace(/ ?[\r\n]+/g, ' ')); if (onComment) onComment(); } - if (literal) { - value = value.replace(/\n+/g, `$&${indent}`); - return `${header}\n${indent}${start}${value}${end}`; + if (!literal) { + const foldedValue = value + .replace(/\n+/g, '\n$&') + .replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, '$1$2') // more-indented lines aren't folded + // ^ more-ind. ^ empty ^ capture next empty lines only at end of indent + .replace(/\n+/g, `$&${indent}`); + let literalFallback = false; + const foldOptions = getFoldOptions(ctx, true); + if (blockQuote !== 'folded' && type !== Scalar.Scalar.BLOCK_FOLDED) { + foldOptions.onOverflow = () => { + literalFallback = true; + }; + } + const body = foldFlowLines.foldFlowLines(`${start}${foldedValue}${end}`, indent, foldFlowLines.FOLD_BLOCK, foldOptions); + if (!literalFallback) + return `>${header}\n${indent}${body}`; } - value = value - .replace(/\n+/g, '\n$&') - .replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, '$1$2') // more-indented lines aren't folded - // ^ more-ind. ^ empty ^ capture next empty lines only at end of indent - .replace(/\n+/g, `$&${indent}`); - const body = foldFlowLines.foldFlowLines(`${start}${value}${end}`, indent, foldFlowLines.FOLD_BLOCK, getFoldOptions(ctx, true)); - return `${header}\n${indent}${body}`; + value = value.replace(/\n+/g, `$&${indent}`); + return `|${header}\n${indent}${start}${value}${end}`; } function plainString(item, ctx, onComment, onChompKeep) { const { type, value } = item;