mirror of
https://github.com/actions/setup-python
synced 2026-09-22 00:12:07 +00:00
Migrate to ESM and upgrade dependencies (#1330)
* Migrate to ESM and upgrade dependencies * Add ESM migration note to README for V7 * Remove unnecessary devDependencies: ts-node, @types/jest * npm audit fix * Upgrade @types/node to version 26.0.0 * Clarify ESM migration details in README for V7 * Update README and dependencies * Fix lint issue
This commit is contained in:
+3
-3
@@ -258,7 +258,7 @@ export function getVersionInputFromTomlFile(versionFile: string): string[] {
|
||||
pyprojectFile = pyprojectFile.replace(/\r\n/g, '\n');
|
||||
|
||||
const pyprojectConfig = toml.parse(pyprojectFile);
|
||||
let keys = [];
|
||||
let keys: string[] = [];
|
||||
|
||||
if ('project' in pyprojectConfig) {
|
||||
// standard project metadata (PEP 621)
|
||||
@@ -267,7 +267,7 @@ export function getVersionInputFromTomlFile(versionFile: string): string[] {
|
||||
// python poetry
|
||||
keys = ['tool', 'poetry', 'dependencies', 'python'];
|
||||
}
|
||||
const versions = [];
|
||||
const versions: string[] = [];
|
||||
const version = extractValue(pyprojectConfig, keys);
|
||||
if (version !== undefined) {
|
||||
versions.push(version);
|
||||
@@ -376,7 +376,7 @@ export function getVersionInputFromPipfileFile(versionFile: string): string[] {
|
||||
} else {
|
||||
keys.push('python_version');
|
||||
}
|
||||
const versions = [];
|
||||
const versions: string[] = [];
|
||||
const version = extractValue(pipfileConfig, keys);
|
||||
if (version !== undefined) {
|
||||
versions.push(version);
|
||||
|
||||
Reference in New Issue
Block a user