Skip to content
Closed
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
28 changes: 14 additions & 14 deletions apps/unsubscriber/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@
},
"devDependencies": {
"@types/dotenv": "8.2.3",
"@types/node": "24.3.0",
"playwright": "1.55.0",
"tsx": "4.20.5",
"typescript": "5.9.2"
"@types/node": "24.9.1",
"playwright": "1.56.1",
"tsx": "4.20.6",
"typescript": "5.9.3"
},
"dependencies": {
"@ai-sdk/amazon-bedrock": "2.2.9",
"@ai-sdk/anthropic": "1.2.12",
"@ai-sdk/google": "1.2.18",
"@ai-sdk/openai": "1.3.22",
"@fastify/cors": "11.0.1",
"@t3-oss/env-core": "0.13.6",
"ai": "4.3.16",
"dotenv": "17.2.1",
"fastify": "5.5.0",
"zod": "3.25.46"
"@ai-sdk/amazon-bedrock": "3.0.45",
"@ai-sdk/anthropic": "2.0.35",
"@ai-sdk/google": "2.0.23",
"@ai-sdk/openai": "2.0.53",
"@fastify/cors": "11.1.0",
"@t3-oss/env-core": "0.13.8",
"ai": "5.0.76",
"dotenv": "17.2.3",
"fastify": "5.6.1",
"zod": "4.1.12"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export function BulkUnsubscribeRowDesktop({
onChange={() => onToggleSelect?.(item.name)}
/>
</TableCell>
<TableCell className="max-w-[250px] truncate min-[1550px]:max-w-[300px] min-[1650px]:max-w-[400px] py-3">
<TableCell className="max-w-[250px] truncate min-[1550px]:max-w-[300px] py-3">
<div className="flex flex-col">
<span className="font-medium">{item.fromName || item.name}</span>
{item.fromName && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
CardTitle,
} from "@/components/ui/card";
import { Button } from "@/components/ui/button";
import { Trash2, CheckCircle, XCircle } from "lucide-react";
import { Trash2, XCircle } from "lucide-react";
import { CalendarList } from "./CalendarList";
import { useAction } from "next-safe-action/hooks";
import {
Expand Down
3 changes: 1 addition & 2 deletions apps/web/app/api/sso/signin/route.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ vi.mock("@/utils/prisma", () => ({
},
}));

import { NextRequest, NextResponse } from "next/server";
import { NextRequest } from "next/server";
import { beforeEach, describe, expect, test, vi } from "vitest";
import { betterAuthConfig } from "@/utils/auth";
import { SafeError } from "@/utils/error";
import { createScopedLogger } from "@/utils/logger";
import prisma from "@/utils/prisma";
import { GET } from "./route";
Expand Down
1 change: 0 additions & 1 deletion apps/web/components/NavUser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
RibbonIcon,
LogOutIcon,
PaletteIcon,
SettingsIcon,
ChromeIcon,
Building2Icon,
} from "lucide-react";
Expand Down
1 change: 0 additions & 1 deletion apps/web/components/SideNavWithTopNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import { Suspense } from "react";
import dynamic from "next/dynamic";
import { usePathname } from "next/navigation";
import { Toaster } from "@/components/Toast";
import { NavBottom } from "@/components/NavBottom";
import {
SidebarInset,
Expand Down
135 changes: 68 additions & 67 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,25 @@
"postinstall": "prisma generate"
},
"dependencies": {
"@ai-sdk/amazon-bedrock": "3.0.13",
"@ai-sdk/anthropic": "2.0.9",
"@ai-sdk/gateway": "1.0.15",
"@ai-sdk/google": "2.0.11",
"@ai-sdk/groq": "2.0.16",
"@ai-sdk/openai": "2.0.23",
"@ai-sdk/amazon-bedrock": "3.0.45",
"@ai-sdk/anthropic": "2.0.35",
"@ai-sdk/gateway": "2.0.0",
"@ai-sdk/google": "2.0.23",
"@ai-sdk/groq": "2.0.24",
"@ai-sdk/openai": "2.0.53",
"@ai-sdk/provider": "2.0.0",
"@ai-sdk/react": "2.0.28",
"@ai-sdk/react": "2.0.76",
Comment on lines +17 to +24
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Verify compatibility with updated AI SDK packages.

Multiple AI SDK packages have been updated, with @ai-sdk/gateway moving from 1.x to 2.0.0 (major version). Ensure all AI provider integrations, streaming responses, and SDK usage patterns remain compatible with the new versions.


🏁 Script executed:

#!/bin/bash
# Description: Find AI SDK usage patterns to verify compatibility

# Find AI SDK imports and usage
rg -n --type=ts --type=tsx -C3 "from ['\"]@ai-sdk/" apps/web/

# Find streaming and generation patterns
rg -n --type=ts --type=tsx -C3 "streamText|generateText|generateObject" apps/web/

Length of output: 55


I need to correct the shell script syntax. The --type=tsx flag isn't recognized by ripgrep. Let me retry with adjusted parameters:


---

🏁 Script executed:

```shell
#!/bin/bash
# Description: Find AI SDK usage patterns to verify compatibility

# Find AI SDK imports and usage across apps/web (search all files)
rg -n "@ai-sdk/" apps/web/ -C3

# Find streaming and generation patterns
rg -n "streamText|generateText|generateObject" apps/web/ -C3

Length of output: 47210


I found extensive AI SDK usage across the codebase. Let me check for breaking changes in the major version updates, particularly for @ai-sdk/gateway:

I need to search more specifically for the version discrepancy and check the gateway usage:Now let me check the actual usage of createGateway in the model.ts file more closely:


---

🏁 Script executed:

```shell
#!/bin/bash
# Check the model.ts file for createGateway usage and its context
cat apps/web/utils/llms/model.ts

Length of output: 10428


Let me search for information about Vercel AI SDK v2 breaking changes and package versions:

Correct the invalid @ai-sdk/gateway version number.

The latest version of @ai-sdk/gateway is 1.0.19, not 2.0.0. The package.json specifies "@ai-sdk/gateway": "2.0.0", which does not exist in the npm registry and will cause installation failures. All other AI SDK packages use valid v2.x versions that exist.

The codebase's AI SDK usage patterns (streamText, generateText, generateObject wrappers, and createGateway) are compatible with available versions. However, this version mismatch must be resolved before the code can be installed or tested.

🤖 Prompt for AI Agents
In apps/web/package.json around lines 17 to 24 the @ai-sdk/gateway version is
incorrect ("2.0.0") which does not exist in the registry; update the dependency
to the valid published version ("1.0.19"), then reinstall dependencies and
commit the updated lockfile (package-lock.json or yarn.lock) so installs
succeed.

"@asteasolutions/zod-to-openapi": "8.1.0",
"@better-auth/sso": "1.3.7",
"@better-auth/sso": "1.3.28",
"@date-fns/tz": "1.4.1",
"@dub/analytics": "0.0.30",
"@formkit/auto-animate": "0.8.4",
"@googleapis/calendar": "^11.0.1",
"@googleapis/gmail": "14.0.1",
"@googleapis/people": "5.0.1",
"@headlessui/react": "2.2.7",
"@hookform/resolvers": "5.2.1",
"@dub/analytics": "0.0.32",
"@formkit/auto-animate": "0.9.0",
"@googleapis/calendar": "^12.0.0",
"@googleapis/gmail": "15.0.0",
"@googleapis/people": "6.0.0",
"gaxios": "7.1.2",
"@headlessui/react": "2.2.9",
"@hookform/resolvers": "5.2.2",
"@inboxzero/loops": "workspace:*",
"@inboxzero/resend": "workspace:*",
"@inboxzero/tinybird": "workspace:*",
Expand All @@ -40,12 +41,12 @@
"@mdx-js/loader": "3.1.1",
"@mdx-js/react": "3.1.1",
"@microsoft/microsoft-graph-client": "3.0.7",
"@modelcontextprotocol/sdk": "^1.18.2",
"@mux/mux-player-react": "3.5.3",
"@next/mdx": "15.5.2",
"@next/third-parties": "15.5.2",
"@openrouter/ai-sdk-provider": "1.1.2",
"@portabletext/react": "4.0.2",
"@modelcontextprotocol/sdk": "^1.20.1",
"@mux/mux-player-react": "3.6.1",
"@next/mdx": "15.5.6",
"@next/third-parties": "15.5.6",
"@openrouter/ai-sdk-provider": "1.2.0",
"@portabletext/react": "4.0.3",
"@prisma/client": "6.6.0",
"@radix-ui/react-alert-dialog": "1.1.15",
"@radix-ui/react-avatar": "1.1.10",
Expand All @@ -68,14 +69,14 @@
"@radix-ui/react-toggle": "1.1.10",
"@radix-ui/react-tooltip": "1.2.8",
"@radix-ui/react-use-controllable-state": "1.2.2",
"@react-email/render": "1.2.1",
"@sentry/nextjs": "10.8.0",
"@serwist/next": "9.2.0",
"@stripe/stripe-js": "7.9.0",
"@react-email/render": "1.4.0",
"@sentry/nextjs": "10.20.0",
"@serwist/next": "9.2.1",
"@stripe/stripe-js": "8.1.0",
"@t3-oss/env-nextjs": "0.13.8",
"@tailwindcss/forms": "0.5.10",
"@tailwindcss/typography": "0.5.16",
"@tanstack/react-query": "5.85.6",
"@tailwindcss/typography": "0.5.19",
"@tanstack/react-query": "5.90.5",
"@tanstack/react-table": "8.21.3",
"@tanstack/react-virtual": "3.13.12",
"@tiptap/extension-mention": "2.26.1",
Expand All @@ -85,61 +86,61 @@
"@tiptap/starter-kit": "2.26.1",
"@tiptap/suggestion": "2.26.1",
"@tremor/react": "3.18.7",
"@upstash/qstash": "2.8.2",
"@upstash/redis": "1.35.3",
"@upstash/qstash": "2.8.4",
"@upstash/redis": "1.35.6",
"@vercel/analytics": "1.5.0",
"@vercel/speed-insights": "1.2.0",
"ai": "5.0.28",
"better-auth": "1.3.7",
"braintrust": "0.3.6",
"ai": "5.0.76",
"better-auth": "1.3.28",
"braintrust": "0.4.6",
"capital-case": "2.0.0",
"cheerio": "1.0.0",
"class-variance-authority": "0.7.1",
"clsx": "2.1.1",
"cmdk": "1.1.1",
"crisp-sdk-web": "1.0.25",
"crisp-sdk-web": "1.0.26",
"date-fns": "4.1.0",
"diff": "7.0.0",
"dompurify": "3.2.6",
"dub": "0.66.1",
"dompurify": "3.3.0",
"dub": "0.67.0",
"easymde": "^2.20.0",
"email-reply-parser": "1.9.4",
"embla-carousel-react": "8.6.0",
"encoding": "0.1.13",
"fast-deep-equal": "3.1.3",
"fast-xml-parser": "5.2.5",
"fast-xml-parser": "5.3.0",
"gmail-api-parse-message": "2.1.2",
"google": "link:@next/third-parties/google",
"he": "1.2.0",
"html-to-text": "9.0.5",
"ioredis": "5.7.0",
"jotai": "2.13.1",
"jsdom": "26.1.0",
"ioredis": "5.8.2",
"jotai": "2.15.0",
"jsdom": "27.0.1",
"json5": "2.2.3",
"jsonrepair": "3.13.0",
"jsonrepair": "3.13.1",
"linkify-react": "4.3.2",
"linkifyjs": "4.3.2",
"lodash": "4.17.21",
"lucide-react": "0.542.0",
"lucide-react": "0.546.0",
"motion": "12.23.24",
"next": "15.5.2",
"next-axiom": "1.9.2",
"next-safe-action": "7.10.8",
"next": "15.5.6",
Comment thread
elie222 marked this conversation as resolved.
"next-axiom": "1.9.3",
"next-safe-action": "8.0.11",
"next-themes": "0.4.6",
"nodemailer": "6.10.1",
"nuqs": "2.5.2",
"nodemailer": "7.0.9",
"nuqs": "2.7.2",
"ollama-ai-provider": "1.2.0",
"openai": "5.16.0",
"p-queue": "8.1.0",
"p-retry": "7.0.0",
"openai": "6.6.0",
"p-queue": "9.0.0",
"p-retry": "7.1.0",
"posthog-js": "1.261.0",
"posthog-node": "5.8.1",
"react": "19.1.1",
"react-day-picker": "8.10.1",
"react-dom": "19.1.1",
"react-dom-confetti": "0.2.0",
"react-hook-form": "7.62.0",
"react-hotkeys-hook": "5.1.0",
"react-hook-form": "7.65.0",
"react-hotkeys-hook": "5.2.1",
"react-markdown": "10.1.0",
"react-resizable-panels": "2.1.7",
"react-syntax-highlighter": "15.6.6",
Expand All @@ -152,44 +153,44 @@
"server-only": "0.0.1",
"shiki": "3.13.0",
"sonner": "2.0.7",
"streamdown": "1.1.6",
"streamdown": "1.4.0",
"string-similarity": "4.0.4",
"strip-indent": "4.0.0",
"stripe": "18.5.0",
"strip-indent": "4.1.1",
"stripe": "19.1.0",
"swr": "2.3.6",
"tailwind-merge": "2.6.0",
"tailwindcss-animate": "1.0.7",
"tiptap-markdown": "0.8.10",
"typescript": "5.9.2",
"typescript": "5.9.3",
"use-stick-to-bottom": "1.1.1",
"usehooks-ts": "3.1.1",
"zod": "3.25.46"
"zod": "4.1.12"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Critical: Verify zod 4.x compatibility across the entire codebase.

The update from zod 3.25.46 to 4.1.12 is a major version change that may introduce breaking changes to:

  • Schema definitions and validation
  • Type inference
  • Error handling and parsing
  • Custom refinements and transforms
  • Integration with libraries like @hookform/resolvers and next-safe-action

This affects the entire application as zod is heavily used for validation.

Search for zod 4.x migration guide:


🏁 Script executed:

#!/bin/bash
# Description: Comprehensive zod usage analysis

# Find all zod imports
rg -n --type=ts --type=tsx "from ['\"]zod['\"]" apps/web/ | head -50

# Find schema definitions
rg -n --type=ts --type=tsx "\bz\.(object|string|number|array|infer)" apps/web/ | head -50

# Find zod with form resolvers
rg -n --type=ts --type=tsx "zodResolver" apps/web/

# Find zod with next-safe-action
rg -n --type=ts --type=tsx "createServerAction|actionClient" apps/web/ | head -30

Length of output: 111


🌐 Web query:

zod version 4 migration guide breaking changes

💡 Result:

Here are the main breaking changes to be aware of when migrating from Zod 3 -> Zod 4 (summary of the official migration guide). Sources: Zod v4 migration/changelog and library-author notes. [1][2]

  • Error API unified: message → error; invalid_type_error / required_error removed; errorMap renamed/merged into error (error maps may return string or undefined). Error-map precedence changed (schema-level now wins over parse-time). Use the new error signature. [1]

  • ZodError shape and APIs changed: issue objects simplified/renamed (new z.core.$ZodIssue* types); .format(), .flatten(), and .formErrors deprecated; .addIssue(s) deprecated (push directly to err.issues). Use z.treeifyError() for formatting. [1]

  • z.function(): API redesigned — z.function() is a function factory (define input/output upfront) instead of a Zod schema; args()/returns() overloads removed; implementAsync() added. If you relied on function schemas, update to the new pattern. [1]

  • Parsing/refine changes: refine no longer treats type-predicate functions as narrowing; ctx.path removed from refine/superRefine; second-argument overload to .refine() removed. [1]

  • Number/string APIs tightened:

    • z.number(): Infinity values no longer accepted; .safe() now behaves like .int() (no floats); .int() only accepts safe integers.
    • String format helpers (email/uuid/etc.) moved to top-level z namespace (z.email(), z.uuid(), …); method-forms (z.string().email()) deprecated. UUID validation stricter; use z.guid() for looser checks. [1]
  • Collections/tuples:

    • .nonempty() now infers string[]/array type (behaves like .min(1)); old tuple-like inference removed — use z.tuple([...], rest) for that. [1]
  • z.promise() deprecated (await before parsing instead); many small helpers removed (e.g., undocumented z.ostring(), z.onumber(), etc.). [1]

  • Internal/type changes affecting library authors:

    • Many internal types moved into zod/v4/core (accessible via z.core); ._def moved to ._zod.def; some internal classes removed/changed (ZodEffects, etc.). Library authors should read the library-authors notes and prefer zod/v4/core for cross-compatibility. [1][2]
  • Import/packaging notes for library authors:

    • Zod v4 exposes subpaths ("zod/v4", "zod/v4/core"); libraries should prefer building against "zod/v4/core" (or re-exported z.core) to support classic/mini variants. [2]

If you want, I can:

  • produce a compact codemod checklist (common code edits),
  • generate example before/after snippets for the z.function(), error, and refine changes,
    or
  • run a quick scan of your codebase (paste snippets) and point out lines that will break.

I need to fix the shell script to properly search the codebase. Let me retry with corrected rg syntax and check the dependent libraries.


🏁 Script executed:

#!/bin/bash
# Fixed: Comprehensive zod usage analysis

echo "=== Finding zod imports ==="
rg -n "from ['\"]zod['\"]" apps/web/ | head -50

echo "=== Finding schema definitions (z.object, z.string, etc.) ==="
rg -n "z\.(object|string|number|array|infer)" apps/web/ | head -50

echo "=== Finding zodResolver usage ==="
rg -n "zodResolver" apps/web/

echo "=== Finding next-safe-action usage ==="
rg -n "createServerAction|actionClient" apps/web/ | head -30

echo "=== Checking package.json for zod and dependencies ==="
cat apps/web/package.json | grep -A 2 -B 2 '"zod"\|"@hookform/resolvers"\|"next-safe-action"'

Length of output: 17147


🌐 Web query:

@hookform/resolvers zod 4.x compatibility

💡 Result:

Yes — @hookform/resolvers added Zod v4 support. Upgrade to @hookform/resolvers >= 5.1.0 (released June 7, 2025) and import Zod v4 from 'zod/v4' (or use the resolver as shown in the package README). [1][2][3]

Sources:

  • Release notes showing "support Zod 4" in v5.1.0. [1]
  • @hookform/resolvers README/examples referencing zod/v4. [2]
  • zod documentation describing the zod/v4 package. [3]

I found a critical breaking change. Let me verify next-safe-action compatibility and search for other breaking patterns in the codebase.


🏁 Script executed:

#!/bin/bash
# Search for breaking Zod 4 patterns

echo "=== Checking z.string().email() usage (DEPRECATED in Zod 4) ==="
rg -n "\.email()" apps/web/ | head -20

echo "=== Checking .refine() and .superRefine() usage ==="
rg -n "\.refine\(|\.superRefine\(" apps/web/ | head -30

echo "=== Checking ZodError handling patterns ==="
rg -n "ZodError|\.issues|\.format()" apps/web/ | head -30

echo "=== Checking z.function() usage ==="
rg -n "z\.function" apps/web/

echo "=== Checking .flatten() usage (deprecated in Zod 4) ==="
rg -n "\.flatten()" apps/web/

echo "=== Full context of z.string().email() in email.ts ==="
cat apps/web/utils/email.ts | head -20

Length of output: 4523


🌐 Web query:

next-safe-action 8.0.11 zod 4 support

💡 Result:

Short answer: Yes — next-safe-action v8 (including 8.0.11) uses the Standard Schema system and supports Zod v4; import Zod v4 via its subpath (e.g. import * as z from "zod/v4") or any Standard‑Schema‑compatible Zod export. [1][2]

Sources:

  • next-safe-action v8 docs: standard schema / Zod examples. [1]
  • Zod v4 versioning (exports under "zod/v4" to allow incremental migration). [2]

Let me examine the specific breaking patterns more closely:


🏁 Script executed:

#!/bin/bash
# Detailed examination of breaking patterns

echo "=== apps/web/utils/email.ts (z.string().email) ==="
cat apps/web/utils/email.ts

echo ""
echo "=== refine() usage in generate-reply.validation.ts ==="
sed -n '10,20p' apps/web/utils/actions/generate-reply.validation.ts

echo ""
echo "=== superRefine() usage in settings.validation.ts ==="
sed -n '38,48p' apps/web/utils/actions/settings.validation.ts

echo ""
echo "=== formatZodError implementation in error.ts ==="
sed -n '29,50p' apps/web/utils/error.ts

echo ""
echo "=== ZodError handling in middleware.ts ==="
sed -n '90,105p' apps/web/utils/middleware.ts

echo ""
echo "=== Check error message/invalid_type_error patterns ==="
rg -n "invalid_type_error|required_error|errorMap" apps/web/ | head -20

Length of output: 5562


Critical: Three breaking changes in Zod 4 require immediate fixes before deployment.

The Zod 4 update contains confirmed breaking changes affecting validation across the codebase:

  1. apps/web/utils/email.ts:4z.string().email() is deprecated in Zod 4; replace with z.email()
  2. apps/web/app/(app)/[emailAccountId]/settings/DigestScheduleForm.tsx:34required_error option removed; use error instead
  3. apps/web/utils/error.ts:29formatZodError() uses deprecated error.errors API; change to error.issues

The dependencies are compatible: @hookform/resolvers 5.2.2 and next-safe-action 8.0.11 both support Zod 4. Additionally, review .superRefine() patterns in apps/web/utils/actions/settings.validation.ts and apps/web/utils/actions/rule.validation.ts to ensure ctx.addIssue() calls remain compatible with Zod 4's refined error handling behavior.

🤖 Prompt for AI Agents
In apps/web/package.json around line 167 and across the codebase (files flagged
in the review), update usages to be Zod 4 compatible: replace z.string().email()
with z.email() in apps/web/utils/email.ts line ~4; replace any schema options
using required_error with error (e.g., in
apps/web/app/(app)/[emailAccountId]/settings/DigestScheduleForm.tsx around line
34); change references from error.errors to error.issues in
apps/web/utils/error.ts around line 29; and audit .superRefine() handlers in
apps/web/utils/actions/settings.validation.ts and
apps/web/utils/actions/rule.validation.ts to ensure ctx.addIssue() calls use the
Zod 4 shape (issue.code, path, message or params) and produce the same
consumer-facing error structure. Make these replacements consistently and run
type checks/tests to confirm no remaining Zod 3 APIs are used.

},
"devDependencies": {
"@headlessui/tailwindcss": "0.2.2",
"@microsoft/microsoft-graph-types": "^2.40.0",
"@microsoft/microsoft-graph-types": "^2.43.1",
"@testing-library/react": "16.3.0",
"@types/diff": "7.0.2",
"@types/diff": "8.0.0",
"@types/email-reply-parser": "1.4.2",
"@types/he": "1.2.3",
"@types/html-to-text": "9.0.4",
"@types/jsdom": "21.1.7",
"@types/jsdom": "27.0.0",
"@types/lodash": "4.17.20",
"@types/mdx": "2.0.13",
"@types/node": "24.3.0",
"@types/nodemailer": "6.4.17",
"@types/node": "24.9.1",
"@types/nodemailer": "7.0.2",
"@types/react": "19.1.12",
"@types/react-dom": "19.1.9",
"@types/react-syntax-highlighter": "15.5.13",
"@types/string-similarity": "4.0.2",
"@vitest/coverage-v8": "3.2.4",
"@vitest/ui": "3.2.4",
"autoprefixer": "10.4.21",
"cross-env": "7.0.3",
"dotenv": "17.2.1",
"cross-env": "10.1.0",
"dotenv": "17.2.3",
"postcss": "8.5.6",
"prisma": "6.6.0",
"serwist": "9.2.0",
"serwist": "9.2.1",
"tailwindcss": "3.4.17",
"tsconfig": "workspace:*",
"vite-tsconfig-paths": "5.1.4",
Expand All @@ -200,11 +201,11 @@
"node": ">=22.0.0"
},
"optionalDependencies": {
"@sanity/client": "7.10.0",
"@sanity/client": "7.12.0",
"@sanity/icons": "3.7.4",
"@sanity/image-url": "1",
"@sanity/vision": "4",
"next-sanity": "10",
"sanity": "4.6.0"
"next-sanity": "11",
"sanity": "4.10.3"
}
}
1 change: 0 additions & 1 deletion apps/web/utils/action-display.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
TagIcon,
WebhookIcon,
FileTextIcon,
EyeIcon,
MailIcon,
NewspaperIcon,
} from "lucide-react";
Expand Down
9 changes: 6 additions & 3 deletions apps/web/utils/gmail/filter.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { gmail_v1 } from "@googleapis/gmail";
import { GaxiosError } from "gaxios";
import { GmailLabel } from "@/utils/gmail/label";

