refactor: update deno template and loader logic (#11060)

* refactor: update deno template and loader logic

* yeet

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
Almeida
2025-09-04 13:36:26 +01:00
committed by GitHub
parent 5a656b849f
commit 8ca279e0c3
18 changed files with 96 additions and 148 deletions

View File

@@ -14,6 +14,11 @@ export type PackageManager = 'bun' | 'deno' | 'npm' | 'pnpm' | 'yarn';
export function resolvePackageManager(): PackageManager {
const npmConfigUserAgent = process.env.npm_config_user_agent;
// @ts-expect-error: We're not using Deno's types, so its global is not declared
if (typeof Deno !== 'undefined') {
return 'deno';
}
// If this is not present, return the default package manager.
if (!npmConfigUserAgent) {
return DEFAULT_PACKAGE_MANAGER;