Commit a8dba52
authored
fix: support Angular CLI 21.2.x findUpSync rename (#571)
In Angular CLI 21.2, the synchronous findUp utility was renamed to
findUpSync, making the old findUp async. Importing findUp statically
then passing its return value (now a Promise) as a file path caused:
"The "path" argument must be of type string or an instance of Buffer
or URL. Received an instance of Promise."
Replace the static import with a runtime require that prefers findUpSync
(21.2+) and falls back to findUp (≤21.1), keeping compatibility across
both CLI ranges without breaking existing behaviour.1 parent f6338cb commit a8dba52
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
3 | 8 | | |
4 | 9 | | |
5 | 10 | | |
| |||
0 commit comments