🧑‍💻 Switch to pnpm

This commit is contained in:
Luke Vella 2024-10-12 14:26:05 +01:00
parent 9af5b696c8
commit 07bd33fa63
No known key found for this signature in database
GPG key ID: 469CAD687F0D784C
27 changed files with 19407 additions and 16350 deletions

View file

@ -3,6 +3,6 @@
"version": "0.0.0",
"private": true,
"devDependencies": {
"@rallly/tsconfig": "*"
"@rallly/tsconfig": "workspace:*"
}
}

View file

@ -13,11 +13,12 @@
"prettier": "prettier --write ./src"
},
"dependencies": {
"@rallly/billing": "*",
"@rallly/icons": "*",
"@rallly/languages": "*",
"@rallly/tailwind-config": "*",
"@rallly/ui": "*",
"@rallly/billing": "workspace:*",
"@rallly/database": "workspace:*",
"@rallly/icons": "workspace:*",
"@rallly/languages": "workspace:*",
"@rallly/tailwind-config": "workspace:*",
"@rallly/ui": "workspace:*",
"@svgr/webpack": "^6.5.1",
"@vercel/analytics": "^0.1.8",
"accept-language-parser": "^1.5.0",
@ -25,8 +26,10 @@
"gray-matter": "^4.0.3",
"i18next": "^22.4.9",
"i18next-icu": "^2.3.0",
"i18next-resources-to-backend": "^1.1.4",
"intl-messageformat": "^10.3.4",
"lodash": "^4.17.21",
"lucide-react": "^0.452.0",
"nanoid": "^4.0.0",
"next-i18next": "^13.0.3",
"next-mdx-remote": "^5.0.0",
@ -36,8 +39,9 @@
},
"devDependencies": {
"@next/bundle-analyzer": "^12.3.4",
"@rallly/tsconfig": "*",
"@rallly/eslint-config": "*",
"@rallly/eslint-config": "workspace:*",
"@rallly/tsconfig": "workspace:*",
"@types/accept-language-parser": "^1.5.3",
"@types/color-hash": "^1.0.2",
"@types/lodash": "^4.14.178",
"cross-env": "^7.0.3",

View file

@ -1,16 +0,0 @@
import { GetStaticProps } from "next";
import { serverSideTranslations } from "next-i18next/serverSideTranslations";
export const getStaticTranslations =
(namespacesRequired: string[] = []): GetStaticProps =>
async (ctx) => {
const locale = ctx.locale ?? "en";
return {
props: {
...(await serverSideTranslations(locale, [
"common",
...namespacesRequired,
])),
},
};
};

View file

@ -24,15 +24,16 @@
"@aws-sdk/s3-request-presigner": "^3.645.0",
"@hookform/resolvers": "^3.3.1",
"@next/bundle-analyzer": "^12.3.4",
"@radix-ui/react-select": "^1.2.1",
"@radix-ui/react-slot": "^1.0.1",
"@radix-ui/react-switch": "^1.0.2",
"@rallly/billing": "*",
"@rallly/database": "*",
"@rallly/emails": "*",
"@rallly/icons": "*",
"@rallly/languages": "*",
"@rallly/tailwind-config": "*",
"@rallly/ui": "*",
"@rallly/billing": "workspace:*",
"@rallly/database": "workspace:*",
"@rallly/emails": "workspace:*",
"@rallly/icons": "workspace:*",
"@rallly/languages": "workspace:*",
"@rallly/tailwind-config": "workspace:*",
"@rallly/ui": "workspace:*",
"@sentry/nextjs": "*",
"@svgr/webpack": "^6.5.1",
"@t3-oss/env-nextjs": "^0.11.0",
@ -53,9 +54,9 @@
"cookie": "^0.7.0",
"crypto": "^1.0.1",
"dayjs": "^1.11.10",
"i18next": "^22.4.9",
"i18next-icu": "^2.3.0",
"i18next-resources-to-backend": "^1.1.4",
"i18next": "^22.4.9",
"ics": "^3.1.0",
"intl-messageformat": "^10.3.4",
"iron-session": "^6.3.1",
@ -63,7 +64,7 @@
"linkify-react": "^4.1.3",
"linkifyjs": "^4.1.3",
"lodash": "^4.17.21",
"lucide-react": "^0.367.0",
"lucide-react": "^0.452.0",
"micro": "^10.0.1",
"nanoid": "^4.0.0",
"next-auth": "^4.24.5",
@ -73,8 +74,8 @@
"posthog-js": "^1.154.0",
"posthog-node": "^4.0.1",
"react-big-calendar": "^1.8.1",
"react-hook-form-persist": "^3.0.0",
"react-hook-form": "^7.42.1",
"react-hook-form-persist": "^3.0.0",
"react-i18next": "^12.1.4",
"react-remove-scroll": "^2.5.6",
"react-use": "^17.4.0",
@ -85,11 +86,13 @@
"timezone-soft": "^1.5.1"
},
"devDependencies": {
"@next/env": "^14.2.15",
"@playwright/test": "^1.39.0",
"@rallly/eslint-config": "*",
"@rallly/tsconfig": "*",
"@rallly/eslint-config": "workspace:*",
"@rallly/tsconfig": "workspace:*",
"@types/accept-language-parser": "^1.5.3",
"@types/color-hash": "^1.0.2",
"@types/js-cookie": "^3.0.6",
"@types/lodash": "^4.14.178",
"@types/react-big-calendar": "^1.8.8",
"@types/request-ip": "^0.0.41",
@ -99,7 +102,6 @@
"i18next-scanner": "^4.2.0",
"i18next-scanner-typescript": "^1.1.1",
"smtp-tester": "^2.1.0",
"vitest": "^1.3.1",
"wait-on": "^6.0.1"
"vitest": "^1.3.1"
}
}

