mirror of
https://github.com/oven-sh/bun
synced 2026-02-15 13:22:07 +00:00
Add shadcn, tailwind and react detection & templates to bun create. Also: bun install --analyze <files...> (#17035)
This commit is contained in:
@@ -190,8 +190,12 @@ pub inline fn containsAny(in: anytype, target: string) bool {
|
||||
/// a folder name. Therefore, the name can't contain any non-URL-safe
|
||||
/// characters.
|
||||
pub fn isNPMPackageName(target: string) bool {
|
||||
if (target.len == 0) return false;
|
||||
if (target.len > 214) return false;
|
||||
return isNPMPackageNameIgnoreLength(target);
|
||||
}
|
||||
|
||||
pub fn isNPMPackageNameIgnoreLength(target: string) bool {
|
||||
if (target.len == 0) return false;
|
||||
|
||||
const scoped = switch (target[0]) {
|
||||
// Old packages may have capital letters
|
||||
|
||||
Reference in New Issue
Block a user