chore: export poetry helper functions

This commit is contained in:
Rhys Arkins 2023-04-07 07:42:37 +02:00
parent 58cc0fefb7
commit 464adf118e
No known key found for this signature in database
GPG key ID: 4B50341A77CC799B

View file

@ -24,7 +24,7 @@ import type {
} from '../types';
import type { PoetryFile, PoetryLock, PoetrySource } from './types';
function getPythonConstraint(
export function getPythonConstraint(
existingLockFileContent: string,
config: UpdateArtifactsConfig
): string | undefined | null {
@ -48,7 +48,7 @@ function getPythonConstraint(
const pkgValRegex = regEx(`^${dependencyPattern}$`);
function getPoetryRequirement(pyProjectContent: string): string | null {
export function getPoetryRequirement(pyProjectContent: string): string | null {
try {
const pyproject: PoetryFile = parse(pyProjectContent);
// https://python-poetry.org/docs/pyproject/#poetry-and-pep-517