renovate 43.20.0 → 43.20.1

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.
@@ -40,7 +40,7 @@ function generateBranchName(update) {
40
40
  logger.debug(`Using sharedVariableName=${update.sharedVariableName} as groupName for depName=${update.depName}`);
41
41
  update.groupName = update.sharedVariableName;
42
42
  }
43
- if (update.groupName) if (["lockFileMaintenance", "replacement"].includes(update.updateType)) logger.debug({ depName: update.depName }, `Ignoring grouped branch name for ${update.updateType} update`);
43
+ if (update.groupName) if (update.updateType === "replacement") logger.debug({ depName: update.depName }, `Ignoring grouped branch name for ${update.updateType} update`);
44
44
  else {
45
45
  update.groupName = compile(update.groupName, update);
46
46
  logger.trace("Using group branchName template");
@@ -52,6 +52,7 @@ function generateBranchName(update) {
52
52
  else update.groupSlug = `major-${update.groupSlug}`;
53
53
  if (update.updateType === "minor" && update.separateMultipleMinor) update.groupSlug = `minor-${newMajor}.${newMinor}-${update.groupSlug}`;
54
54
  if (update.updateType === "patch" && update.separateMinorPatch) update.groupSlug = `patch-${update.groupSlug}`;
55
+ if (update.updateType === "lockFileMaintenance") update.groupSlug = `lock-file-maintenance-${update.groupSlug}`;
55
56
  update.branchTopic = update.group.branchTopic ?? update.branchTopic;
56
57
  update.branchName = update.group.branchName ?? update.branchName;
57
58
  }
@@ -1 +1 @@
1
- {"version":3,"file":"branch-name.js","names":["template.compile"],"sources":["../../../../lib/workers/repository/updates/branch-name.ts"],"sourcesContent":["// TODO #22198\nimport cleanGitRef from 'clean-git-ref';\nimport _slugify from 'slugify';\nimport { logger } from '../../../logger/index.ts';\nimport { hash } from '../../../util/hash.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport * as template from '../../../util/template/index.ts';\nimport type { BranchUpgradeConfig } from '../../types.ts';\n\nconst slugify = _slugify as unknown as typeof _slugify.default;\n\nconst MIN_HASH_LENGTH = 6;\n\nconst RE_MULTIPLE_DASH = regEx(/--+/g);\n\nconst RE_SPECIAL_CHARS_STRICT = regEx(/[`~!@#$%^&*()_=+[\\]\\\\|{};':\",.<>?/]/g);\n\n/**\n * Clean git branch name\n *\n * Remove what clean-git-ref fails to:\n * - leading dot/leading dot after slash\n * - trailing dot\n * - whitespace\n * - special characters\n * - leading or trailing dashes\n * - chained dashes(breaks markdown comments) are replaced by single dash\n */\nfunction cleanBranchName(\n branchName: string,\n branchPrefix: string,\n branchNameStrict?: boolean,\n): string {\n let cleanedBranchName = branchName;\n\n let existingBranchPrefix = '';\n if (branchNameStrict) {\n if (cleanedBranchName.startsWith(branchPrefix)) {\n existingBranchPrefix = branchPrefix;\n cleanedBranchName = cleanedBranchName.slice(branchPrefix.length);\n }\n cleanedBranchName =\n existingBranchPrefix +\n cleanedBranchName.replace(RE_SPECIAL_CHARS_STRICT, '-'); // massage out all special characters that slip through slugify\n }\n\n return cleanGitRef\n .clean(cleanedBranchName)\n .replace(regEx(/^\\.|\\.$/), '') // leading or trailing dot\n .replace(regEx(/\\/\\./g), '/') // leading dot after slash\n .replace(regEx(/\\s/g), '') // whitespace\n .replace(regEx(/[[\\]?:\\\\^~]/g), '-') // massage out all these characters: [ ] ? : \\ ^ ~\n .replace(regEx(/(^|\\/)-+/g), '$1') // leading dashes\n .replace(regEx(/-+(\\/|$)/g), '$1') // trailing dashes\n .replace(RE_MULTIPLE_DASH, '-'); // chained dashes\n}\n\nexport function generateBranchName(update: BranchUpgradeConfig): void {\n // Check whether to use a group name\n const newMajor = String(update.newMajor);\n const newMinor = String(update.newMinor);\n if (!update.groupName && update.sharedVariableName) {\n logger.debug(\n `Using sharedVariableName=${update.sharedVariableName} as groupName for depName=${update.depName}`,\n );\n update.groupName = update.sharedVariableName;\n }\n\n if (update.groupName) {\n if (['lockFileMaintenance', 'replacement'].includes(update.updateType!)) {\n logger.debug(\n { depName: update.depName },\n `Ignoring grouped branch name for ${update.updateType} update`,\n );\n } else {\n update.groupName = template.compile(update.groupName, update);\n logger.trace('Using group branchName template');\n // TODO: types (#22198)\n logger.trace(\n `Dependency ${update.depName!} is part of group ${update.groupName}`,\n );\n if (update.groupSlug) {\n update.groupSlug = template.compile(update.groupSlug, update);\n } else {\n update.groupSlug = update.groupName;\n }\n update.groupSlug = slugify(update.groupSlug, {\n lower: true,\n });\n if (update.updateType === 'major' && update.separateMajorMinor) {\n if (update.separateMultipleMajor) {\n update.groupSlug = `major-${newMajor}-${update.groupSlug}`;\n } else {\n update.groupSlug = `major-${update.groupSlug}`;\n }\n }\n if (update.updateType === 'minor' && update.separateMultipleMinor) {\n update.groupSlug = `minor-${newMajor}.${newMinor}-${update.groupSlug}`;\n }\n if (update.updateType === 'patch' && update.separateMinorPatch) {\n update.groupSlug = `patch-${update.groupSlug}`;\n }\n update.branchTopic = update.group!.branchTopic ?? update.branchTopic;\n update.branchName = update.group!.branchName ?? update.branchName;\n }\n }\n\n if (update.hashedBranchLength) {\n let hashLength = update.hashedBranchLength - update.branchPrefix!.length;\n if (hashLength < MIN_HASH_LENGTH) {\n logger.warn(\n `\\`hashedBranchLength\\` must allow for at least ${MIN_HASH_LENGTH} characters hashing in addition to \\`branchPrefix\\`. Using ${MIN_HASH_LENGTH} character hash instead.`,\n );\n hashLength = MIN_HASH_LENGTH;\n }\n\n const additionalBranchPrefix = template.compile(\n String(update.additionalBranchPrefix ?? ''),\n update,\n );\n\n const branchTopic = template.compile(\n String(update.branchTopic ?? ''),\n update,\n );\n\n let hashInput = additionalBranchPrefix + branchTopic;\n\n // Compile extra times in case of nested templates\n hashInput = template.compile(hashInput, update);\n hashInput = template.compile(hashInput, update);\n\n const hashedInput = hash(hashInput);\n\n // TODO: types (#22198)\n update.branchName = `${update.branchPrefix!}${hashedInput.slice(\n 0,\n hashLength,\n )}`;\n } else {\n update.branchName = template.compile(update.branchName, update);\n\n // Compile extra times in case of nested templates\n update.branchName = template.compile(update.branchName, update);\n update.branchName = template.compile(update.branchName, update);\n }\n update.branchName = cleanBranchName(\n update.branchName,\n update.branchPrefix!,\n update.branchNameStrict,\n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AiB,OAAO,WAAW,OAAO;MAE7D,QAAO,YAAY,OAAO;AAE5B,SAAO,YAAY,QAAQ,OAAO,WAAW,EAC3C,OAAO,MACR,CAAC;AACF,MAAI,OAAO,eAAe,WAAW,OAAO,mBAC1C,KAAI,OAAO,sBACT,QAAO,YAAY,SAAS,SAAS,GAAG,OAAO;MAE/C,QAAO,YAAY,SAAS,OAAO;AAGvC,MAAI,OAAO,eAAe,WAAW,OAAO,sBAC1C,QAAO,YAAY,SAAS,SAAS,GAAG,SAAS,GAAG,OAAO;AAE7D,MAAI,OAAO,eAAe,WAAW,OAAO,mBAC1C,QAAO,YAAY,SAAS,OAAO;AAErC,SAAO,cAAc,OAAO,MAAO,eAAe,OAAO;AACzD,SAAO,aAAa,OAAO,MAAO,cAAc,OAAO;;AAI3D,KAAI,OAAO,oBAAoB;EAC7B,IAAI,aAAa,OAAO,qBAAqB,OAAO,aAAc;AAClE,MAAI,aAAa,iBAAiB;AAChC,UAAO,KACL,kDAAkD,gBAAgB,6DAA6D,gBAAgB,0BAChJ;AACD,gBAAa;;EAaf,IAAI,YAV2BA,QAC7B,OAAO,OAAO,0BAA0B,GAAG,EAC3C,OACD,GAEmBA,QAClB,OAAO,OAAO,eAAe,GAAG,EAChC,OACD;AAKD,cAAYA,QAAiB,WAAW,OAAO;AAC/C,cAAYA,QAAiB,WAAW,OAAO;EAE/C,MAAM,cAAc,KAAK,UAAU;AAGnC,SAAO,aAAa,GAAG,OAAO,eAAgB,YAAY,MACxD,GACA,WACD;QACI;AACL,SAAO,aAAaA,QAAiB,OAAO,YAAY,OAAO;AAG/D,SAAO,aAAaA,QAAiB,OAAO,YAAY,OAAO;AAC/D,SAAO,aAAaA,QAAiB,OAAO,YAAY,OAAO;;AAEjE,QAAO,aAAa,gBAClB,OAAO,YACP,OAAO,cACP,OAAO,iBACR"}
1
+ {"version":3,"file":"branch-name.js","names":["template.compile"],"sources":["../../../../lib/workers/repository/updates/branch-name.ts"],"sourcesContent":["// TODO #22198\nimport cleanGitRef from 'clean-git-ref';\nimport _slugify from 'slugify';\nimport { logger } from '../../../logger/index.ts';\nimport { hash } from '../../../util/hash.ts';\nimport { regEx } from '../../../util/regex.ts';\nimport * as template from '../../../util/template/index.ts';\nimport type { BranchUpgradeConfig } from '../../types.ts';\n\nconst slugify = _slugify as unknown as typeof _slugify.default;\n\nconst MIN_HASH_LENGTH = 6;\n\nconst RE_MULTIPLE_DASH = regEx(/--+/g);\n\nconst RE_SPECIAL_CHARS_STRICT = regEx(/[`~!@#$%^&*()_=+[\\]\\\\|{};':\",.<>?/]/g);\n\n/**\n * Clean git branch name\n *\n * Remove what clean-git-ref fails to:\n * - leading dot/leading dot after slash\n * - trailing dot\n * - whitespace\n * - special characters\n * - leading or trailing dashes\n * - chained dashes(breaks markdown comments) are replaced by single dash\n */\nfunction cleanBranchName(\n branchName: string,\n branchPrefix: string,\n branchNameStrict?: boolean,\n): string {\n let cleanedBranchName = branchName;\n\n let existingBranchPrefix = '';\n if (branchNameStrict) {\n if (cleanedBranchName.startsWith(branchPrefix)) {\n existingBranchPrefix = branchPrefix;\n cleanedBranchName = cleanedBranchName.slice(branchPrefix.length);\n }\n cleanedBranchName =\n existingBranchPrefix +\n cleanedBranchName.replace(RE_SPECIAL_CHARS_STRICT, '-'); // massage out all special characters that slip through slugify\n }\n\n return cleanGitRef\n .clean(cleanedBranchName)\n .replace(regEx(/^\\.|\\.$/), '') // leading or trailing dot\n .replace(regEx(/\\/\\./g), '/') // leading dot after slash\n .replace(regEx(/\\s/g), '') // whitespace\n .replace(regEx(/[[\\]?:\\\\^~]/g), '-') // massage out all these characters: [ ] ? : \\ ^ ~\n .replace(regEx(/(^|\\/)-+/g), '$1') // leading dashes\n .replace(regEx(/-+(\\/|$)/g), '$1') // trailing dashes\n .replace(RE_MULTIPLE_DASH, '-'); // chained dashes\n}\n\nexport function generateBranchName(update: BranchUpgradeConfig): void {\n // Check whether to use a group name\n const newMajor = String(update.newMajor);\n const newMinor = String(update.newMinor);\n if (!update.groupName && update.sharedVariableName) {\n logger.debug(\n `Using sharedVariableName=${update.sharedVariableName} as groupName for depName=${update.depName}`,\n );\n update.groupName = update.sharedVariableName;\n }\n\n if (update.groupName) {\n if (update.updateType === 'replacement') {\n logger.debug(\n { depName: update.depName },\n `Ignoring grouped branch name for ${update.updateType} update`,\n );\n } else {\n update.groupName = template.compile(update.groupName, update);\n logger.trace('Using group branchName template');\n // TODO: types (#22198)\n logger.trace(\n `Dependency ${update.depName!} is part of group ${update.groupName}`,\n );\n if (update.groupSlug) {\n update.groupSlug = template.compile(update.groupSlug, update);\n } else {\n update.groupSlug = update.groupName;\n }\n update.groupSlug = slugify(update.groupSlug, {\n lower: true,\n });\n if (update.updateType === 'major' && update.separateMajorMinor) {\n if (update.separateMultipleMajor) {\n update.groupSlug = `major-${newMajor}-${update.groupSlug}`;\n } else {\n update.groupSlug = `major-${update.groupSlug}`;\n }\n }\n if (update.updateType === 'minor' && update.separateMultipleMinor) {\n update.groupSlug = `minor-${newMajor}.${newMinor}-${update.groupSlug}`;\n }\n if (update.updateType === 'patch' && update.separateMinorPatch) {\n update.groupSlug = `patch-${update.groupSlug}`;\n }\n if (update.updateType === 'lockFileMaintenance') {\n update.groupSlug = `lock-file-maintenance-${update.groupSlug}`;\n }\n update.branchTopic = update.group!.branchTopic ?? update.branchTopic;\n update.branchName = update.group!.branchName ?? update.branchName;\n }\n }\n\n if (update.hashedBranchLength) {\n let hashLength = update.hashedBranchLength - update.branchPrefix!.length;\n if (hashLength < MIN_HASH_LENGTH) {\n logger.warn(\n `\\`hashedBranchLength\\` must allow for at least ${MIN_HASH_LENGTH} characters hashing in addition to \\`branchPrefix\\`. Using ${MIN_HASH_LENGTH} character hash instead.`,\n );\n hashLength = MIN_HASH_LENGTH;\n }\n\n const additionalBranchPrefix = template.compile(\n String(update.additionalBranchPrefix ?? ''),\n update,\n );\n\n const branchTopic = template.compile(\n String(update.branchTopic ?? ''),\n update,\n );\n\n let hashInput = additionalBranchPrefix + branchTopic;\n\n // Compile extra times in case of nested templates\n hashInput = template.compile(hashInput, update);\n hashInput = template.compile(hashInput, update);\n\n const hashedInput = hash(hashInput);\n\n // TODO: types (#22198)\n update.branchName = `${update.branchPrefix!}${hashedInput.slice(\n 0,\n hashLength,\n )}`;\n } else {\n update.branchName = template.compile(update.branchName, update);\n\n // Compile extra times in case of nested templates\n update.branchName = template.compile(update.branchName, update);\n update.branchName = template.compile(update.branchName, update);\n }\n update.branchName = cleanBranchName(\n update.branchName,\n update.branchPrefix!,\n update.branchNameStrict,\n );\n}\n"],"mappings":";;;;;;;;AASA,MAAM,UAAU;AAEhB,MAAM,kBAAkB;AAExB,MAAM,mBAAmB,MAAM,OAAO;AAEtC,MAAM,0BAA0B,MAAM,uCAAuC;;;;;;;;;;;;AAa7E,SAAS,gBACP,YACA,cACA,kBACQ;CACR,IAAI,oBAAoB;CAExB,IAAI,uBAAuB;AAC3B,KAAI,kBAAkB;AACpB,MAAI,kBAAkB,WAAW,aAAa,EAAE;AAC9C,0BAAuB;AACvB,uBAAoB,kBAAkB,MAAM,aAAa,OAAO;;AAElE,sBACE,uBACA,kBAAkB,QAAQ,yBAAyB,IAAI;;AAG3D,QAAO,YACJ,MAAM,kBAAkB,CACxB,QAAQ,MAAM,UAAU,EAAE,GAAG,CAC7B,QAAQ,MAAM,QAAQ,EAAE,IAAI,CAC5B,QAAQ,MAAM,MAAM,EAAE,GAAG,CACzB,QAAQ,MAAM,eAAe,EAAE,IAAI,CACnC,QAAQ,MAAM,YAAY,EAAE,KAAK,CACjC,QAAQ,MAAM,YAAY,EAAE,KAAK,CACjC,QAAQ,kBAAkB,IAAI;;AAGnC,SAAgB,mBAAmB,QAAmC;CAEpE,MAAM,WAAW,OAAO,OAAO,SAAS;CACxC,MAAM,WAAW,OAAO,OAAO,SAAS;AACxC,KAAI,CAAC,OAAO,aAAa,OAAO,oBAAoB;AAClD,SAAO,MACL,4BAA4B,OAAO,mBAAmB,4BAA4B,OAAO,UAC1F;AACD,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UAAU;AAGnC,SAAO,aAAa,GAAG,OAAO,eAAgB,YAAY,MACxD,GACA,WACD;QACI;AACL,SAAO,aAAaA,QAAiB,OAAO,YAAY,OAAO;AAG/D,SAAO,aAAaA,QAAiB,OAAO,YAAY,OAAO;AAC/D,SAAO,aAAaA,QAAiB,OAAO,YAAY,OAAO;;AAEjE,QAAO,aAAa,gBAClB,OAAO,YACP,OAAO,cACP,OAAO,iBACR"}
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": "43.20.0",
4
+ "version": "43.20.1",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "renovate": "dist/renovate.js",
@@ -1,7 +1,7 @@
1
1
  {
2
- "title": "JSON schema for Renovate 43.20.0 config files (https://renovatebot.com/)",
2
+ "title": "JSON schema for Renovate 43.20.1 config files (https://renovatebot.com/)",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
- "x-renovate-version": "43.20.0",
4
+ "x-renovate-version": "43.20.1",
5
5
  "allowComments": true,
6
6
  "type": "object",
7
7
  "properties": {