Summary
packages/adapters/src/execa/index.ts has a top-level value import: import { execa } from 'execa'. The rest of the file tries to lazy-load execa and throw a friendly optional-peer error, but the static import means the module can fail before useExeca() is even called.
Reproduction
- Install/use @termuijs/adapters without installing the optional execa peer dependency.
- Import the adapters package or the execa adapter module.
- The runtime attempts to resolve execa during module evaluation.
Expected behavior
The package should be importable without optional peer dependencies installed. The helpful useExeca() error should only appear when the execa adapter is actually used.
Actual behavior
The top-level value import can make the module fail to load before the lazy optional-peer handling runs. The file can use a type-only import for the execa function shape and rely on the existing dynamic import path.
Summary
packages/adapters/src/execa/index.ts has a top-level value import: import { execa } from 'execa'. The rest of the file tries to lazy-load execa and throw a friendly optional-peer error, but the static import means the module can fail before useExeca() is even called.
Reproduction
Expected behavior
The package should be importable without optional peer dependencies installed. The helpful useExeca() error should only appear when the execa adapter is actually used.
Actual behavior
The top-level value import can make the module fail to load before the lazy optional-peer handling runs. The file can use a type-only import for the execa function shape and rely on the existing dynamic import path.