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:
Almeida
2025-12-09 02:22:16 +00:00
committed by GitHub
parent c9bc33c758
commit ec3ef7b1bd
34 changed files with 404 additions and 99 deletions

View File

@@ -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);
}