mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 10:33:30 +01:00
feat: use native node typescript (#11259)
* feat: use native node typescript * fix: use basename * Update packages/create-discord-bot/template/Bun/TypeScript/tsconfig.json Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Change module and moduleResolution to ESNext and Bundler --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import { execSync } from 'node:child_process';
|
||||
import process from 'node:process';
|
||||
import { styleText } from 'node:util';
|
||||
import { DEFAULT_PACKAGE_MANAGER, NODE_PACKAGE_MANAGERS } from '../util/constants.js';
|
||||
import { DEFAULT_PACKAGE_MANAGER, type PACKAGE_MANAGERS } from '../util/constants.js';
|
||||
|
||||
/**
|
||||
* A union of supported package managers.
|
||||
*/
|
||||
export type PackageManager = 'bun' | 'deno' | 'npm' | 'pnpm' | 'yarn';
|
||||
export type PackageManager = (typeof PACKAGE_MANAGERS)[number];
|
||||
|
||||
/**
|
||||
* Resolves the package manager from `npm_config_user_agent`.
|
||||
@@ -117,12 +117,3 @@ export function install(packageManager: PackageManager) {
|
||||
env,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether the provided package manager is a Node package manager.
|
||||
*
|
||||
* @param packageManager - The package manager to check
|
||||
*/
|
||||
export function isNodePackageManager(packageManager: PackageManager): packageManager is 'npm' | 'pnpm' | 'yarn' {
|
||||
return NODE_PACKAGE_MANAGERS.includes(packageManager as any);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user