Skip to content
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 audit-ci.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
"directory": "./",
"extra-args": [],
"pass-enoaudit": false,
"registry": "undefined",
"registry": "undefined"
}
2 changes: 1 addition & 1 deletion instrumentation-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

// https://docs.sentry.io/platforms/javascript/guides/nextjs/

import { config } from '@/config';
import * as Sentry from '@sentry/nextjs';
import {
browserSessionIntegration,
Expand All @@ -25,6 +24,7 @@ import {
init,
replayIntegration,
} from '@sentry/nextjs';
import { config } from '@/config';

if (config.sentry.dsn) {
// Initialize Sentry
Expand Down
2 changes: 1 addition & 1 deletion instrumentation-edge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
// Note that this config is unrelated to the Vercel Edge Runtime and is also required when running locally.
// https://docs.sentry.io/platforms/javascript/guides/nextjs/

import { env } from '@/env';
import { init } from '@sentry/nextjs';
import { env } from '@/env';

init({
dsn: env.NEXT_PUBLIC_SENTRY_DSN,
Expand Down
2 changes: 1 addition & 1 deletion instrumentation-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
// The config you add here will be used whenever the server handles a request.
// https://docs.sentry.io/platforms/javascript/guides/nextjs/

import { env } from '@/env';
import { init } from '@sentry/nextjs';
import { env } from '@/env';

init({
dsn: env.NEXT_PUBLIC_SENTRY_DSN,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
"jotai": "^2.16.1",
"jotai-effect": "^2.2.3",
"kbar": "0.1.0-beta.48",
"lucide-react": "0.577.0",
"lucide-react": "1.8.0",
Comment thread
coderabbitai[bot] marked this conversation as resolved.
"marked": "^17.0.1",
"mkdirp": "^3.0.1",
"motion": "12.38.0",
Expand Down
17 changes: 10 additions & 7 deletions report-bundle-size.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,16 @@ const globalAppDirBundle = buildMeta.rootMainFiles || [];
const globalAppDirBundleSizes = getScriptSizes(globalAppDirBundle);

/** @type {PageSizes} */
const allAppDirSizes = Object.entries(appDirMeta.pages).reduce((acc, [pagePath, scriptPaths]) => {
const scriptSizes = getScriptSizes(
scriptPaths.filter((scriptPath) => !globalAppDirBundle.includes(scriptPath)),
);
acc[pagePath] = scriptSizes;
return acc;
}, /** @type {PageSizes} */ ({}));
const allAppDirSizes = Object.entries(appDirMeta.pages).reduce(
(acc, [pagePath, scriptPaths]) => {
const scriptSizes = getScriptSizes(
scriptPaths.filter((scriptPath) => !globalAppDirBundle.includes(scriptPath)),
);
acc[pagePath] = scriptSizes;
return acc;
},
/** @type {PageSizes} */ ({}),
);

// format and write the output
const rawData = JSON.stringify({
Expand Down
2 changes: 1 addition & 1 deletion scripts/check-unused.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
* Licensed under the Apache License, Version 2.0
*/

import depcheck from 'depcheck';
import fs from 'node:fs';
import fsp from 'node:fs/promises';
import path from 'node:path';
import depcheck from 'depcheck';
import type { PackageJson } from 'type-fest';

// Optional Bun shell (used only if available)
Expand Down
2 changes: 1 addition & 1 deletion scripts/find-unused-exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
* limitations under the License.
*/

import fg from 'fast-glob';
import { existsSync } from 'node:fs';
import { join, relative } from 'node:path';
import fg from 'fast-glob';
import {
type ClassDeclaration,
type FunctionDeclaration,
Expand Down
4 changes: 2 additions & 2 deletions scripts/fix-directives.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
* bun scripts/fix-directives.ts --include=src/<glob>/*.{ts,tsx,js,jsx}
*/

import fs from 'node:fs/promises';
import path from 'node:path';
import { parse } from '@babel/parser';
import traverse from '@babel/traverse';
import fg from 'fast-glob';
import MagicString from 'magic-string';
import fs from 'node:fs/promises';
import path from 'node:path';

type Mode = 'auto' | 'client' | 'server';

Expand Down
2 changes: 1 addition & 1 deletion scripts/out/high.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
"date-fns",
"sanity",
"@effect/platform"
]
]
2 changes: 1 addition & 1 deletion scripts/out/low.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,4 @@
"@types/bun",
"@types/glob",
"@types/uuid"
]
]
2 changes: 1 addition & 1 deletion scripts/out/medium.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
"react-hook-form",
"react-day-picker",
"@vitest/ui"
]
]
16 changes: 10 additions & 6 deletions scripts/package-cost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@
* @version 1.1.0
*/

import { Stringify } from '@/utils';
import { exec } from 'node:child_process';
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
import { join } from 'node:path';
import { promisify } from 'node:util';
import type { PackageJson } from 'type-fest';
import { Stringify } from '@/utils';

const execPromise = promisify(exec);

Expand All @@ -46,7 +46,9 @@ const OUTPUT_DIR = `${process.cwd()}/scripts/out`;
/**
* Fetches the unpacked size of a given package from the npm registry.
*/
const getPackageSize = async (packageName: string): Promise<{ name: string; size: number } | null> => {
const getPackageSize = async (
packageName: string,
): Promise<{ name: string; size: number } | null> => {
try {
const { stdout } = await execPromise(`npm view ${packageName} dist.unpackedSize --json`);
const size = JSON.parse(stdout) as number;
Expand Down Expand Up @@ -75,7 +77,9 @@ console.log(`🚀 Starting package cost analysis for ${allDependencies.length} p

for (let i = 0; i < allDependencies.length; i += BATCH_SIZE) {
const batch = allDependencies.slice(i, i + BATCH_SIZE);
console.log(` Processing batch ${Math.floor(i / BATCH_SIZE) + 1}/${Math.ceil(allDependencies.length / BATCH_SIZE)}...`);
console.log(
` Processing batch ${Math.floor(i / BATCH_SIZE) + 1}/${Math.ceil(allDependencies.length / BATCH_SIZE)}...`,
);
const batchResults = await Promise.all(batch.map(getPackageSize));
results.push(...batchResults.filter(isNotNull));
}
Expand All @@ -100,17 +104,17 @@ mkdirSync(OUTPUT_DIR, { recursive: true });
writeFileSync(
`${OUTPUT_DIR}/high.json`,
Stringify([...categorizedPackages.high].map((e) => e.name)),
{ flag: 'w' }
{ flag: 'w' },
);
writeFileSync(
`${OUTPUT_DIR}/medium.json`,
Stringify([...categorizedPackages.medium].map((e) => e.name)),
{ flag: 'w' }
{ flag: 'w' },
);
writeFileSync(
`${OUTPUT_DIR}/low.json`,
Stringify([...categorizedPackages.low].map((e) => e.name)),
{ flag: 'w' }
{ flag: 'w' },
);

console.log('\n📦 Package Size Summary:');
Expand Down
2 changes: 1 addition & 1 deletion scripts/remove-duplicate-packages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
* @see {@link https://docs.npmjs.com/cli/v9/configuring-npm/package-json#devdependencies}
*/

import { Stringify } from '@/utils';
import { readFileSync, writeFileSync } from 'node:fs';
import { join } from 'node:path';
import type { PackageJson } from 'type-fest';
import { Stringify } from '@/utils';

/**
* The root directory of the project, determined by navigating up two levels from the current script's directory.
Expand Down
8 changes: 4 additions & 4 deletions src/app/(routes)/(dev)/media/_components/articles-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@
* limitations under the License.
*/

import type { Schema } from 'effect';
import { CalendarIcon, ExternalLinkIcon, UsersIcon } from 'lucide-react';
import { AnimatePresence, motion } from 'motion/react';
import { type JSX, Suspense } from 'react';
import { MagicCard } from '@/components/magicui';
import { Badge } from '@/components/ui/badge';
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
import { Skeleton } from '@/components/ui/skeleton';
import { type ArticleSchema, ArticlesSchema } from '@/hooks/sanity/schemas';
import { DataLoader } from '@/providers/server/effect-data-loader';
import { formatDate } from '@/utils/date';
import type { Schema } from 'effect';
import { CalendarIcon, ExternalLinkIcon, UsersIcon } from 'lucide-react';
import { AnimatePresence, motion } from 'motion/react';
import { type JSX, Suspense } from 'react';

/**
* @function ArticlesSection
Expand Down
12 changes: 6 additions & 6 deletions src/app/(routes)/(dev)/media/_components/blog-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@
* limitations under the License.
*/

import { MagicCard } from '@/components/magicui';
import { Badge } from '@/components/ui/badge';
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
import { Skeleton } from '@/components/ui/skeleton';
import { DataLoader } from '@/providers/server/effect-data-loader';
import { formatDate } from '@/utils/date';
import { Schema } from 'effect';
import { AnimatePresence, motion } from 'framer-motion';
import { CalendarIcon } from 'lucide-react';
import Image from 'next/image';
import Link from 'next/link';
import { type JSX, Suspense } from 'react';
import { SiDevdotto, SiHashnode } from 'react-icons/si';
import { MagicCard } from '@/components/magicui';
import { Badge } from '@/components/ui/badge';
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
import { Skeleton } from '@/components/ui/skeleton';
import { DataLoader } from '@/providers/server/effect-data-loader';
import { formatDate } from '@/utils/date';

/**
* Blog post schema for Effect validation
Expand Down
4 changes: 2 additions & 2 deletions src/app/(routes)/(dev)/media/_components/media-tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
* limitations under the License.
*/

import { PageHeader } from '@/components/custom/page-header';
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';
import { useQueryState } from 'nuqs';
import type { ComponentType, JSX } from 'react';
import type { IconBaseProps } from 'react-icons';
import { FiFileText, FiMic, FiMonitor, FiRss, FiVideo } from 'react-icons/fi';
import { PageHeader } from '@/components/custom/page-header';
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';
import { ArticlesSection } from './articles-section';
import { BlogSection } from './blog-section';
import { PresentationsSection } from './presentations-section';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@
* limitations under the License.
*/

import { MagicCard } from '@/components/magicui';
import { Badge } from '@/components/ui/badge';
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
import { Skeleton } from '@/components/ui/skeleton';
import { type PresentationSchema, PresentationsSchema } from '@/hooks/sanity/schemas';
import { DataLoader } from '@/providers/server/effect-data-loader';
import { formatDate } from '@/utils/date';
import type { Schema } from 'effect';
import {
CalendarIcon,
Expand All @@ -33,6 +26,13 @@ import {
} from 'lucide-react';
import { AnimatePresence, motion } from 'motion/react';
import { type JSX, Suspense } from 'react';
import { MagicCard } from '@/components/magicui';
import { Badge } from '@/components/ui/badge';
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
import { Skeleton } from '@/components/ui/skeleton';
import { type PresentationSchema, PresentationsSchema } from '@/hooks/sanity/schemas';
import { DataLoader } from '@/providers/server/effect-data-loader';
import { formatDate } from '@/utils/date';

/**
* Helper to get the slides link based on format
Expand Down
14 changes: 7 additions & 7 deletions src/app/(routes)/(dev)/media/_components/talks-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@
* limitations under the License.
*/

import { MagicCard } from '@/components/magicui';
import { Badge } from '@/components/ui/badge';
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
import { Skeleton } from '@/components/ui/skeleton';
import { type TalkSchema, TalksSchema } from '@/hooks/sanity/schemas';
import { DataLoader } from '@/providers/server/effect-data-loader';
import { formatDate } from '@/utils/date';
import type { Schema } from 'effect';
import {
CalendarIcon,
Expand All @@ -34,6 +27,13 @@ import {
import { AnimatePresence, motion } from 'motion/react';
import { type JSX, Suspense } from 'react';
import { SiVimeo, SiYoutube } from 'react-icons/si';
import { MagicCard } from '@/components/magicui';
import { Badge } from '@/components/ui/badge';
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
import { Skeleton } from '@/components/ui/skeleton';
import { type TalkSchema, TalksSchema } from '@/hooks/sanity/schemas';
import { DataLoader } from '@/providers/server/effect-data-loader';
import { formatDate } from '@/utils/date';

/**
* Helper to get the video link with appropriate icon based on format
Expand Down
12 changes: 6 additions & 6 deletions src/app/(routes)/(dev)/media/_components/videos-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@
* limitations under the License.
*/

import type { Schema } from 'effect';
import { CalendarIcon, ClockIcon, ExternalLinkIcon } from 'lucide-react';
import { AnimatePresence, motion } from 'motion/react';
import Image from 'next/image';
import { type JSX, Suspense } from 'react';
import { SiYoutube } from 'react-icons/si';
import { MagicCard } from '@/components/magicui';
import { Badge } from '@/components/ui/badge';
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
import { Skeleton } from '@/components/ui/skeleton';
import { type YoutubeVideoSchema, YoutubeVideosSchema } from '@/hooks/sanity/schemas';
import { DataLoader } from '@/providers/server/effect-data-loader';
import { formatDate } from '@/utils/date';
import type { Schema } from 'effect';
import { CalendarIcon, ClockIcon, ExternalLinkIcon } from 'lucide-react';
import { AnimatePresence, motion } from 'motion/react';
import Image from 'next/image';
import { type JSX, Suspense } from 'react';
import { SiYoutube } from 'react-icons/si';

/**
* @function VideosSection
Expand Down
2 changes: 1 addition & 1 deletion src/app/(routes)/(dev)/media/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/

import { constructMetadata } from '@/utils';
import dynamic from 'next/dynamic';
import type { JSX } from 'react';
import { constructMetadata } from '@/utils';

const MediaView = dynamic(
() => import('@/app/(routes)/(dev)/media/_interface/media').then((mod) => mod.MediaView),
Expand Down
2 changes: 1 addition & 1 deletion src/app/(routes)/(dev)/sponsor/_interface/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
* limitations under the License.
*/

export { Sponsor, default } from './sponsor';
export { default, Sponsor } from './sponsor';
2 changes: 1 addition & 1 deletion src/app/(routes)/(dev)/sponsor/_interface/sponsor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
* limitations under the License.
*/

export { Sponsor, default } from './sponsor';
export { default, Sponsor } from './sponsor';
10 changes: 5 additions & 5 deletions src/app/(routes)/(dev)/sponsor/_interface/sponsor/sponsor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
* limitations under the License.
*/

import { Coffee, ExternalLink, Gift, Heart, Mail, Sparkles, Users } from 'lucide-react';
import { motion } from 'motion/react';
import Image from 'next/image';
import { useMemo } from 'react';
import { SiBuymeacoffee, SiGithubsponsors, SiKofi, SiOpencollective } from 'react-icons/si';
import { MagicCard, PageHeader } from '@/components';
import Layout from '@/components/layout/layout';
import { Badge } from '@/components/ui/badge';
Expand All @@ -25,11 +30,6 @@ import { Skeleton } from '@/components/ui/skeleton';
import { emailHref } from '@/constants';
import { useGitHubSponsors } from '@/hooks/use-github-sponsors';
import type { Sponsor as SponsorType } from '@/hooks/use-github-sponsors.types';
import { Coffee, ExternalLink, Gift, Heart, Mail, Sparkles, Users } from 'lucide-react';
import { motion } from 'motion/react';
import Image from 'next/image';
import { useMemo } from 'react';
import { SiBuymeacoffee, SiGithubsponsors, SiKofi, SiOpencollective } from 'react-icons/si';

const sponsorPlatforms = [
{
Expand Down
Loading
Loading