Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ui config for turbopack #178

Merged
merged 4 commits into from
Jun 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/admin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"scripts": {
"clean": "rm -rf .next/ .turbo/ node_modules/",
"dev": "next dev --port 3100",
"dev": "next dev --turbo --port 3100",
"build": "next build",
"start": "next start",
"lint": "biome check --write .",
Expand Down
4 changes: 3 additions & 1 deletion apps/admin/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./*"]
"@/*": ["./*"],
"@ui/lib/utils": ["../../packages/ui/src/lib/utils"],
"@ui/components/ui/*": ["../../packages/ui/src/components/ui/*"]
},
"plugins": [
{
Expand Down
2 changes: 1 addition & 1 deletion apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@types/node": "^20.14.2",
"@types/swagger-ui-dist": "^3.30.4",
"supabase": "^1.172.2",
"tsx": "^4.14.0",
"tsx": "^4.15.0",
"typescript": "^5.4.5",
"vitest": "^1.6.0"
}
Expand Down
2 changes: 1 addition & 1 deletion apps/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"scripts": {
"clean": "rm -rf .next/ .turbo/ node_modules/",
"dev": "next dev --port 3102",
"dev": "next dev --turbo --port 3102",
"build": "next build",
"start": "next start",
"lint": "biome check --write .",
Expand Down
4 changes: 3 additions & 1 deletion apps/client/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./*"]
"@/*": ["./*"],
"@ui/lib/utils": ["../../packages/ui/src/lib/utils"],
"@ui/components/ui/*": ["../../packages/ui/src/components/ui/*"]
},
"plugins": [
{
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@repo/typescript-config": "workspace:*",
"turbo": "^2.0.3"
},
"packageManager": "pnpm@9.1.4",
"packageManager": "pnpm@9.2.0",
"engines": {
"node": ">=20",
"pnpm": ">=9"
Expand Down
6 changes: 3 additions & 3 deletions packages/ui/src/components/ui/AutoComplete.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { CommandGroup, CommandInput, CommandItem, CommandList } from '@repo/ui/components/ui/command';
import { CommandGroup, CommandInput, CommandItem, CommandList } from '@ui/components/ui/command';
import { Command as CommandPrimitive } from 'cmdk';
import { type KeyboardEvent, useCallback, useRef, useState } from 'react';

import { Skeleton } from '@repo/ui/components/ui/skeleton';
import { Skeleton } from '@ui/components/ui/skeleton';

import { cn } from '@repo/ui/lib/utils';
import { cn } from '@ui/lib/utils';
import { Check } from 'lucide-react';

export type Option = Record<'value' | 'label', string> & Record<string, string>;
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/ui/PaginationComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
PaginationLink,
PaginationNext,
PaginationPrevious,
} from '@repo/ui/components/ui/pagination';
} from '@ui/components/ui/pagination';

interface Props {
page: number;
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/ui/accordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as AccordionPrimitive from '@radix-ui/react-accordion';
import { ChevronDown } from 'lucide-react';
import * as React from 'react';

import { cn } from '@repo/ui/lib/utils';
import { cn } from '@ui/lib/utils';

const Accordion = AccordionPrimitive.Root;

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/ui/alert.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type VariantProps, cva } from 'class-variance-authority';
import * as React from 'react';

import { cn } from '@repo/ui/lib/utils';
import { cn } from '@ui/lib/utils';

const alertVariants = cva(
'relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground',
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/ui/avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import * as AvatarPrimitive from '@radix-ui/react-avatar';
import * as React from 'react';

import { cn } from '@repo/ui/lib/utils';
import { cn } from '@ui/lib/utils';

const Avatar = React.forwardRef<
React.ElementRef<typeof AvatarPrimitive.Root>,
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/ui/badge.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { type VariantProps, cva } from 'class-variance-authority';
import type * as React from 'react';

import { cn } from '@repo/ui/lib/utils';
import { cn } from '@ui/lib/utils';

const badgeVariants = cva(
'inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2',
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/ui/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Slot } from '@radix-ui/react-slot';
import { type VariantProps, cva } from 'class-variance-authority';
import * as React from 'react';

import { cn } from '@repo/ui/lib/utils';
import { cn } from '@ui/lib/utils';

const buttonVariants = cva(
'inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50',
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/src/components/ui/calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { ChevronLeft, ChevronRight } from 'lucide-react';
import type * as React from 'react';
import { DayPicker } from 'react-day-picker';

import { buttonVariants } from '@repo/ui/components/ui/button';
import { cn } from '@repo/ui/lib/utils';
import { buttonVariants } from '@ui/components/ui/button';
import { cn } from '@ui/lib/utils';

export type CalendarProps = React.ComponentProps<typeof DayPicker>;

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/ui/card.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';

import { cn } from '@repo/ui/lib/utils';
import { cn } from '@ui/lib/utils';

const Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({ className, ...props }, ref) => (
<div ref={ref} className={cn('rounded-lg border bg-card text-card-foreground shadow-sm', className)} {...props} />
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/ui/checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
import { Check } from 'lucide-react';
import * as React from 'react';

import { cn } from '@repo/ui/lib/utils';
import { cn } from '@ui/lib/utils';

const Checkbox = React.forwardRef<
React.ElementRef<typeof CheckboxPrimitive.Root>,
Expand Down
4 changes: 2 additions & 2 deletions packages/ui/src/components/ui/command.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { Command as CommandPrimitive } from 'cmdk';
import { Search } from 'lucide-react';
import * as React from 'react';

import { Dialog, DialogContent } from '@repo/ui/components/ui/dialog';
import { cn } from '@repo/ui/lib/utils';
import { Dialog, DialogContent } from '@ui/components/ui/dialog';
import { cn } from '@ui/lib/utils';

const Command = React.forwardRef<
React.ElementRef<typeof CommandPrimitive>,
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/ui/dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as DialogPrimitive from '@radix-ui/react-dialog';
import { X } from 'lucide-react';
import * as React from 'react';

import { cn } from '@repo/ui/lib/utils';
import { cn } from '@ui/lib/utils';

const Dialog = DialogPrimitive.Root;

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/ui/dropdown-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
import { Check, ChevronRight, Circle } from 'lucide-react';
import * as React from 'react';

import { cn } from '@repo/ui/lib/utils';
import { cn } from '@ui/lib/utils';

const DropdownMenu = DropdownMenuPrimitive.Root;

Expand Down
4 changes: 2 additions & 2 deletions packages/ui/src/components/ui/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import {
useFormContext,
} from 'react-hook-form';

import { Label } from '@repo/ui/components/ui/label';
import { cn } from '@repo/ui/lib/utils';
import { Label } from '@ui/components/ui/label';
import { cn } from '@ui/lib/utils';

const Form = FormProvider;

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/ui/input.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';

import { cn } from '@repo/ui/lib/utils';
import { cn } from '@ui/lib/utils';

export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {}

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/ui/label.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as LabelPrimitive from '@radix-ui/react-label';
import { type VariantProps, cva } from 'class-variance-authority';
import * as React from 'react';

import { cn } from '@repo/ui/lib/utils';
import { cn } from '@ui/lib/utils';

const labelVariants = cva('text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70');

Expand Down
4 changes: 2 additions & 2 deletions packages/ui/src/components/ui/pagination.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ChevronLeft, ChevronRight, MoreHorizontal } from 'lucide-react';
import * as React from 'react';

import { type ButtonProps, buttonVariants } from '@repo/ui/components/ui/button';
import { cn } from '@repo/ui/lib/utils';
import { type ButtonProps, buttonVariants } from '@ui/components/ui/button';
import { cn } from '@ui/lib/utils';

const Pagination = ({ className, ...props }: React.ComponentProps<'nav'>) => (
<nav
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/ui/popover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import * as PopoverPrimitive from '@radix-ui/react-popover';
import * as React from 'react';

import { cn } from '@repo/ui/lib/utils';
import { cn } from '@ui/lib/utils';

const Popover = PopoverPrimitive.Root;

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/ui/progress.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import * as ProgressPrimitive from '@radix-ui/react-progress';
import * as React from 'react';

import { cn } from '@repo/ui/lib/utils';
import { cn } from '@ui/lib/utils';

const Progress = React.forwardRef<
React.ElementRef<typeof ProgressPrimitive.Root>,
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/ui/radio-group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
import { Circle } from 'lucide-react';
import * as React from 'react';

import { cn } from '@repo/ui/lib/utils';
import { cn } from '@ui/lib/utils';

const RadioGroup = React.forwardRef<
React.ElementRef<typeof RadioGroupPrimitive.Root>,
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/ui/scroll-area.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
import * as React from 'react';

import { cn } from '@repo/ui/lib/utils';
import { cn } from '@ui/lib/utils';

const ScrollArea = React.forwardRef<
React.ElementRef<typeof ScrollAreaPrimitive.Root>,
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/ui/select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as SelectPrimitive from '@radix-ui/react-select';
import { Check, ChevronDown, ChevronUp } from 'lucide-react';
import * as React from 'react';

import { cn } from '@repo/ui/lib/utils';
import { cn } from '@ui/lib/utils';

const Select = SelectPrimitive.Root;

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/ui/separator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import * as SeparatorPrimitive from '@radix-ui/react-separator';
import * as React from 'react';

import { cn } from '@repo/ui/lib/utils';
import { cn } from '@ui/lib/utils';

const Separator = React.forwardRef<
React.ElementRef<typeof SeparatorPrimitive.Root>,
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/ui/sheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { type VariantProps, cva } from 'class-variance-authority';
import { X } from 'lucide-react';
import * as React from 'react';

import { cn } from '@repo/ui/lib/utils';
import { cn } from '@ui/lib/utils';

const Sheet = SheetPrimitive.Root;

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/ui/skeleton.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { cn } from '@repo/ui/lib/utils';
import { cn } from '@ui/lib/utils';

function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {
return <div className={cn('animate-pulse rounded-md bg-muted', className)} {...props} />;
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/ui/table.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';

import { cn } from '@repo/ui/lib/utils';
import { cn } from '@ui/lib/utils';

const Table = React.forwardRef<HTMLTableElement, React.HTMLAttributes<HTMLTableElement>>(
({ className, ...props }, ref) => (
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/ui/tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import * as TabsPrimitive from '@radix-ui/react-tabs';
import * as React from 'react';

import { cn } from '@repo/ui/lib/utils';
import { cn } from '@ui/lib/utils';

const Tabs = TabsPrimitive.Root;

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/ui/textarea.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';

import { cn } from '@repo/ui/lib/utils';
import { cn } from '@ui/lib/utils';

export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {}

Expand Down
4 changes: 2 additions & 2 deletions packages/ui/src/components/ui/time-picker-input.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use client';

import { Input } from '@repo/ui/components/ui/input';
import { Input } from '@ui/components/ui/input';

import { cn } from '@repo/ui/lib/utils';
import { cn } from '@ui/lib/utils';
import React from 'react';
import { type TimePickerType, getArrowByType, getDateByType, setDateByType } from './time-picker-utils';

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/components/ui/time-picker.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';

import { Label } from '@repo/ui/components/ui/label';
import { Label } from '@ui/components/ui/label';
import { Clock } from 'lucide-react';
import * as React from 'react';
import { TimePickerInput } from './time-picker-input';
Expand Down
12 changes: 0 additions & 12 deletions packages/ui/tsconfig.lint.json

This file was deleted.

Loading
Loading