export async function createFilter(options: {
Expand Down Expand Up @@ -61,7 +62,9 @@ export async function getFiltersList(options: { gmail: gmail_v1.Gmail }) {
return options.gmail.users.settings.filters.list({ userId: "me" });
}

function isFilterExistsError(error: unknown) {
const errorMessage = (error as any)?.errors?.[0]?.message;
return errorMessage === "Filter already exists";
function isFilterExistsError(error: unknown): error is GaxiosError {
return (
error instanceof GaxiosError &&
error.message.includes("Filter already exists")
);
}
2 changes: 0 additions & 2 deletions apps/web/utils/gmail/mail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import type Mail from "nodemailer/lib/mailer";
import type { Attachment } from "nodemailer/lib/mailer";
import { zodAttachment } from "@/utils/types/mail";
import { convertEmailHtmlToText } from "@/utils/mail";
import { parseMessage } from "@/utils/gmail/message";
import { getMessage } from "@/utils/gmail/message";
import {
forwardEmailHtml,
forwardEmailSubject,
Expand Down
6 changes: 4 additions & 2 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,14 @@
"noBitwiseOperators": "off",
"noTsIgnore": "off",
"useIterableCallbackReturn": "off",
"noUnknownAtRules": "off"
"noUnknownAtRules": "off",
"noAlert": "off"
},
"complexity": {
"noForEach": "off",
"useSimplifiedLogicExpression": "off",
"noExcessiveCognitiveComplexity": "off"
"noExcessiveCognitiveComplexity": "off",
"useArrowFunction": "off"
},
"nursery": {
"useSortedClasses": "off",
Expand Down
Loading
Loading