Skip to content

Commit

Permalink
chore(deps): 🔗 bump packages and add serwist
Browse files Browse the repository at this point in the history
  • Loading branch information
gracefullight committed Sep 8, 2024
1 parent 6b845bd commit cb1f1fc
Show file tree
Hide file tree
Showing 11 changed files with 2,368 additions and 4,154 deletions.
2 changes: 2 additions & 0 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@
"placehold",
"pnpx",
"pravatar",
"Precache",
"prettiercache",
"Redoc",
"SAMEORIGIN",
"serwist",
"signin",
"superjson",
"tailwindcss",
Expand Down
15 changes: 6 additions & 9 deletions apps/web/next.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import withPWAInit from "@ducanh2912/next-pwa";
import withBundleAnalyzer from "@next/bundle-analyzer";
// @ts-ignore
import { PrismaPlugin } from "@prisma/nextjs-monorepo-workaround-plugin";
import { withSentryConfig } from "@sentry/nextjs";
import withSerwistInit from "@serwist/next";
/**
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially useful
* for Docker builds.
Expand Down Expand Up @@ -96,18 +96,15 @@ const config = {
},
};

// ? https://ducanh-next-pwa.vercel.app/docs/next-pwa/configuring
/** @type {import("@ducanh2912/next-pwa").PluginOptions} */
const pwaConfig = {
dest: "public",
reloadOnOnline: true,
};
const withSerwist = withSerwistInit({
swSrc: "app/sw.ts",
swDest: "public/sw.js",
});

const withPWA = withPWAInit(pwaConfig);
const withBA = withBundleAnalyzer({ enabled: false, openAnalyzer: false });

