Skip to content

Commit

Permalink
fix: change release-version to resolve package manager from plugin op…
Browse files Browse the repository at this point in the history
…tions
  • Loading branch information
lucasvieirasilva committed Jan 22, 2025
1 parent c239313 commit ec0af4d
Showing 1 changed file with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import {
ExpandedPluginConfiguration,
NxJsonConfiguration,
ProjectGraphProjectNode,
Tree,
formatFiles,
joinPathFragments,
output,
readJson,
} from '@nx/devkit';
import chalk from 'chalk';
import { exec } from 'node:child_process';
Expand Down Expand Up @@ -39,13 +42,26 @@ import {
import { sortProjectsTopologically } from './utils/sort-projects-topologically';
import path, { dirname } from 'node:path';
import { getProvider } from '../../provider';
import { PluginOptions } from '../../types';

export async function releaseVersionGenerator(
tree: Tree,
options: ReleaseVersionGeneratorSchema,
): Promise<ReleaseVersionGeneratorResult> {
let logger: ProjectLogger | undefined;
const provider = await getProvider('.', undefined, tree);
const nxJson = readJson<NxJsonConfiguration>(tree, 'nx.json');
const pluginConfig = nxJson.plugins?.find(
(plugin): plugin is ExpandedPluginConfiguration =>
typeof plugin === 'object' && plugin.plugin === '@nxlv/python',
);

const provider = await getProvider(
'.',
undefined,
tree,
undefined,
pluginConfig?.options as PluginOptions,
);
const updatedProjects: string[] = [];

try {
Expand Down

0 comments on commit ec0af4d

Please sign in to comment.