renovate 39.244.2 → 39.245.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/util/yaml.js CHANGED
@@ -6,7 +6,6 @@ exports.parseSingleYamlDocument = parseSingleYamlDocument;
6
6
  exports.dump = dump;
7
7
  const yaml_1 = require("yaml");
8
8
  const logger_1 = require("../logger");
9
- const regex_1 = require("./regex");
10
9
  const string_1 = require("./string");
11
10
  /**
12
11
  * Parse a YAML string into a JavaScript object.
@@ -100,7 +99,7 @@ function dump(obj, opts) {
100
99
  }
101
100
  function massageContent(content, options) {
102
101
  if (options?.removeTemplates) {
103
- return (0, string_1.stripTemplates)(content.replace((0, regex_1.regEx)(/\s+{{.+?}}:.+/gs), ''));
102
+ return (0, string_1.stripTemplates)(content);
104
103
  }
105
104
  return content;
106
105
  }
@@ -1 +1 @@
1
- {"version":3,"file":"yaml.js","sourceRoot":"","sources":["../../lib/util/yaml.ts"],"names":[],"mappings":";;AA2DA,8BAoDC;AAaD,0CAaC;AAUD,0DAeC;AAED,oBAEC;AA9JD,+BAAmE;AAEnE,sCAAmC;AACnC,mCAAgC;AAChC,qCAA0C;AAgC1C;;;;;;;;;;;;;;GAcG;AACH,SAAgB,SAAS,CACvB,OAAe,EACf,OAAmC;IAEnC,MAAM,eAAe,GAAG,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAEzD,MAAM,YAAY,GAAG,IAAA,wBAAiB,EACpC,eAAe,EACf,kBAAkB,CAAC,OAAO,CAAC,CAC5B,CAAC;IAEF,MAAM,MAAM,GAAG,OAAO,EAAE,YAAY,CAAC;IAErC,MAAM,OAAO,GAAW,EAAE,CAAC;IAC3B,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;QACvC,MAAM,MAAM,GAAG,WAAW,CAAC,MAAM,CAAC;QAClC,2BAA2B;QAC3B,IAAI,MAAM,EAAE,MAAM,EAAE,CAAC;YACnB,MAAM,KAAK,GAAG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OAAO,EAAE,YAAY,CAAC;IACrC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,QAAgB,CAAC;IAC1B,CAAC;IAED,OAAO,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;AAChC,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,uBAAuB,CACrC,OAAe,EACf,OAAkC;IAElC,MAAM,eAAe,GAAG,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACzD,MAAM,WAAW,GAAG,IAAA,oBAAa,EAC/B,eAAe,EACf,kBAAkB,CAAC,OAAO,CAAC,CAC5B,CAAC;IAEF,IAAI,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;QAChC,MAAM,IAAI,cAAc,CAAC,WAAW,CAAC,MAAM,EAAE,2BAA2B,CAAC,CAAC;IAC5E,CAAC;IAED,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,SAAgB,IAAI,CAAC,GAAQ,EAAE,IAAkB;IAC/C,OAAO,IAAA,gBAAS,EAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AAC9B,CAAC;AAED,SAAS,cAAc,CAAC,OAAe,EAAE,OAAqB;IAC5D,IAAI,OAAO,EAAE,eAAe,EAAE,CAAC;QAC7B,OAAO,IAAA,uBAAc,EAAC,OAAO,CAAC,OAAO,CAAC,IAAA,aAAK,EAAC,iBAAiB,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IACvE,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAS,kBAAkB,CAAC,OAAgC;IAC1D,OAAO;QACL,YAAY,EAAE,IAAI;QAClB,0FAA0F;QAC1F,UAAU,EAAE,CAAC,OAAO,EAAE,eAAe;QACrC,MAAM,EAAE,KAAK;QACb,GAAG,OAAO;KACX,CAAC;AACJ,CAAC","sourcesContent":["import type {\n CreateNodeOptions,\n Document,\n DocumentOptions,\n ParseOptions,\n SchemaOptions,\n ToStringOptions,\n} from 'yaml';\nimport { parseAllDocuments, parseDocument, stringify } from 'yaml';\nimport type { ZodType } from 'zod';\nimport { logger } from '../logger';\nimport { regEx } from './regex';\nimport { stripTemplates } from './string';\n\nexport interface YamlOptions<\n ResT = unknown,\n Schema extends ZodType<ResT> = ZodType<ResT>,\n> extends ParseOptions,\n DocumentOptions,\n SchemaOptions {\n customSchema?: Schema;\n removeTemplates?: boolean;\n}\n\ninterface YamlParseDocumentOptions\n extends ParseOptions,\n DocumentOptions,\n SchemaOptions {\n removeTemplates?: boolean;\n}\n\nexport interface YamlOptionsMultiple<\n ResT = unknown,\n Schema extends ZodType<ResT> = ZodType<ResT>,\n> extends YamlOptions<ResT, Schema> {\n failureBehaviour?: 'throw' | 'filter';\n}\n\nexport type DumpOptions = DocumentOptions &\n SchemaOptions &\n ParseOptions &\n CreateNodeOptions &\n ToStringOptions;\n\n/**\n * Parse a YAML string into a JavaScript object.\n *\n * Multiple documents are supported.\n *\n * If a schema is provided, the parsed object will be validated against it.\n *\n * If failureBehaviour is set to 'filter',\n * the function will return an empty array if the YAML parsing or schema validation fails and therefore will not throw an error.\n *\n * If failureBehaviour is set to 'throw',\n * the function will throw an error if the YAML parsing or schema validation fails for ANY document.\n * @param content\n * @param options\n */\nexport function parseYaml<ResT = unknown>(\n content: string,\n options?: YamlOptionsMultiple<ResT>,\n): ResT[] {\n const massagedContent = massageContent(content, options);\n\n const rawDocuments = parseAllDocuments(\n massagedContent,\n prepareParseOption(options),\n );\n\n const schema = options?.customSchema;\n\n const results: ResT[] = [];\n for (const rawDocument of rawDocuments) {\n const errors = rawDocument.errors;\n // handle YAML parse errors\n if (errors?.length) {\n const error = new AggregateError(errors, 'Failed to parse YAML file');\n if (options?.failureBehaviour === 'filter') {\n logger.debug(`Failed to parse YAML file`);\n continue;\n }\n throw error;\n }\n\n const document = rawDocument.toJS({ maxAliasCount: 10000 });\n\n // skip schema validation if no schema is provided\n if (!schema) {\n results.push(document as ResT);\n continue;\n }\n\n const result = schema.safeParse(document);\n if (result.success) {\n results.push(result.data);\n continue;\n }\n\n // handle schema validation errors\n if (options?.failureBehaviour === 'filter') {\n logger.trace(\n { error: result.error, document },\n 'Failed to parse schema for YAML',\n );\n continue;\n }\n throw new Error('Failed to parse YAML file', { cause: result.error });\n }\n\n return results;\n}\n\n/**\n * Parse a YAML string into a JavaScript object.\n *\n * Only a single document is supported.\n *\n * If a schema is provided, the parsed object will be validated against it.\n * Should the YAML parsing or schemata validation fail, an error will be thrown.\n *\n * @param content\n * @param options\n */\nexport function parseSingleYaml<ResT = unknown>(\n content: string,\n options?: YamlOptions<ResT>,\n): ResT {\n const rawDocument = parseSingleYamlDocument(content, options);\n\n const document = rawDocument.toJS({ maxAliasCount: 10000 });\n const schema = options?.customSchema;\n if (!schema) {\n return document as ResT;\n }\n\n return schema.parse(document);\n}\n\n/**\n * Parse a YAML string into a Document representation.\n *\n * Only a single document is supported.\n *\n * @param content\n * @param options\n */\nexport function parseSingleYamlDocument(\n content: string,\n options?: YamlParseDocumentOptions,\n): Document {\n const massagedContent = massageContent(content, options);\n const rawDocument = parseDocument(\n massagedContent,\n prepareParseOption(options),\n );\n\n if (rawDocument?.errors?.length) {\n throw new AggregateError(rawDocument.errors, 'Failed to parse YAML file');\n }\n\n return rawDocument;\n}\n\nexport function dump(obj: any, opts?: DumpOptions): string {\n return stringify(obj, opts);\n}\n\nfunction massageContent(content: string, options?: YamlOptions): string {\n if (options?.removeTemplates) {\n return stripTemplates(content.replace(regEx(/\\s+{{.+?}}:.+/gs), ''));\n }\n\n return content;\n}\n\nfunction prepareParseOption(options: YamlOptions | undefined): YamlOptions {\n return {\n prettyErrors: true,\n // if we're removing templates, we can run into the situation where we have duplicate keys\n uniqueKeys: !options?.removeTemplates,\n strict: false,\n ...options,\n };\n}\n"]}
1
+ {"version":3,"file":"yaml.js","sourceRoot":"","sources":["../../lib/util/yaml.ts"],"names":[],"mappings":";;AA0DA,8BAoDC;AAaD,0CAaC;AAUD,0DAeC;AAED,oBAEC;AA7JD,+BAAmE;AA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C,OAAe,EAAE,OAAqB;IAC5D,IAAI,OAAO,EAAE,eAAe,EAAE,CAAC;QAC7B,OAAO,IAAA,uBAAc,EAAC,OAAO,CAAC,CAAC;IACjC,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAS,kBAAkB,CAAC,OAAgC;IAC1D,OAAO;QACL,YAAY,EAAE,IAAI;QAClB,0FAA0F;QAC1F,UAAU,EAAE,CAAC,OAAO,EAAE,eAAe;QACrC,MAAM,EAAE,KAAK;QACb,GAAG,OAAO;KACX,CAAC;AACJ,CAAC","sourcesContent":["import type {\n CreateNodeOptions,\n Document,\n DocumentOptions,\n ParseOptions,\n SchemaOptions,\n ToStringOptions,\n} from 'yaml';\nimport { parseAllDocuments, parseDocument, stringify } from 'yaml';\nimport type { ZodType } from 'zod';\nimport { logger } from '../logger';\nimport { stripTemplates } from './string';\n\nexport interface YamlOptions<\n ResT = unknown,\n Schema extends ZodType<ResT> = ZodType<ResT>,\n> extends ParseOptions,\n DocumentOptions,\n SchemaOptions {\n customSchema?: Schema;\n removeTemplates?: boolean;\n}\n\ninterface YamlParseDocumentOptions\n extends ParseOptions,\n DocumentOptions,\n SchemaOptions {\n removeTemplates?: boolean;\n}\n\nexport interface YamlOptionsMultiple<\n ResT = unknown,\n Schema extends ZodType<ResT> = ZodType<ResT>,\n> extends YamlOptions<ResT, Schema> {\n failureBehaviour?: 'throw' | 'filter';\n}\n\nexport type DumpOptions = DocumentOptions &\n SchemaOptions &\n ParseOptions &\n CreateNodeOptions &\n ToStringOptions;\n\n/**\n * Parse a YAML string into a JavaScript object.\n *\n * Multiple documents are supported.\n *\n * If a schema is provided, the parsed object will be validated against it.\n *\n * If failureBehaviour is set to 'filter',\n * the function will return an empty array if the YAML parsing or schema validation fails and therefore will not throw an error.\n *\n * If failureBehaviour is set to 'throw',\n * the function will throw an error if the YAML parsing or schema validation fails for ANY document.\n * @param content\n * @param options\n */\nexport function parseYaml<ResT = unknown>(\n content: string,\n options?: YamlOptionsMultiple<ResT>,\n): ResT[] {\n const massagedContent = massageContent(content, options);\n\n const rawDocuments = parseAllDocuments(\n massagedContent,\n prepareParseOption(options),\n );\n\n const schema = options?.customSchema;\n\n const results: ResT[] = [];\n for (const rawDocument of rawDocuments) {\n const errors = rawDocument.errors;\n // handle YAML parse errors\n if (errors?.length) {\n const error = new AggregateError(errors, 'Failed to parse YAML file');\n if (options?.failureBehaviour === 'filter') {\n logger.debug(`Failed to parse YAML file`);\n continue;\n }\n throw error;\n }\n\n const document = rawDocument.toJS({ maxAliasCount: 10000 });\n\n // skip schema validation if no schema is provided\n if (!schema) {\n results.push(document as ResT);\n continue;\n }\n\n const result = schema.safeParse(document);\n if (result.success) {\n results.push(result.data);\n continue;\n }\n\n // handle schema validation errors\n if (options?.failureBehaviour === 'filter') {\n logger.trace(\n { error: result.error, document },\n 'Failed to parse schema for YAML',\n );\n continue;\n }\n throw new Error('Failed to parse YAML file', { cause: result.error });\n }\n\n return results;\n}\n\n/**\n * Parse a YAML string into a JavaScript object.\n *\n * Only a single document is supported.\n *\n * If a schema is provided, the parsed object will be validated against it.\n * Should the YAML parsing or schemata validation fail, an error will be thrown.\n *\n * @param content\n * @param options\n */\nexport function parseSingleYaml<ResT = unknown>(\n content: string,\n options?: YamlOptions<ResT>,\n): ResT {\n const rawDocument = parseSingleYamlDocument(content, options);\n\n const document = rawDocument.toJS({ maxAliasCount: 10000 });\n const schema = options?.customSchema;\n if (!schema) {\n return document as ResT;\n }\n\n return schema.parse(document);\n}\n\n/**\n * Parse a YAML string into a Document representation.\n *\n * Only a single document is supported.\n *\n * @param content\n * @param options\n */\nexport function parseSingleYamlDocument(\n content: string,\n options?: YamlParseDocumentOptions,\n): Document {\n const massagedContent = massageContent(content, options);\n const rawDocument = parseDocument(\n massagedContent,\n prepareParseOption(options),\n );\n\n if (rawDocument?.errors?.length) {\n throw new AggregateError(rawDocument.errors, 'Failed to parse YAML file');\n }\n\n return rawDocument;\n}\n\nexport function dump(obj: any, opts?: DumpOptions): string {\n return stringify(obj, opts);\n}\n\nfunction massageContent(content: string, options?: YamlOptions): string {\n if (options?.removeTemplates) {\n return stripTemplates(content);\n }\n\n return content;\n}\n\nfunction prepareParseOption(options: YamlOptions | undefined): YamlOptions {\n return {\n prettyErrors: true,\n // if we're removing templates, we can run into the situation where we have duplicate keys\n uniqueKeys: !options?.removeTemplates,\n strict: false,\n ...options,\n };\n}\n"]}
@@ -32,7 +32,7 @@ function sortBranches(branches) {
32
32
  }
33
33
  // TODO #22198
34
34
  // Sort by prTitle if updateType is the same
35
- return a.prTitle < b.prTitle ? -1 : 1;
35
+ return a.prTitle.localeCompare(b.prTitle, undefined, { numeric: true });
36
36
  });