export default withSentryConfig(
withPWA(withBA(config)),
withSerwist(withBA(config)),
{
// For all available options, see:
// https://github.com/getsentry/sentry-webpack-plugin#options
Expand Down
52 changes: 27 additions & 25 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,34 +16,35 @@
"dependencies": {
"@doss/db": "workspace:*",
"@doss/ui": "workspace:*",
"@ducanh2912/next-pwa": "^10.2.7",
"@ducanh2912/next-pwa": "^10.2.8",
"@next-auth/prisma-adapter": "^1.0.7",
"@next/bundle-analyzer": "^14.2.4",
"@sentry/nextjs": "^8.13.0",
"@t3-oss/env-nextjs": "^0.10.1",
"@tanstack/react-query": "^5.48.0",
"@tanstack/react-query-devtools": "^5.48.0",
"@next/bundle-analyzer": "^14.2.8",
"@sentry/nextjs": "^8.28.0",
"@serwist/next": "^9.0.7",
"@t3-oss/env-nextjs": "^0.11.1",
"@tanstack/react-query": "^5.55.1",
"@tanstack/react-query-devtools": "^5.55.1",
"@trpc/client": "next",
"@trpc/next": "next",
"@trpc/react-query": "next",
"@trpc/server": "next",
"@vercel/analytics": "^1.3.1",
"@vercel/otel": "^1.9.1",
"@vercel/otel": "^1.10.0",
"@vercel/speed-insights": "^1.0.12",
"ahooks": "^3.8.0",
"apexcharts": "^3.49.2",
"ahooks": "^3.8.1",
"apexcharts": "^3.53.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"framer-motion": "^11.2.12",
"framer-motion": "^11.5.4",
"html2canvas": "^1.4.1",
"lodash-es": "^4.17.21",
"lucide-react": "^0.399.0",
"luxon": "^3.4.4",
"next": "^14.2.4",
"lucide-react": "^0.439.0",
"luxon": "^3.5.0",
"next": "^14.2.8",
"next-auth": "^4.24.7",
"path-to-regexp": "^7.0.0",
"pino": "^9.2.0",
"pino-pretty": "^11.2.1",
"path-to-regexp": "^8.0.0",
"pino": "^9.4.0",
"pino-pretty": "^11.2.2",
"react": "^18.3.1",
"react-apexcharts": "^1.4.1",
"react-dom": "^18.3.1",
Expand All @@ -57,21 +58,22 @@
"devDependencies": {
"@doss/tailwind-config": "workspace:*",
"@doss/tsconfig": "workspace:*",
"@prisma/nextjs-monorepo-workaround-plugin": "^5.16.1",
"@testing-library/react": "^16.0.0",
"@prisma/nextjs-monorepo-workaround-plugin": "^5.19.1",
"@testing-library/react": "^16.0.1",
"@types/lodash-es": "^4.17.12",
"@types/luxon": "^3.4.2",
"@types/node": "*",
"@types/react": "^18.3.3",
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react-swc": "^3.7.0",
"autoprefixer": "^10.4.19",
"autoprefixer": "^10.4.20",
"dotenv-cli": "^7.4.2",
"jsdom": "^24.1.0",
"postcss": "^8.4.38",
"tailwindcss": "^3.4.4",
"type-fest": "^4.20.1",
"typescript": "^5.5.2",
"jsdom": "^25.0.0",
"postcss": "^8.4.45",
"serwist": "^9.0.7",
"tailwindcss": "^3.4.10",
"type-fest": "^4.26.1",
"typescript": "^5.5.4",
"vitest": "*"
},
"ct3aMetadata": {
Expand Down
4 changes: 1 addition & 3 deletions apps/web/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,7 @@ export default function RootLayout({ children }: { children: ReactNode }) {
return (
<html lang="ko">
<body className={`font-sans ${notoSansKR.variable}`}>
<TRPCReactProvider cookies={cookies().toString()}>
{children}
</TRPCReactProvider>
<TRPCReactProvider>{children}</TRPCReactProvider>
<Analytics />
<SpeedInsights />
</body>
Expand Down
25 changes: 25 additions & 0 deletions apps/web/src/app/sw.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { defaultCache } from "@serwist/next/worker";
import type { PrecacheEntry, SerwistGlobalConfig } from "serwist";
import { Serwist } from "serwist";

// This declares the value of `injectionPoint` to TypeScript.
// `injectionPoint` is the string that will be replaced by the
// actual precache manifest. By default, this string is set to
// `"self.__SW_MANIFEST"`.
declare global {
interface WorkerGlobalScope extends SerwistGlobalConfig {
__SW_MANIFEST: (PrecacheEntry | string)[] | undefined;
}
}

declare const self: ServiceWorkerGlobalScope;

const serwist = new Serwist({
precacheEntries: self.__SW_MANIFEST,
skipWaiting: true,
clientsClaim: true,
navigationPreload: true,
runtimeCaching: defaultCache,
});

serwist.addEventListeners();
4 changes: 3 additions & 1 deletion apps/web/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"baseUrl": ".",
"paths": {
"~/*": ["./src/*"]
}
},
"lib": ["dom", "dom.iterable", "ES2022", "WebWorker"],
"types": ["@serwist/next/typings"]
},
"include": [".", ".next/types/**/*.ts"],
"exclude": ["node_modules", "public/*.js"]
Expand Down
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,23 @@
},
"devDependencies": {
"@biomejs/biome": "^1.8.3",
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"@commitlint/cli": "^19.4.1",
"@commitlint/config-conventional": "^19.4.1",
"@commitlint/types": "^19.0.3",
"@doss/tsconfig": "workspace:*",
"@types/node": "^20.14.9",
"@vitest/coverage-v8": "^1.6.0",
"@vitest/ui": "^1.6.0",
"@types/node": "^20.16.5",
"@vitest/coverage-v8": "^2.0.5",
"@vitest/ui": "^2.0.5",
"devmoji": "^2.3.0",
"husky": "^9.0.11",
"lint-staged": "^15.2.7",
"oxlint": "^0.5.0",
"sort-package-json": "^2.10.0",
"turbo": "^2.0.6",
"typescript": "^5.5.2",
"vitest": "^1.6.0"
"husky": "^9.1.5",
"lint-staged": "^15.2.10",
"oxlint": "^0.9.3",
"sort-package-json": "^2.10.1",
"turbo": "^2.1.1",
"typescript": "^5.5.4",
"vitest": "^2.0.5"
},
"packageManager": "pnpm@9.4.0",
"packageManager": "pnpm@9.9.0",
"engines": {
"node": "20"
},
Expand Down
13 changes: 8 additions & 5 deletions packages/config/tailwind/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@
"version": "0.1.0",
"private": true,
"main": "index.ts",
"files": ["index.ts", "postcss.js"],
"files": [
"index.ts",
"postcss.js"
],
"scripts": {
"clean": "rm -rf .turbo node_modules"
},
"devDependencies": {
"@tailwindcss/typography": "^0.5.13",
"autoprefixer": "^10.4.19",
"@tailwindcss/typography": "^0.5.15",
"autoprefixer": "^10.4.20",
"daisyui": "^4.12.10",
"postcss": "^8.4.38",
"tailwindcss": "^3.4.4"
"postcss": "^8.4.45",
"tailwindcss": "^3.4.10"
}
}
8 changes: 4 additions & 4 deletions packages/db/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
"with-env": "dotenv -e ../../.env --"
},
"dependencies": {
"@prisma/client": "^5.16.1"
"@prisma/client": "^5.19.1"
},
"devDependencies": {
"@doss/tsconfig": "workspace:*",
"@types/node": "*",
"dotenv-cli": "^7.4.2",
"prisma": "^5.16.1",
"tsx": "^4.15.9",
"typescript": "^5.5.2"
"prisma": "^5.19.1",
"tsx": "^4.19.0",
"typescript": "^5.5.4"
},
"prisma": {
"seed": "pnpm db:seed"
Expand Down
46 changes: 23 additions & 23 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,40 +17,40 @@
"preview-storybook": "serve storybook-static"
},
"devDependencies": {
"@chromatic-com/storybook": "^1.6.0",
"@chromatic-com/storybook": "^1.9.0",
"@doss/tailwind-config": "workspace:*",
"@doss/tsconfig": "workspace:*",
"@storybook/addon-actions": "^8.1.11",
"@storybook/addon-designs": "^8.0.2",
"@storybook/addon-essentials": "^8.1.11",
"@storybook/addon-interactions": "^8.1.11",
"@storybook/addon-links": "^8.1.11",
"@storybook/addon-themes": "^8.1.11",
"@storybook/manager-api": "^8.1.11",
"@storybook/react": "^8.1.11",
"@storybook/react-vite": "^8.1.11",
"@storybook/test": "^8.1.11",
"@storybook/theming": "^8.1.11",
"@types/react": "^18.3.3",
"@storybook/addon-actions": "^8.2.9",
"@storybook/addon-designs": "^8.0.3",
"@storybook/addon-essentials": "^8.2.9",
"@storybook/addon-interactions": "^8.2.9",
"@storybook/addon-links": "^8.2.9",
"@storybook/addon-themes": "^8.2.9",
"@storybook/manager-api": "^8.2.9",
"@storybook/react": "^8.2.9",
"@storybook/react-vite": "^8.2.9",
"@storybook/test": "^8.2.9",
"@storybook/theming": "^8.2.9",
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react-swc": "^3.7.0",
"autoprefixer": "^10.4.19",
"chromatic": "^11.5.4",
"autoprefixer": "^10.4.20",
"chromatic": "^11.7.1",
"class-variance-authority": "^0.7.0",
"concurrently": "^8.2.2",
"postcss": "^8.4.38",
"concurrently": "^9.0.0",
"postcss": "^8.4.45",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"serve": "^14.2.3",
"storybook": "^8.1.11",
"tailwindcss": "^3.4.4",
"tsup": "^8.1.0",
"typescript": "^5.5.2",
"vite": "^5.3.2"
"storybook": "^8.2.9",
"tailwindcss": "^3.4.10",
"tsup": "^8.2.4",
"typescript": "^5.5.4",
"vite": "^5.4.3"
},
"peerDependencies": {
"react": "^18.3.1",
"react-dom": "^18.3.1",
"tailwindcss": "^3.4.4"
"tailwindcss": "^3.4.10"
}
}
Loading

0 comments on commit cb1f1fc

Please sign in to comment.