5
0
mirror of https://github.com/astral-sh/setup-uv.git synced 2025-12-21 11:01:40 +00:00

Ignore backslashes and whitespace in requirements (#501)

setup-uv gets confused when there are backslashes in `requirements.txt`.
This changes the regex to ignore backslashes.

---------

Co-authored-by: axm2 <>
This commit is contained in:
axm2
2025-07-26 09:19:52 -04:00
committed by GitHub
parent 4fb0c07c55
commit 43f37368c9
6 changed files with 63 additions and 2 deletions

View File

@@ -0,0 +1,10 @@
import { getUvVersionFromFile } from "../../src/version/resolve";
import { expect, test } from "@jest/globals";
test("ignores dependencies starting with uv", async () => {
const parsedVersion = getUvVersionFromFile(
"__tests__/fixtures/uv-in-requirements-hash-txt-project/requirements.txt",
);
expect(parsedVersion).toBe("0.8.3");
});