37
37
  }
38
38
  function getPrPriority(branch) {
@@ -1 +1 @@
1
- {"version":3,"file":"sort.js","sourceRoot":"","sources":["../../../../lib/workers/repository/process/sort.ts"],"names":[],"mappings":";;AAGA,oCAkCC;AArCD,4CAAyC;AAGzC,SAAgB,YAAY,CAAC,QAAiC;IAC5D,gBAAgB;IAChB,MAAM,SAAS,GAAG;QAChB,KAAK;QACL,QAAQ;QACR,OAAO;QACP,OAAO;QACP,OAAO;QACP,qBAAqB;KACtB,CAAC;IACF,eAAM,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,EAAE,UAAU,CAAC,CAAC;IACvC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACrB,IAAI,CAAC,CAAC,oBAAoB,IAAI,CAAC,CAAC,CAAC,oBAAoB,EAAE,CAAC;YACtD,OAAO,CAAC,CAAC,CAAC;QACZ,CAAC;QACD,IAAI,CAAC,CAAC,CAAC,oBAAoB,IAAI,CAAC,CAAC,oBAAoB,EAAE,CAAC;YACtD,OAAO,CAAC,CAAC;QACX,CAAC;QAED,cAAc;QACd,MAAM,cAAc,GAAG,aAAa,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;QAC3D,IAAI,cAAc,KAAK,CAAC,EAAE,CAAC;YACzB,OAAO,cAAc,CAAC;QACxB,CAAC;QACD,cAAc;QACd,MAAM,QAAQ,GACZ,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,UAAW,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,UAAW,CAAC,CAAC;QACtE,IAAI,QAAQ,KAAK,CAAC,EAAE,CAAC;YACnB,OAAO,QAAQ,CAAC;QAClB,CAAC;QACD,cAAc;QACd,4CAA4C;QAC5C,OAAO,CAAC,CAAC,OAAQ,GAAG,CAAC,CAAC,OAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,aAAa,CAAC,MAA6B;IAClD,OAAO,MAAM,CAAC,UAAU,IAAI,CAAC,CAAC;AAChC,CAAC","sourcesContent":["import { logger } from '../../../logger';\nimport type { BranchConfig } from '../../types';\n\nexport function sortBranches(branches: Partial<BranchConfig>[]): void {\n // Sort branches\n const sortOrder = [\n 'pin',\n 'digest',\n 'patch',\n 'minor',\n 'major',\n 'lockFileMaintenance',\n ];\n logger.trace({ branches }, 'branches');\n branches.sort((a, b) => {\n if (a.isVulnerabilityAlert && !b.isVulnerabilityAlert) {\n return -1;\n }\n if (!a.isVulnerabilityAlert && b.isVulnerabilityAlert) {\n return 1;\n }\n\n // TODO #22198\n const prPriorityDiff = getPrPriority(b) - getPrPriority(a);\n if (prPriorityDiff !== 0) {\n return prPriorityDiff;\n }\n // TODO #22198\n const sortDiff =\n sortOrder.indexOf(a.updateType!) - sortOrder.indexOf(b.updateType!);\n if (sortDiff !== 0) {\n return sortDiff;\n }\n // TODO #22198\n // Sort by prTitle if updateType is the same\n return a.prTitle! < b.prTitle! ? -1 : 1;\n });\n}\n\nfunction getPrPriority(branch: Partial<BranchConfig>): number {\n return branch.prPriority ?? 0;\n}\n"]}
1
+ {"version":3,"file":"sort.js","sourceRoot":"","sources":["../../../../lib/work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IAAI,CAAC,CAAC;AAChC,CAAC","sourcesContent":["import { logger } from '../../../logger';\nimport type { BranchConfig } from '../../types';\n\nexport function sortBranches(branches: Partial<BranchConfig>[]): void {\n // Sort branches\n const sortOrder = [\n 'pin',\n 'digest',\n 'patch',\n 'minor',\n 'major',\n 'lockFileMaintenance',\n ];\n logger.trace({ branches }, 'branches');\n branches.sort((a, b) => {\n if (a.isVulnerabilityAlert && !b.isVulnerabilityAlert) {\n return -1;\n }\n if (!a.isVulnerabilityAlert && b.isVulnerabilityAlert) {\n return 1;\n }\n\n // TODO #22198\n const prPriorityDiff = getPrPriority(b) - getPrPriority(a);\n if (prPriorityDiff !== 0) {\n return prPriorityDiff;\n }\n // TODO #22198\n const sortDiff =\n sortOrder.indexOf(a.updateType!) - sortOrder.indexOf(b.updateType!);\n if (sortDiff !== 0) {\n return sortDiff;\n }\n // TODO #22198\n // Sort by prTitle if updateType is the same\n return a.prTitle!.localeCompare(b.prTitle!, undefined, { numeric: true });\n });\n}\n\nfunction getPrPriority(branch: Partial<BranchConfig>): number {\n return branch.prPriority ?? 0;\n}\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "renovate",
3
3
  "description": "Automated dependency updates. Flexible so you don't need to be.",
4
- "version": "39.244.2",
4
+ "version": "39.245.0",
5
5
  "type": "commonjs",
6
6
  "bin": {
7
7
  "renovate": "dist/renovate.js",