mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 11:33:30 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user