diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 1cd874d1..122c9d6b 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -4,23 +4,24 @@ on: [push] jobs: build: - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [8.x, 10.x, 12.x] - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + - uses: actions/checkout@v7 + + - uses: pnpm/action-setup@v6 with: - node-version: ${{ matrix.node-version }} - - name: npm install, build, and test + version: 9.15.0 + + - name: Use Node.js 22.x + uses: actions/setup-node@v7 + with: + node-version: 22.x + cache: pnpm + + - name: Install and build run: | - npm install - npm run build --if-present - npm test + pnpm install --frozen-lockfile + pnpm build env: CI: true diff --git a/components/CommandMenu/index.tsx b/components/CommandMenu/index.tsx index f039b8a5..53e0c3d0 100644 --- a/components/CommandMenu/index.tsx +++ b/components/CommandMenu/index.tsx @@ -1,7 +1,7 @@ import React from "react" import { useRouter } from "next/router" import { Command } from "cmdk" -import tinykeys from "tinykeys" +import { tinykeys } from "tinykeys" import useOnClickOutside from "use-onclickoutside" import { useTheme } from "next-themes" import Home from "@ui/Icons/home" diff --git a/components/PageTitle/index.tsx b/components/PageTitle/index.tsx index eec2bdbc..00b38657 100644 --- a/components/PageTitle/index.tsx +++ b/components/PageTitle/index.tsx @@ -1,4 +1,4 @@ -import { Unbounded } from '@next/font/google' +import { Unbounded } from 'next/font/google' import { styled } from 'stitches.config' const Title = styled('h1', { @@ -9,7 +9,7 @@ const Title = styled('h1', { transition: 'color 0.25s ease', }) -const unbounded = Unbounded() +const unbounded = Unbounded({ subsets: ['latin'] }) type ContainerProps = { children: React.ReactNode diff --git a/lib/bookmarks.ts b/lib/bookmarks.ts index fad450e9..5c119ad4 100644 --- a/lib/bookmarks.ts +++ b/lib/bookmarks.ts @@ -4,6 +4,10 @@ const PER_PAGE = 50 export const fetchBookmarks = async (page = 0): Promise => { + if (!process.env.RAINDROP_COLLECTION || !process.env.RAINDROP_TOKEN) { + return [] + } + const req = await fetch( `https://api.raindrop.io/rest/v1/raindrops/${process.env.RAINDROP_COLLECTION}?sort=-created&search=type:link&perpage=${PER_PAGE}&page=${page}`, { diff --git a/lib/reading.ts b/lib/reading.ts index ffc57d9d..c209f043 100644 --- a/lib/reading.ts +++ b/lib/reading.ts @@ -4,6 +4,10 @@ const PER_PAGE = 50 export const fetchReading = async (page = 0): Promise => { + if (!process.env.RAINDROP_COLLECTION || !process.env.RAINDROP_TOKEN) { + return [] + } + const req = await fetch( `https://api.raindrop.io/rest/v1/raindrops/${process.env.RAINDROP_COLLECTION}?sort=-created&search=type:article&perpage=${PER_PAGE}&page=${page}`, { diff --git a/next.config.js b/next.config.js index 67354aeb..a622f03f 100644 --- a/next.config.js +++ b/next.config.js @@ -35,9 +35,6 @@ module.exports = withPlausibleProxy()( }, experimental: { largePageDataBytes: 256 * 100000, // 12800KB by default - fontLoaders: [ - { loader: '@next/font/google', options: { subsets: ['latin'] } } - ] }, async redirects() { return [ diff --git a/package.json b/package.json index 053f0ffa..08c4bf41 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ }, "dependencies": { "@acab/reset.css": "^0.11.0", - "@calcom/embed-react": "1.5.1", + "@calcom/embed-react": "1.5.3", "@next/font": "^14.2.15", "@notionhq/client": "1.0.4", "@plaiceholder/next": "3.0.0", diff --git a/pages/_app.tsx b/pages/_app.tsx index 94123daf..cd5dbeb4 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -8,11 +8,11 @@ import { SpeedInsights } from "@vercel/speed-insights/next" import PlausibleProvider from 'next-plausible' import { DefaultSeo } from 'next-seo' import SEO from '../next-seo.config' -import { Albert_Sans } from '@next/font/google' +import { Albert_Sans } from 'next/font/google' import { globalStyles } from '@styles/global' import '@styles/reset.css' -const Albert = Albert_Sans() +const Albert = Albert_Sans({ subsets: ['latin'] }) export default function App({ Component, pageProps }: AppProps) { globalStyles() diff --git a/pages/gear.tsx b/pages/gear.tsx index e27eb92e..5ddd5031 100644 --- a/pages/gear.tsx +++ b/pages/gear.tsx @@ -64,6 +64,9 @@ export default function Gear({ list }) { //notion API export async function getStaticProps() { + if (!process.env.NOTION_API_KEY) { + return { props: { list: [] } } + } const notion = new Client({ auth: process.env.NOTION_API_KEY }) const response = await notion.databases.query({ diff --git a/pages/newsletters.tsx b/pages/newsletters.tsx index 0464ea7a..d10591ee 100644 --- a/pages/newsletters.tsx +++ b/pages/newsletters.tsx @@ -60,6 +60,9 @@ export default function Newsletters({ list }) { } //notion API export async function getStaticProps() { + if (!process.env.NOTION_API_KEY) { + return { props: { list: [] } } + } const notion = new Client({ auth: process.env.NOTION_API_KEY }) const response = await notion.databases.query({ diff --git a/pages/podcasts.tsx b/pages/podcasts.tsx index 020dfe87..abca5135 100644 --- a/pages/podcasts.tsx +++ b/pages/podcasts.tsx @@ -75,6 +75,9 @@ export default function Podcasts({ list }) { } //notion API export async function getStaticProps() { + if (!process.env.NOTION_API_KEY) { + return { props: { list: [] } } + } const notion = new Client({ auth: process.env.NOTION_API_KEY }) const response = await notion.databases.query({ diff --git a/pages/stack.tsx b/pages/stack.tsx index 65fb43aa..0bb4f39a 100644 --- a/pages/stack.tsx +++ b/pages/stack.tsx @@ -55,6 +55,9 @@ export default function Stack({ list }) { } //notion API export async function getStaticProps() { + if (!process.env.NOTION_API_KEY) { + return { props: { list: [] } } + } const notion = new Client({ auth: process.env.NOTION_API_KEY }) const response = await notion.databases.query({ diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7c6da6a1..def24d64 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,8 +12,8 @@ importers: specifier: ^0.11.0 version: 0.11.0 '@calcom/embed-react': - specifier: 1.5.1 - version: 1.5.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + specifier: 1.5.3 + version: 1.5.3(react-dom@19.0.0(react@19.0.0))(react@19.0.0) '@next/font': specifier: ^14.2.15 version: 14.2.15(next@15.1.0(@babel/core@7.26.0)(@opentelemetry/api@1.9.0)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)) @@ -676,17 +676,17 @@ packages: '@babel/types@7.8.3': resolution: {integrity: sha512-jBD+G8+LWpMBBWvVcdr4QysjUE4mU/syrhN17o1u3gx0/WzJB1kwiVZAXRtWbsIPOwW8pF/YJV5+nmetPzepXg==} - '@calcom/embed-core@1.5.1': - resolution: {integrity: sha512-wykzh1GKj5xhGxDJeCRJ7OulAgn9GVMYD/mmOBbvn06c3m9Lqoqn09E5kJ+DY+aokUncQPcstNsdiHsURjMuVw==} + '@calcom/embed-core@1.5.3': + resolution: {integrity: sha512-GeId9gaByJ5EWiPmuvelZOvFWPOTWkcWZr5vGTCbIUTX125oE5yn0n8lDF1MJk5Xj1WO+/dk9jKIE08Ad9ytiQ==} - '@calcom/embed-react@1.5.1': - resolution: {integrity: sha512-vwRtaO/WbBLrXQbKek333BoY/0GMRVRxOva9VhRPmtC8kyT9pAw/IfKA+26gDtfE25XCx9nqdPIghUJQr+niUw==} + '@calcom/embed-react@1.5.3': + resolution: {integrity: sha512-JCgge04pc8fhdvUmPNVLhW8/lCWK+AAziKecKWWPfv1nn2s+qKP2BwsEAnxhxK9yPOBgE1EIEgmYkrrNB1iajA==} peerDependencies: - react: ^18.2.0 - react-dom: ^18.2.0 + react: ^18.2.0 || ^19.0.0 + react-dom: ^18.2.0 || ^19.0.0 - '@calcom/embed-snippet@1.3.1': - resolution: {integrity: sha512-OmUAmwZt41I7vfKk9SqLMpCBxj91BHZ27NXFARSbECpw7MXcGHm2a4l1oqeuOe0vdRT27qDmKz/ccvKI0x/ttw==} + '@calcom/embed-snippet@1.3.3': + resolution: {integrity: sha512-pqqKaeLB8R6BvyegcpI9gAyY6Xyx1bKYfWvIGOvIbTpguWyM1BBBVcT9DCeGe8Zw7Ujp5K56ci7isRUrT2Uadg==} '@emnapi/runtime@1.3.1': resolution: {integrity: sha512-kEBmG8KyqtxJZv+ygbEim+KCGtIq1fC22Ms3S4ziXmYKm8uyoLX0MHONVKwp+9opg390VaKRNt4a7A9NwmpNhw==} @@ -5237,18 +5237,18 @@ snapshots: lodash: 4.17.21 to-fast-properties: 2.0.0 - '@calcom/embed-core@1.5.1': {} + '@calcom/embed-core@1.5.3': {} - '@calcom/embed-react@1.5.1(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': + '@calcom/embed-react@1.5.3(react-dom@19.0.0(react@19.0.0))(react@19.0.0)': dependencies: - '@calcom/embed-core': 1.5.1 - '@calcom/embed-snippet': 1.3.1 + '@calcom/embed-core': 1.5.3 + '@calcom/embed-snippet': 1.3.3 react: 19.0.0 react-dom: 19.0.0(react@19.0.0) - '@calcom/embed-snippet@1.3.1': + '@calcom/embed-snippet@1.3.3': dependencies: - '@calcom/embed-core': 1.5.1 + '@calcom/embed-core': 1.5.3 '@emnapi/runtime@1.3.1': dependencies: @@ -6926,7 +6926,7 @@ snapshots: '@typescript-eslint/parser': 7.2.0(eslint@9.16.0)(typescript@5.7.2) eslint: 9.16.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.7.0(eslint-plugin-import@2.31.0)(eslint@9.16.0) + eslint-import-resolver-typescript: 3.7.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.2.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0))(eslint@9.16.0) eslint-plugin-import: 2.31.0(@typescript-eslint/parser@7.2.0(eslint@9.16.0)(typescript@5.7.2))(eslint-import-resolver-typescript@3.7.0)(eslint@9.16.0) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.16.0) eslint-plugin-react: 7.37.2(eslint@9.16.0) @@ -6950,7 +6950,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.7.0(eslint-plugin-import@2.31.0)(eslint@9.16.0): + eslint-import-resolver-typescript@3.7.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.2.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0))(eslint@9.16.0): dependencies: '@nolyfill/is-core-module': 1.0.39 debug: 4.4.0 @@ -6966,14 +6966,14 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.0(@typescript-eslint/parser@7.2.0(eslint@9.16.0)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.7.0)(eslint@9.16.0): + eslint-module-utils@2.12.0(@typescript-eslint/parser@7.2.0(eslint@9.16.0)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.7.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.2.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0))(eslint@9.16.0))(eslint@9.16.0): dependencies: debug: 3.2.7 optionalDependencies: '@typescript-eslint/parser': 7.2.0(eslint@9.16.0)(typescript@5.7.2) eslint: 9.16.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.7.0(eslint-plugin-import@2.31.0)(eslint@9.16.0) + eslint-import-resolver-typescript: 3.7.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.2.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0))(eslint@9.16.0) transitivePeerDependencies: - supports-color @@ -6988,7 +6988,7 @@ snapshots: doctrine: 2.1.0 eslint: 9.16.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@7.2.0(eslint@9.16.0)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.7.0)(eslint@9.16.0) + eslint-module-utils: 2.12.0(@typescript-eslint/parser@7.2.0(eslint@9.16.0)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.7.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@7.2.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0))(eslint@9.16.0))(eslint@9.16.0) hasown: 2.0.2 is-core-module: 2.15.1 is-glob: 4.0.3