View file

@ -1,4 +1,4 @@
import clsx from "clsx";
import { cn } from "@rallly/ui";
import * as React from "react";
export interface DateCardProps {
@ -15,7 +15,7 @@ const DateCard: React.FunctionComponent<DateCardProps> = ({
}) => {
return (
<div
className={clsx(
className={cn(
"relative inline-flex size-12 flex-col rounded-md border bg-gray-50 text-center text-slate-800",
className,
)}

View file

@ -1,4 +1,4 @@
import clsx from "clsx";
import { cn } from "@rallly/ui";
import dayjs, { Dayjs } from "dayjs";
export const DateIconInner = (props: {
@ -9,7 +9,7 @@ export const DateIconInner = (props: {
}) => {
return (
<div
className={clsx(
className={cn(
"inline-flex size-10 flex-col overflow-hidden rounded-md border bg-gray-50 text-center text-slate-800",
props.className,
)}

View file

@ -8,7 +8,6 @@ import {
} from "@rallly/ui/dropdown-menu";
import { Icon } from "@rallly/ui/icon";
import { Switch } from "@rallly/ui/switch";
import clsx from "clsx";
import dayjs from "dayjs";
import {
CalendarIcon,
@ -129,7 +128,7 @@ const MonthCalendar: React.FunctionComponent<DateTimePickerProps> = ({
return (
<div
key={i}
className={clsx("h-11", {
className={cn("h-11", {
"border-r": (i + 1) % 7 !== 0,
"border-b": i < datepicker.days.length - 7,
})}
@ -174,7 +173,7 @@ const MonthCalendar: React.FunctionComponent<DateTimePickerProps> = ({
}
}
}}
className={clsx(
className={cn(
"group relative flex h-full w-full items-start justify-end rounded-none px-2.5 py-1.5 text-sm font-medium tracking-tight focus:z-10 focus:rounded",
{
"bg-gray-100 text-gray-400": day.isPast,
@ -208,7 +207,7 @@ const MonthCalendar: React.FunctionComponent<DateTimePickerProps> = ({
</div>
<div className="flex grow flex-col">
<div
className={clsx("border-b", {
className={cn("border-b", {
hidden: datepicker.selection.length === 0,
})}
>

View file

@ -6,7 +6,7 @@ import { FormMessage } from "@rallly/ui/form";
import { Input } from "@rallly/ui/input";
import * as Sentry from "@sentry/nextjs";
import { TRPCClientError } from "@trpc/client";
import clsx from "clsx";
import { cn } from "@rallly/ui";
import { useTranslation } from "next-i18next";
import { useForm } from "react-hook-form";
import { useMount } from "react-use";
@ -59,7 +59,7 @@ const VoteSummary = ({
return (
<div
className={clsx("flex flex-wrap gap-1.5 rounded border p-1.5", className)}
className={cn("flex flex-wrap gap-1.5 rounded border p-1.5", className)}
>
{voteTypes.map((voteType) => {
const votes = voteByType[voteType];

View file

@ -1,4 +1,4 @@
import clsx from "clsx";
import { cn } from "@rallly/ui";
import { groupBy } from "lodash";
import * as React from "react";
@ -28,7 +28,7 @@ const GroupedOptions: React.FunctionComponent<GroupedOptionsProps> = ({
return (
<div key={day}>
<div
className={clsx(
className={cn(
"flex border-b bg-gray-50 px-4 py-2 text-xs font-medium uppercase",
groupClassName,
)}

View file

@ -1,6 +1,6 @@
import { VoteType } from "@rallly/database";
import { IfNeedBeIcon, NoIcon, PendingIcon, YesIcon } from "@rallly/icons";
import clsx from "clsx";
import { cn } from "@rallly/ui";
import * as React from "react";
const VoteIcon: React.FunctionComponent<{
@ -12,7 +12,7 @@ const VoteIcon: React.FunctionComponent<{
case "yes":
return (
<YesIcon
className={clsx("text-green-500", className, {
className={cn("text-green-500", className, {
"size-5": size === "md",
"h-3": size === "sm",
})}
@ -22,7 +22,7 @@ const VoteIcon: React.FunctionComponent<{
case "ifNeedBe":
return (
<IfNeedBeIcon
className={clsx("text-amber-400", className, {
className={cn("text-amber-400", className, {
"size-5": size === "md",
"h-3": size === "sm",
})}
@ -32,7 +32,7 @@ const VoteIcon: React.FunctionComponent<{
case "no":
return (
<NoIcon
className={clsx("text-gray-400", className, {
className={cn("text-gray-400", className, {
"size-5": size === "md",
"h-3": size === "sm",
})}
@ -42,7 +42,7 @@ const VoteIcon: React.FunctionComponent<{
default:
return (
<PendingIcon
className={clsx("text-gray-300", className, {
className={cn("text-gray-300", className, {
"size-5": size === "md",
"h-3": size === "sm",
})}

View file

@ -1,10 +1,10 @@
import clsx from "clsx";
import { cn } from "@rallly/ui";
import { Loader2Icon } from "lucide-react";
export const Spinner = (props: { className?: string }) => {
return (
<Loader2Icon
className={clsx(
className={cn(
"text-muted-foreground inline-block h-5 animate-spin",
props.className,
)}

View file

@ -1,4 +1,4 @@
import clsx from "clsx";
import { cn } from "@rallly/ui";
import { useTranslation } from "next-i18next";
import React from "react";
@ -16,7 +16,7 @@ const Steps: React.FunctionComponent<StepsProps> = ({
const { t } = useTranslation();
return (
<div className={clsx("inline-flex items-center gap-2.5", className)}>
<div className={cn("inline-flex items-center gap-2.5", className)}>
<div className="text-sm font-medium tracking-tight">
{t("stepSummary", {
current: current + 1,
@ -28,7 +28,7 @@ const Steps: React.FunctionComponent<StepsProps> = ({
return (
<span
key={i}
className={clsx("h-2 w-2 rounded-full transition-all", {
className={cn("h-2 w-2 rounded-full transition-all", {
"bg-primary-400": i <= current,
"bg-gray-300": i > current,
"ring-primary-200 animate-pulse ring-4": i === current,

View file

@ -1,4 +1,4 @@
import clsx from "clsx";
import { cn } from "@rallly/ui";
import React from "react";
export const useDetectSticky = <E extends HTMLElement>(
@ -35,7 +35,7 @@ export const Sticky: React.FunctionComponent<{
return (
<div
ref={ref}
className={clsx(
className={cn(
"sticky",
typeof className === "function" ? className(isPinned) : className,
)}

View file

@ -1,7 +1,7 @@
import type { Stripe } from "@rallly/billing";
import { stripe } from "@rallly/billing";
import { prisma } from "@rallly/database";
import * as Sentry from "@sentry/node";
import * as Sentry from "@sentry/nextjs";
import { buffer } from "micro";
import { NextApiRequest, NextApiResponse } from "next";
import { z } from "zod";

View file

@ -16,7 +16,7 @@ import { Adapter, AdapterAccount } from "next-auth/adapters";
export function CustomPrismaAdapter(client: ExtendedPrismaClient): Adapter {
return {
...PrismaAdapter(client as PrismaClient),
linkAccount: (data) => {
linkAccount: (data: AdapterAccount) => {
return client.account.create({
data: {
userId: data.userId,

View file

@ -1,4 +1,4 @@
import * as Sentry from "@sentry/browser";
import * as Sentry from "@sentry/nextjs";
import { MutationCache } from "@tanstack/react-query";
import { httpBatchLink } from "@trpc/client";
import superjson from "superjson";

View file

@ -1,7 +1,7 @@
{
"name": "rallly",
"private": true,
"version": "3.11.1",
"version": "3.10.0",
"scripts": {
"dev": "turbo dev --filter=@rallly/web",
"dev:emails": "turbo dev --filter=@rallly/emails",
@ -10,8 +10,8 @@
"build": "dotenv -c -- turbo run build --filter=@rallly/web",
"build:test": "turbo build:test",
"docs:dev": "turbo dev --filter=@rallly/docs...",
"db:deploy": "prisma migrate deploy",
"db:generate": "prisma generate",
"db:deploy": "prisma migrate deploy --schema=./packages/database/prisma/schema.prisma",
"db:generate": "prisma generate --schema=./packages/database/prisma/schema.prisma",
"db:migrate": "prisma migrate dev",
"db:reset": "prisma migrate reset",
"docker:up": "docker compose -f docker-compose.dev.yml up -d && wait-on --timeout 60000 tcp:localhost:5450",
@ -27,18 +27,15 @@
"prisma": {
"seed": "yarn workspace @rallly/database db:seed"
},
"workspaces": [
"apps/*",
"packages/*"
],
"dependencies": {
"@prisma/client": "^5.17.0",
"@prisma/client": "^5.20.0",
"@sentry/nextjs": "^8.32.0",
"framer-motion": "^10.16.4",
"next": "^14.2.13",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^5.2.2",
"prisma": "^5.20.0",
"zod": "^3.23.8"
},
"devDependencies": {
@ -50,10 +47,11 @@
"prettier-plugin-tailwindcss": "^0.5.11",
"tailwindcss": "^3.4.4",
"turbo": "^2.1.1",
"wait-on": "^6.0.1",
"vitest": "^2.1.1"
},
"engines": {
"node": "20.x"
},
"packageManager": "yarn@1.22.19"
"packageManager": "pnpm@9.12.1"
}

View file

@ -12,7 +12,7 @@
"normalize-subscription-metadata": "dotenv -e ../../.env -- tsx ./src/scripts/normalize-metadata.ts"
},
"dependencies": {
"@rallly/ui": "*",
"@rallly/ui": "workspace:*",
"stripe": "^13.2.0",
"@radix-ui/react-radio-group": "^1.2.0",
"next": "*"

View file

@ -12,9 +12,12 @@
"exports": "./index.ts",
"devDependencies": {
"@faker-js/faker": "^7.6.0",
"@rallly/tsconfig": "*",
"@rallly/tsconfig": "workspace:*",
"@types/node": "^18.15.10",
"prisma": "^5.17.0",
"tsx": "^4.6.2"
},
"dependencies": {
"@prisma/client": "^5.20.0"
}
}

View file

@ -17,15 +17,19 @@
"@aws-sdk/credential-provider-node": "^3.501.0",
"@react-email/components": "^0.0.14",
"@react-email/render": "^0.0.12",
"@react-email/section": "0.0.14",
"@vercel/functions": "*",
"i18next": "^22.4.9",
"i18next-resources-to-backend": "^1.1.4",
"nodemailer": "^6.9.9",
"preview-email": "^3.0.19",
"react-email": "^2.0.0",
"@vercel/functions": "*"
"react-i18next": "^12.1.4"
},
"devDependencies": {
"@rallly/tailwind-config": "*",
"@rallly/tsconfig": "*",
"@rallly/utils": "*",
"@rallly/tailwind-config": "workspace:*",
"@rallly/tsconfig": "workspace:*",
"@rallly/utils": "workspace:*",
"@types/nodemailer": "^6.4.14",
"@types/preview-email": "^3.0.4"
}

View file

@ -6,6 +6,6 @@
"types": "src/index.ts",
"dependencies": {
"@heroicons/react": "^1.0.6",
"lucide-react": "^0.387.0"
"lucide-react": "^0.452.0"
}
}

View file

@ -27,15 +27,17 @@
"@radix-ui/react-tabs": "^1.0.4",
"@radix-ui/react-toast": "^1.1.4",
"@radix-ui/react-tooltip": "^1.0.6",
"@rallly/icons": "*",
"@rallly/languages": "*",
"@rallly/tailwind-config": "*",
"@rallly/icons": "workspace:*",
"@rallly/languages": "workspace:*",
"@rallly/tailwind-config": "workspace:*",
"class-variance-authority": "^0.6.0",
"clsx": "^1.2.1",
"react-hook-form": "^7.42.1",
"cmdk": "^0.2.1",
"lucide-react": "^0.452.0",
"tailwind-merge": "^1.12.0"
},
"devDependencies": {
"@rallly/tsconfig": "*"
"@rallly/tsconfig": "workspace:*"
}
}

View file

@ -13,11 +13,10 @@ const DialogTrigger = DialogPrimitive.Trigger;
const DialogClose = DialogPrimitive.Close;
const DialogPortal = ({
className,
children,
...props
}: DialogPrimitive.DialogPortalProps) => (
<DialogPrimitive.Portal className={cn(className)} {...props}>
<DialogPrimitive.Portal {...props}>
<div className="fixed inset-0 z-50 flex items-start justify-center p-3 sm:items-center">
{children}
</div>

19322
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load diff

3
pnpm-workspace.yaml Normal file
View file

@ -0,0 +1,3 @@
packages:
- "packages/*"
- "apps/*"

View file

@ -10,14 +10,6 @@
"inputs": ["src/**/*", "!tests/**/*"],
"outputs": [".next/**", "!.next/cache/**", "dist/**"]
},
"@rallly/web#build": {
"dependsOn": ["^build"],
"outputs": [".next/**"]
},
"@rallly/landing#build": {
"dependsOn": ["^build"],
"outputs": [".next/**"]
},
"test": {
"inputs": ["src/**/*", "tests/**/*"],
"env": ["CI"],

16255
yarn.lock

File diff suppressed because it is too large Load diff