fix(release): ensure generatorOptions and rootVersionActionsOptions are passed to updateLockfile function (#30796)

This commit is contained in:
Thomas Dekiere 2025-04-25 14:41:03 +02:00 committed by GitHub
parent cd55dfcb3e
commit 69ea6327d3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 2 deletions

View File

@ -1000,7 +1000,7 @@ To fix this you will either need to add a package.json file at that location, or
// Return the version data so that it can be leveraged by the overall version command // Return the version data so that it can be leveraged by the overall version command
return { return {
data: versionData, data: versionData,
callback: async (tree, opts) => { callback: async (tree, { generatorOptions, ...opts }) => {
const changedFiles: string[] = []; const changedFiles: string[] = [];
const deletedFiles: string[] = []; const deletedFiles: string[] = [];
@ -1013,6 +1013,7 @@ To fix this you will either need to add a package.json file at that location, or
...(await updateLockFile(cwd, { ...(await updateLockFile(cwd, {
...opts, ...opts,
useLegacyVersioning: true, useLegacyVersioning: true,
options: generatorOptions,
})) }))
); );
return { changedFiles, deletedFiles }; return { changedFiles, deletedFiles };

View File

@ -17,7 +17,10 @@ import chalk = require('chalk');
export const afterAllProjectsVersioned: AfterAllProjectsVersioned = async ( export const afterAllProjectsVersioned: AfterAllProjectsVersioned = async (
cwd: string, cwd: string,
opts: { {
rootVersionActionsOptions,
...opts
}: {
dryRun?: boolean; dryRun?: boolean;
verbose?: boolean; verbose?: boolean;
rootVersionActionsOptions?: Record<string, unknown>; rootVersionActionsOptions?: Record<string, unknown>;
@ -27,6 +30,7 @@ export const afterAllProjectsVersioned: AfterAllProjectsVersioned = async (
changedFiles: await updateLockFile(cwd, { changedFiles: await updateLockFile(cwd, {
...opts, ...opts,
useLegacyVersioning: false, useLegacyVersioning: false,
options: rootVersionActionsOptions,
}), }),
deletedFiles: [], deletedFiles: [],
}; };