fix(coding-agent): use ESM resolution for extension alias fallback (#1821)

The previous fix (83b57924) replaced require.resolve() with bare
specifier fallbacks to avoid ERR_PACKAGE_PATH_NOT_EXPORTED for ESM-only
packages like pi-ai. However, bare specifiers are not valid jiti alias
targets, breaking extension loading in global npm installs.

Use import.meta.resolve() as the fallback instead. It respects the
"import" exports condition and returns a real file path.
This commit is contained in:
Sviatoslav Abakumov 2026-03-05 10:08:30 +04:00 committed by GitHub
parent f430dce00a
commit 1ce870db1b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 7 deletions

View file

@ -94,6 +94,6 @@
"directory": "packages/coding-agent"
},
"engines": {
"node": ">=20.0.0"
"node": ">=20.6.0"
}
}