Commit 3c835d7
committed
Fix package.json config overriding closer pyproject.toml in monorepos
In parse_config_file(), package.json was always checked first by walking
up from CWD. In monorepos with both a root package.json and a nested
pyproject.toml with [tool.codeflash], the JS config would win and set
pytest_cmd to "jest", causing Python function optimization to crash with
FileNotFoundError: 'jest'.
Now both config files are located first, and the one closer to CWD is
preferred, so a pyproject.toml in the working directory takes precedence
over a parent-directory package.json.1 parent b6b47ff commit 3c835d7
1 file changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
92 | 91 | | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
93 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
94 | 108 | | |
95 | 109 | | |
96 | 110 | | |
| |||
0 commit comments