Commit 41c4667
fix(build): Guard import.meta usage for CJS Smithery builds
Smithery capability scanning runs a CJS bundle in CI. Accessing fileURLToPath(importMetaUrl) without a guard can throw when import.meta is present but does not include a usable url, which broke the build-and-test job.
Guard the import-meta candidate so package-root discovery still works via process.cwd() and argv fallbacks in CJS environments.
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 8365d56 commit 41c4667
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
| |||
0 commit comments