renovate 44.164.4 → 44.164.6

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.
@@ -217,6 +217,7 @@ async function executePostUpgradeCommands(config) {
217
217
  manager: config.manager,
218
218
  depName: config.upgrades.map(({ depName }) => depName).join(" "),
219
219
  branchName: config.branchName,
220
+ constraints: config.constraints,
220
221
  postUpgradeTasks: config.postUpgradeTasks.executionMode === "branch" ? config.postUpgradeTasks : void 0
221
222
  }];
222
223
  const { updatedArtifacts, artifactErrors } = await postUpgradeCommandsExecutor(config.upgrades.filter(({ postUpgradeTasks }) => !postUpgradeTasks?.executionMode || postUpgradeTasks.executionMode === "update"), config);
@@ -1 +1 @@
1
- {"version":3,"file":"execute-post-upgrade-commands.js","names":[],"sources":["../../../../../lib/workers/repository/update/branch/execute-post-upgrade-commands.ts"],"sourcesContent":["// TODO #22198\n\nimport crypto from 'node:crypto';\nimport { isArray, isNonEmptyArray, isString } from '@sindresorhus/is';\nimport upath from 'upath';\nimport { GlobalConfig } from '../../../../config/global.ts';\nimport { mergeChildConfig } from '../../../../config/index.ts';\nimport { addMeta, logger } from '../../../../logger/index.ts';\nimport type { ArtifactError } from '../../../../modules/manager/types.ts';\nimport { coerceArray } from '../../../../util/array.ts';\nimport {\n type ExecOptions,\n isConstraintName,\n isToolName,\n} from '../../../../util/exec/types.ts';\nimport {\n ensureLocalDir,\n localPathIsFile,\n outputCacheFile,\n privateCacheDir,\n readLocalFile,\n statLocalFile,\n writeLocalFile,\n} from '../../../../util/fs/index.ts';\nimport { withGitEnvironment } from '../../../../util/git/exec.ts';\nimport {\n getRepoStatus,\n isFileModeEnabled,\n} from '../../../../util/git/index.ts';\nimport type { FileChange } from '../../../../util/git/types.ts';\nimport { minimatch } from '../../../../util/minimatch.ts';\nimport { regEx } from '../../../../util/regex.ts';\nimport { sanitize } from '../../../../util/sanitize.ts';\nimport { compile } from '../../../../util/template/index.ts';\nimport type { BranchConfig, BranchUpgradeConfig } from '../../../types.ts';\n\nexport interface PostUpgradeCommandsExecutionResult {\n updatedArtifacts: FileChange[];\n artifactErrors: ArtifactError[];\n}\n\nconst ownerExecutePermission = 0o100;\nconst gitExec = withGitEnvironment();\n\nasync function detectExecutable(\n relativePath: string,\n canReadFileMode: boolean,\n): Promise<true | undefined> {\n if (!canReadFileMode) {\n return undefined;\n }\n\n const fileStats = await statLocalFile(relativePath);\n if (!fileStats?.isFile()) {\n return undefined;\n }\n\n if ((fileStats.mode & ownerExecutePermission) === 0) {\n return undefined;\n }\n\n // Git derives its executable flag from the owner's execute permission.\n return true;\n}\n\nexport async function postUpgradeCommandsExecutor(\n filteredUpgradeCommands: BranchUpgradeConfig[],\n config: BranchConfig,\n): Promise<PostUpgradeCommandsExecutionResult> {\n let updatedArtifacts = [...coerceArray(config.updatedArtifacts)];\n const artifactErrors = [...coerceArray(config.artifactErrors)];\n const allowedCommands = GlobalConfig.get('allowedCommands');\n\n for (const upgrade of filteredUpgradeCommands) {\n addMeta({ dep: upgrade.depName });\n logger.trace(\n {\n tasks: upgrade.postUpgradeTasks,\n allowedCommands,\n },\n `Checking for post-upgrade tasks`,\n );\n const commands = upgrade.postUpgradeTasks?.commands;\n const dataFileTemplate = upgrade.postUpgradeTasks?.dataFileTemplate;\n const fileFilters = upgrade.postUpgradeTasks?.fileFilters ?? ['**/*'];\n if (isNonEmptyArray(commands)) {\n // Persist updated files in file system so any executed commands can see them\n const previouslyModifiedFiles =\n config.updatedPackageFiles!.concat(updatedArtifacts);\n for (const file of previouslyModifiedFiles) {\n const canWriteFile = await localPathIsFile(file.path);\n if (file.type === 'addition' && !file.isSymlink && canWriteFile) {\n let contents: Buffer | null;\n if (isString(file.contents)) {\n contents = Buffer.from(file.contents);\n } else {\n contents = file.contents;\n }\n // TODO #22198\n await writeLocalFile(file.path, contents!);\n }\n }\n\n let dataFilePath: string | null = null;\n if (dataFileTemplate) {\n const dataFileContent = sanitize(\n compile(dataFileTemplate, mergeChildConfig(config, upgrade)),\n );\n logger.debug(\n { dataFileTemplate },\n 'Processed post-upgrade commands data file template.',\n );\n\n const dataFileName = `post-upgrade-data-file-${crypto.randomBytes(8).toString('hex')}.tmp`;\n dataFilePath = upath.join(privateCacheDir(), dataFileName);\n\n try {\n await outputCacheFile(dataFilePath, dataFileContent);\n\n logger.debug(\n { dataFilePath, dataFileContent },\n 'Created post-upgrade commands data file.',\n );\n } catch (error) {\n artifactErrors.push({\n stderr: sanitize(\n `Failed to create post-upgrade commands data file at ${dataFilePath}, reason: ${error.message}`,\n ),\n });\n\n dataFilePath = null;\n }\n }\n\n const workingDirTemplate = upgrade.postUpgradeTasks?.workingDirTemplate;\n let workingDir = GlobalConfig.get('localDir');\n\n if (workingDirTemplate) {\n workingDir = sanitize(\n compile(workingDirTemplate, mergeChildConfig(config, upgrade)),\n );\n workingDir = await ensureLocalDir(workingDir);\n logger.trace(\n { workingDirTemplate },\n 'Processed post-upgrade commands working directory template.',\n );\n }\n\n for (const cmd of commands) {\n const compiledCmd = compile(cmd, mergeChildConfig(config, upgrade));\n if (compiledCmd !== cmd) {\n logger.debug(\n { rawCmd: cmd, compiledCmd },\n 'Post-upgrade command has been compiled',\n );\n }\n if (compiledCmd === '') {\n logger.trace({ rawCmd: cmd }, 'Skipping empty post-upgrade task');\n continue;\n }\n if (\n allowedCommands.some((pattern) => regEx(pattern).test(compiledCmd))\n ) {\n try {\n logger.trace({ cmd: compiledCmd }, 'Executing post-upgrade task');\n\n const execOpts: ExecOptions = {\n // oxlint-disable-next-line renovate/no-exec-shell-option -- some self-hosted adminstrators allow their users to use shell features (pipes, globbing, sub-shells), so this is allowed for that purpose when it's opted in via allowShellExecutorForPostUpgradeCommands\n shell: GlobalConfig.get(\n 'allowShellExecutorForPostUpgradeCommands',\n ),\n\n cwd: workingDir,\n };\n if (dataFilePath) {\n execOpts.env = {\n RENOVATE_POST_UPGRADE_COMMAND_DATA_FILE: dataFilePath,\n };\n }\n if (upgrade.postUpgradeTasks?.installTools) {\n execOpts.toolConstraints ??= [];\n\n for (const [tool] of Object.entries(\n upgrade.postUpgradeTasks?.installTools,\n )) {\n const validTool = isToolName(tool);\n const validConstraint = isConstraintName(tool);\n if (!validTool) {\n logger.warn(\n {\n tool,\n validTool,\n validConstraint,\n },\n 'Skipping constraint that is not a tool that Containerbase knows',\n );\n continue;\n }\n\n execOpts.toolConstraints.push({\n toolName: tool,\n constraint: upgrade.constraints?.[tool],\n });\n }\n }\n const execResult = await gitExec(compiledCmd, execOpts);\n\n logger.debug(\n { cmd: compiledCmd, ...execResult },\n 'Executed post-upgrade task',\n );\n } catch (error) {\n artifactErrors.push({\n fileName: upgrade.packageFile,\n stderr: sanitize(error.message),\n });\n }\n } else {\n logger.warn(\n {\n cmd: compiledCmd,\n allowedCommands,\n },\n 'Post-upgrade task did not match any on allowedCommands list',\n );\n artifactErrors.push({\n fileName: upgrade.packageFile,\n stderr: sanitize(\n `Post-upgrade command '${compiledCmd}' has not been added to the allowed list in allowedCommands`,\n ),\n });\n }\n }\n\n const status = await getRepoStatus();\n\n logger.trace({ status }, 'git status after post-upgrade tasks');\n\n logger.debug(\n {\n addedCount: status.not_added?.length,\n modifiedCount: status.modified?.length,\n deletedCount: status.deleted?.length,\n renamedCount: status.renamed?.length,\n },\n 'git status counts after post-upgrade tasks',\n );\n\n const addedOrModifiedFiles = [\n ...coerceArray(status.not_added),\n ...coerceArray(status.modified),\n ...coerceArray(status.renamed?.map((x) => x.to)),\n ];\n const changedFiles = [\n ...addedOrModifiedFiles,\n ...coerceArray(status.deleted),\n ...coerceArray(status.renamed?.map((x) => x.from)),\n ];\n\n // Check for files which were previously deleted but have been re-added without modification\n const previouslyDeletedFiles = updatedArtifacts.filter(\n (ua) => ua.type === 'deletion',\n );\n for (const previouslyDeletedFile of previouslyDeletedFiles) {\n /* v8 ignore if -- TODO: needs test */\n if (!changedFiles.includes(previouslyDeletedFile.path)) {\n logger.debug(\n { file: previouslyDeletedFile.path },\n 'Previously deleted file has been restored without modification',\n );\n updatedArtifacts = updatedArtifacts.filter(\n (ua) =>\n !(\n ua.type === 'deletion' && ua.path === previouslyDeletedFile.path\n ),\n );\n }\n }\n\n logger.trace({ addedOrModifiedFiles }, 'Added or modified files');\n logger.debug(\n `Checking ${addedOrModifiedFiles.length} added or modified files for post-upgrade changes`,\n );\n\n const fileExcludes: string[] = [];\n if (config.npmrc) {\n fileExcludes.push('.npmrc');\n }\n const canReadFileMode = await isFileModeEnabled();\n\n for (const relativePath of addedOrModifiedFiles) {\n if (\n fileExcludes.some((pattern) =>\n minimatch(pattern, { dot: true }).match(relativePath),\n )\n ) {\n continue;\n }\n\n let fileMatched = false;\n for (const pattern of fileFilters) {\n if (minimatch(pattern, { dot: true }).match(relativePath)) {\n fileMatched = true;\n logger.debug(\n { file: relativePath, pattern },\n 'Post-upgrade file saved',\n );\n const existingContent = await readLocalFile(relativePath);\n const isExecutable = await detectExecutable(\n relativePath,\n canReadFileMode,\n );\n const existingUpdatedArtifacts = updatedArtifacts.find(\n (ua) => ua.path === relativePath,\n );\n if (existingUpdatedArtifacts?.type === 'addition') {\n existingUpdatedArtifacts.contents = existingContent;\n if (isExecutable !== undefined) {\n existingUpdatedArtifacts.isExecutable = isExecutable;\n }\n } else {\n const updatedArtifact: FileChange = {\n type: 'addition',\n path: relativePath,\n contents: existingContent,\n };\n if (isExecutable !== undefined) {\n updatedArtifact.isExecutable = isExecutable;\n }\n updatedArtifacts.push(updatedArtifact);\n }\n // If the file is deleted by a previous post-update command, remove the deletion from updatedArtifacts\n updatedArtifacts = updatedArtifacts.filter(\n (ua) => !(ua.type === 'deletion' && ua.path === relativePath),\n );\n }\n }\n if (!fileMatched) {\n logger.debug(\n { file: relativePath },\n 'Post-upgrade file did not match any file filters',\n );\n }\n }\n\n for (const relativePath of coerceArray(status.deleted)) {\n for (const pattern of fileFilters) {\n if (minimatch(pattern, { dot: true }).match(relativePath)) {\n if (\n !updatedArtifacts.some(\n (ua) => ua.path === relativePath && ua.type === 'deletion',\n )\n ) {\n logger.debug(\n { file: relativePath, pattern },\n 'Post-upgrade file removed',\n );\n updatedArtifacts.push({\n type: 'deletion',\n path: relativePath,\n });\n }\n // If the file is created or modified by a previous post-update command, remove the modification from updatedArtifacts\n updatedArtifacts = updatedArtifacts.filter(\n (ua) => !(ua.type === 'addition' && ua.path === relativePath),\n );\n }\n }\n }\n }\n }\n return { updatedArtifacts, artifactErrors };\n}\n\nexport default async function executePostUpgradeCommands(\n config: BranchConfig,\n): Promise<PostUpgradeCommandsExecutionResult | null> {\n const hasChangedFiles =\n (isArray(config.updatedPackageFiles) &&\n config.updatedPackageFiles.length > 0) ||\n (isArray(config.updatedArtifacts) && config.updatedArtifacts.length > 0);\n\n if (!hasChangedFiles) {\n /* Only run post-upgrade tasks if there are changes to package files... */\n logger.debug('No changes to package files, skipping post-upgrade tasks');\n return null;\n }\n\n const branchUpgradeCommands: BranchUpgradeConfig[] = [\n {\n manager: config.manager,\n depName: config.upgrades.map(({ depName }) => depName).join(' '),\n branchName: config.branchName,\n postUpgradeTasks:\n config.postUpgradeTasks!.executionMode === 'branch'\n ? config.postUpgradeTasks\n : undefined,\n },\n ];\n\n const updateUpgradeCommands: BranchUpgradeConfig[] = config.upgrades.filter(\n ({ postUpgradeTasks }) =>\n !postUpgradeTasks?.executionMode ||\n postUpgradeTasks.executionMode === 'update',\n );\n\n const { updatedArtifacts, artifactErrors } =\n await postUpgradeCommandsExecutor(updateUpgradeCommands, config);\n return postUpgradeCommandsExecutor(branchUpgradeCommands, {\n ...config,\n updatedArtifacts,\n artifactErrors,\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAyCA,MAAM,yBAAyB;AAC/B,MAAM,UAAU,mBAAmB;AAEnC,eAAe,iBACb,cACA,iBAC2B;CAC3B,IAAI,CAAC,iBACH;CAGF,MAAM,YAAY,MAAM,cAAc,YAAY;CAClD,IAAI,CAAC,WAAW,OAAO,GACrB;CAGF,KAAK,UAAU,OAAO,4BAA4B,GAChD;CAIF,OAAO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AAC;IACH;IAEA,mBAAmB,iBAAiB,QACjC,OAAO,EAAE,GAAG,SAAS,cAAc,GAAG,SAAS,aAClD;GACF;EAGN;CACF;CACA,OAAO;EAAE;EAAkB;CAAe;AAC5C;AAEA,eAA8B,2BAC5B,QACoD;CAMpD,IAAI,EAJD,QAAQ,OAAO,mBAAmB,KACjC,OAAO,oBAAoB,SAAS,KACrC,QAAQ,OAAO,gBAAgB,KAAK,OAAO,iBAAiB,SAAS,IAElD;EAEpB,OAAO,MAAM,0DAA0D;EACvE,OAAO;CACT;CAEA,MAAM,wBAA+C,CACnD;EACE,SAAS,OAAO;EAChB,SAAS,OAAO,SAAS,KAAK,EAAE,cAAc,OAAO,CAAC,CAAC,KAAK,GAAG;EAC/D,YAAY,OAAO;EACnB,kBACE,OAAO,iBAAkB,kBAAkB,WACvC,OAAO,mBACP,KAAA;CACR,CACF;CAQA,MAAM,EAAE,kBAAkB,mBACxB,MAAM,4BAP6C,OAAO,SAAS,QAClE,EAAE,uBACD,CAAC,kBAAkB,iBACnB,iBAAiB,kBAAkB,QAIiB,GAAG,MAAM;CACjE,OAAO,4BAA4B,uBAAuB;EACxD,GAAG;EACH;EACA;CACF,CAAC;AACH"}
1
+ {"version":3,"file":"execute-post-upgrade-commands.js","names":[],"sources":["../../../../../lib/workers/repository/update/branch/execute-post-upgrade-commands.ts"],"sourcesContent":["// TODO #22198\n\nimport crypto from 'node:crypto';\nimport { isArray, isNonEmptyArray, isString } from '@sindresorhus/is';\nimport upath from 'upath';\nimport { GlobalConfig } from '../../../../config/global.ts';\nimport { mergeChildConfig } from '../../../../config/index.ts';\nimport { addMeta, logger } from '../../../../logger/index.ts';\nimport type { ArtifactError } from '../../../../modules/manager/types.ts';\nimport { coerceArray } from '../../../../util/array.ts';\nimport {\n type ExecOptions,\n isConstraintName,\n isToolName,\n} from '../../../../util/exec/types.ts';\nimport {\n ensureLocalDir,\n localPathIsFile,\n outputCacheFile,\n privateCacheDir,\n readLocalFile,\n statLocalFile,\n writeLocalFile,\n} from '../../../../util/fs/index.ts';\nimport { withGitEnvironment } from '../../../../util/git/exec.ts';\nimport {\n getRepoStatus,\n isFileModeEnabled,\n} from '../../../../util/git/index.ts';\nimport type { FileChange } from '../../../../util/git/types.ts';\nimport { minimatch } from '../../../../util/minimatch.ts';\nimport { regEx } from '../../../../util/regex.ts';\nimport { sanitize } from '../../../../util/sanitize.ts';\nimport { compile } from '../../../../util/template/index.ts';\nimport type { BranchConfig, BranchUpgradeConfig } from '../../../types.ts';\n\nexport interface PostUpgradeCommandsExecutionResult {\n updatedArtifacts: FileChange[];\n artifactErrors: ArtifactError[];\n}\n\nconst ownerExecutePermission = 0o100;\nconst gitExec = withGitEnvironment();\n\nasync function detectExecutable(\n relativePath: string,\n canReadFileMode: boolean,\n): Promise<true | undefined> {\n if (!canReadFileMode) {\n return undefined;\n }\n\n const fileStats = await statLocalFile(relativePath);\n if (!fileStats?.isFile()) {\n return undefined;\n }\n\n if ((fileStats.mode & ownerExecutePermission) === 0) {\n return undefined;\n }\n\n // Git derives its executable flag from the owner's execute permission.\n return true;\n}\n\nexport async function postUpgradeCommandsExecutor(\n filteredUpgradeCommands: BranchUpgradeConfig[],\n config: BranchConfig,\n): Promise<PostUpgradeCommandsExecutionResult> {\n let updatedArtifacts = [...coerceArray(config.updatedArtifacts)];\n const artifactErrors = [...coerceArray(config.artifactErrors)];\n const allowedCommands = GlobalConfig.get('allowedCommands');\n\n for (const upgrade of filteredUpgradeCommands) {\n addMeta({ dep: upgrade.depName });\n logger.trace(\n {\n tasks: upgrade.postUpgradeTasks,\n allowedCommands,\n },\n `Checking for post-upgrade tasks`,\n );\n const commands = upgrade.postUpgradeTasks?.commands;\n const dataFileTemplate = upgrade.postUpgradeTasks?.dataFileTemplate;\n const fileFilters = upgrade.postUpgradeTasks?.fileFilters ?? ['**/*'];\n if (isNonEmptyArray(commands)) {\n // Persist updated files in file system so any executed commands can see them\n const previouslyModifiedFiles =\n config.updatedPackageFiles!.concat(updatedArtifacts);\n for (const file of previouslyModifiedFiles) {\n const canWriteFile = await localPathIsFile(file.path);\n if (file.type === 'addition' && !file.isSymlink && canWriteFile) {\n let contents: Buffer | null;\n if (isString(file.contents)) {\n contents = Buffer.from(file.contents);\n } else {\n contents = file.contents;\n }\n // TODO #22198\n await writeLocalFile(file.path, contents!);\n }\n }\n\n let dataFilePath: string | null = null;\n if (dataFileTemplate) {\n const dataFileContent = sanitize(\n compile(dataFileTemplate, mergeChildConfig(config, upgrade)),\n );\n logger.debug(\n { dataFileTemplate },\n 'Processed post-upgrade commands data file template.',\n );\n\n const dataFileName = `post-upgrade-data-file-${crypto.randomBytes(8).toString('hex')}.tmp`;\n dataFilePath = upath.join(privateCacheDir(), dataFileName);\n\n try {\n await outputCacheFile(dataFilePath, dataFileContent);\n\n logger.debug(\n { dataFilePath, dataFileContent },\n 'Created post-upgrade commands data file.',\n );\n } catch (error) {\n artifactErrors.push({\n stderr: sanitize(\n `Failed to create post-upgrade commands data file at ${dataFilePath}, reason: ${error.message}`,\n ),\n });\n\n dataFilePath = null;\n }\n }\n\n const workingDirTemplate = upgrade.postUpgradeTasks?.workingDirTemplate;\n let workingDir = GlobalConfig.get('localDir');\n\n if (workingDirTemplate) {\n workingDir = sanitize(\n compile(workingDirTemplate, mergeChildConfig(config, upgrade)),\n );\n workingDir = await ensureLocalDir(workingDir);\n logger.trace(\n { workingDirTemplate },\n 'Processed post-upgrade commands working directory template.',\n );\n }\n\n for (const cmd of commands) {\n const compiledCmd = compile(cmd, mergeChildConfig(config, upgrade));\n if (compiledCmd !== cmd) {\n logger.debug(\n { rawCmd: cmd, compiledCmd },\n 'Post-upgrade command has been compiled',\n );\n }\n if (compiledCmd === '') {\n logger.trace({ rawCmd: cmd }, 'Skipping empty post-upgrade task');\n continue;\n }\n if (\n allowedCommands.some((pattern) => regEx(pattern).test(compiledCmd))\n ) {\n try {\n logger.trace({ cmd: compiledCmd }, 'Executing post-upgrade task');\n\n const execOpts: ExecOptions = {\n // oxlint-disable-next-line renovate/no-exec-shell-option -- some self-hosted adminstrators allow their users to use shell features (pipes, globbing, sub-shells), so this is allowed for that purpose when it's opted in via allowShellExecutorForPostUpgradeCommands\n shell: GlobalConfig.get(\n 'allowShellExecutorForPostUpgradeCommands',\n ),\n\n cwd: workingDir,\n };\n if (dataFilePath) {\n execOpts.env = {\n RENOVATE_POST_UPGRADE_COMMAND_DATA_FILE: dataFilePath,\n };\n }\n if (upgrade.postUpgradeTasks?.installTools) {\n execOpts.toolConstraints ??= [];\n\n for (const [tool] of Object.entries(\n upgrade.postUpgradeTasks?.installTools,\n )) {\n const validTool = isToolName(tool);\n const validConstraint = isConstraintName(tool);\n if (!validTool) {\n logger.warn(\n {\n tool,\n validTool,\n validConstraint,\n },\n 'Skipping constraint that is not a tool that Containerbase knows',\n );\n continue;\n }\n\n execOpts.toolConstraints.push({\n toolName: tool,\n constraint: upgrade.constraints?.[tool],\n });\n }\n }\n const execResult = await gitExec(compiledCmd, execOpts);\n\n logger.debug(\n { cmd: compiledCmd, ...execResult },\n 'Executed post-upgrade task',\n );\n } catch (error) {\n artifactErrors.push({\n fileName: upgrade.packageFile,\n stderr: sanitize(error.message),\n });\n }\n } else {\n logger.warn(\n {\n cmd: compiledCmd,\n allowedCommands,\n },\n 'Post-upgrade task did not match any on allowedCommands list',\n );\n artifactErrors.push({\n fileName: upgrade.packageFile,\n stderr: sanitize(\n `Post-upgrade command '${compiledCmd}' has not been added to the allowed list in allowedCommands`,\n ),\n });\n }\n }\n\n const status = await getRepoStatus();\n\n logger.trace({ status }, 'git status after post-upgrade tasks');\n\n logger.debug(\n {\n addedCount: status.not_added?.length,\n modifiedCount: status.modified?.length,\n deletedCount: status.deleted?.length,\n renamedCount: status.renamed?.length,\n },\n 'git status counts after post-upgrade tasks',\n );\n\n const addedOrModifiedFiles = [\n ...coerceArray(status.not_added),\n ...coerceArray(status.modified),\n ...coerceArray(status.renamed?.map((x) => x.to)),\n ];\n const changedFiles = [\n ...addedOrModifiedFiles,\n ...coerceArray(status.deleted),\n ...coerceArray(status.renamed?.map((x) => x.from)),\n ];\n\n // Check for files which were previously deleted but have been re-added without modification\n const previouslyDeletedFiles = updatedArtifacts.filter(\n (ua) => ua.type === 'deletion',\n );\n for (const previouslyDeletedFile of previouslyDeletedFiles) {\n /* v8 ignore if -- TODO: needs test */\n if (!changedFiles.includes(previouslyDeletedFile.path)) {\n logger.debug(\n { file: previouslyDeletedFile.path },\n 'Previously deleted file has been restored without modification',\n );\n updatedArtifacts = updatedArtifacts.filter(\n (ua) =>\n !(\n ua.type === 'deletion' && ua.path === previouslyDeletedFile.path\n ),\n );\n }\n }\n\n logger.trace({ addedOrModifiedFiles }, 'Added or modified files');\n logger.debug(\n `Checking ${addedOrModifiedFiles.length} added or modified files for post-upgrade changes`,\n );\n\n const fileExcludes: string[] = [];\n if (config.npmrc) {\n fileExcludes.push('.npmrc');\n }\n const canReadFileMode = await isFileModeEnabled();\n\n for (const relativePath of addedOrModifiedFiles) {\n if (\n fileExcludes.some((pattern) =>\n minimatch(pattern, { dot: true }).match(relativePath),\n )\n ) {\n continue;\n }\n\n let fileMatched = false;\n for (const pattern of fileFilters) {\n if (minimatch(pattern, { dot: true }).match(relativePath)) {\n fileMatched = true;\n logger.debug(\n { file: relativePath, pattern },\n 'Post-upgrade file saved',\n );\n const existingContent = await readLocalFile(relativePath);\n const isExecutable = await detectExecutable(\n relativePath,\n canReadFileMode,\n );\n const existingUpdatedArtifacts = updatedArtifacts.find(\n (ua) => ua.path === relativePath,\n );\n if (existingUpdatedArtifacts?.type === 'addition') {\n existingUpdatedArtifacts.contents = existingContent;\n if (isExecutable !== undefined) {\n existingUpdatedArtifacts.isExecutable = isExecutable;\n }\n } else {\n const updatedArtifact: FileChange = {\n type: 'addition',\n path: relativePath,\n contents: existingContent,\n };\n if (isExecutable !== undefined) {\n updatedArtifact.isExecutable = isExecutable;\n }\n updatedArtifacts.push(updatedArtifact);\n }\n // If the file is deleted by a previous post-update command, remove the deletion from updatedArtifacts\n updatedArtifacts = updatedArtifacts.filter(\n (ua) => !(ua.type === 'deletion' && ua.path === relativePath),\n );\n }\n }\n if (!fileMatched) {\n logger.debug(\n { file: relativePath },\n 'Post-upgrade file did not match any file filters',\n );\n }\n }\n\n for (const relativePath of coerceArray(status.deleted)) {\n for (const pattern of fileFilters) {\n if (minimatch(pattern, { dot: true }).match(relativePath)) {\n if (\n !updatedArtifacts.some(\n (ua) => ua.path === relativePath && ua.type === 'deletion',\n )\n ) {\n logger.debug(\n { file: relativePath, pattern },\n 'Post-upgrade file removed',\n );\n updatedArtifacts.push({\n type: 'deletion',\n path: relativePath,\n });\n }\n // If the file is created or modified by a previous post-update command, remove the modification from updatedArtifacts\n updatedArtifacts = updatedArtifacts.filter(\n (ua) => !(ua.type === 'addition' && ua.path === relativePath),\n );\n }\n }\n }\n }\n }\n return { updatedArtifacts, artifactErrors };\n}\n\nexport default async function executePostUpgradeCommands(\n config: BranchConfig,\n): Promise<PostUpgradeCommandsExecutionResult | null> {\n const hasChangedFiles =\n (isArray(config.updatedPackageFiles) &&\n config.updatedPackageFiles.length > 0) ||\n (isArray(config.updatedArtifacts) && config.updatedArtifacts.length > 0);\n\n if (!hasChangedFiles) {\n /* Only run post-upgrade tasks if there are changes to package files... */\n logger.debug('No changes to package files, skipping post-upgrade tasks');\n return null;\n }\n\n const branchUpgradeCommands: BranchUpgradeConfig[] = [\n {\n manager: config.manager,\n depName: config.upgrades.map(({ depName }) => depName).join(' '),\n branchName: config.branchName,\n constraints: config.constraints,\n postUpgradeTasks:\n config.postUpgradeTasks!.executionMode === 'branch'\n ? config.postUpgradeTasks\n : undefined,\n },\n ];\n\n const updateUpgradeCommands: BranchUpgradeConfig[] = config.upgrades.filter(\n ({ postUpgradeTasks }) =>\n !postUpgradeTasks?.executionMode ||\n postUpgradeTasks.executionMode === 'update',\n );\n\n const { updatedArtifacts, artifactErrors } =\n await postUpgradeCommandsExecutor(updateUpgradeCommands, config);\n return postUpgradeCommandsExecutor(branch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gBAAgB,YAAY,OAAO,OAAO,GACnD,KAAK,MAAM,WAAW,aACpB,IAAI,UAAU,SAAS,EAAE,KAAK,KAAK,CAAC,CAAC,CAAC,MAAM,YAAY,GAAG;IACzD,IACE,CAAC,iBAAiB,MACf,OAAO,GAAG,SAAS,gBAAgB,GAAG,SAAS,UAClD,GACA;KACA,OAAO,MACL;MAAE,MAAM;MAAc;KAAQ,GAC9B,2BACF;KACA,iBAAiB,KAAK;MACpB,MAAM;MACN,MAAM;KACR,CAAC;IACH;IAEA,mBAAmB,iBAAiB,QACjC,OAAO,EAAE,GAAG,SAAS,cAAc,GAAG,SAAS,aAClD;GACF;EAGN;CACF;CACA,OAAO;EAAE;EAAkB;CAAe;AAC5C;AAEA,eAA8B,2BAC5B,QACoD;CAMpD,IAAI,EAJD,QAAQ,OAAO,mBAAmB,KACjC,OAAO,oBAAoB,SAAS,KACrC,QAAQ,OAAO,gBAAgB,KAAK,OAAO,iBAAiB,SAAS,IAElD;EAEpB,OAAO,MAAM,0DAA0D;EACvE,OAAO;CACT;CAEA,MAAM,wBAA+C,CACnD;EACE,SAAS,OAAO;EAChB,SAAS,OAAO,SAAS,KAAK,EAAE,cAAc,OAAO,CAAC,CAAC,KAAK,GAAG;EAC/D,YAAY,OAAO;EACnB,aAAa,OAAO;EACpB,kBACE,OAAO,iBAAkB,kBAAkB,WACvC,OAAO,mBACP,KAAA;CACR,CACF;CAQA,MAAM,EAAE,kBAAkB,mBACxB,MAAM,4BAP6C,OAAO,SAAS,QAClE,EAAE,uBACD,CAAC,kBAAkB,iBACnB,iBAAiB,kBAAkB,QAIiB,GAAG,MAAM;CACjE,OAAO,4BAA4B,uBAAuB;EACxD,GAAG;EACH;EACA;CACF,CAAC;AACH"}
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": "44.164.4",
4
+ "version": "44.164.6",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "renovate": "dist/renovate.js",
@@ -141,7 +141,7 @@
141
141
  "commander": "15.0.0",
142
142
  "common-tags": "1.8.2",
143
143
  "croner": "10.0.1",
144
- "cronstrue": "3.30.0",
144
+ "cronstrue": "3.31.0",
145
145
  "deepmerge": "4.3.1",
146
146
  "dequal": "2.0.3",
147
147
  "detect-indent": "7.0.2",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "$id": "https://docs.renovatebot.com/renovate-schema.json",
3
- "title": "JSON schema for Renovate 44.164.4 config files (https://renovatebot.com/)",
3
+ "title": "JSON schema for Renovate 44.164.6 config files (https://renovatebot.com/)",
4
4
  "$schema": "http://json-schema.org/draft-07/schema#",
5
- "x-renovate-version": "44.164.4",
5
+ "x-renovate-version": "44.164.6",
6
6
  "allowComments": true,
7
7
  "type": "object",
8
8
  "definitions": {