From 17d2d5541711abe5a1cf9591fcd9d7316277c465 Mon Sep 17 00:00:00 2001 From: bigint <69431456+bigint@users.noreply.github.com> Date: Sun, 21 Apr 2024 21:53:56 +0530 Subject: [PATCH] chore: update deps --- apps/api/src/lib/sitemap/buildSitemap.ts | 3 - apps/api/src/lib/sitemap/getLastModDate.ts | 8 -- apps/api/src/routes/sitemap/others.xml.ts | 7 +- .../src/routes/sitemap/profiles/[id].xml.ts | 12 +- .../routes/sitemap/publications/[id].xml.ts | 12 +- apps/web/package.json | 2 +- pnpm-lock.yaml | 116 +++++++++--------- 7 files changed, 66 insertions(+), 94 deletions(-) delete mode 100644 apps/api/src/lib/sitemap/getLastModDate.ts diff --git a/apps/api/src/lib/sitemap/buildSitemap.ts b/apps/api/src/lib/sitemap/buildSitemap.ts index 8b264475e9e8..84ff9527e825 100644 --- a/apps/api/src/lib/sitemap/buildSitemap.ts +++ b/apps/api/src/lib/sitemap/buildSitemap.ts @@ -8,10 +8,7 @@ const builder = new XMLBuilder({ }); interface Url { - changefreq: string; - lastmod: string; loc: string; - priority: number; } export const buildUrlsetXml = (url: Url[]): string => { diff --git a/apps/api/src/lib/sitemap/getLastModDate.ts b/apps/api/src/lib/sitemap/getLastModDate.ts deleted file mode 100644 index 38361825e41c..000000000000 --- a/apps/api/src/lib/sitemap/getLastModDate.ts +++ /dev/null @@ -1,8 +0,0 @@ -const getLastModDate = (date: Date): string => - date.toLocaleDateString('en-CA', { - day: '2-digit', - month: '2-digit', - year: 'numeric' - }); - -export default getLastModDate; diff --git a/apps/api/src/routes/sitemap/others.xml.ts b/apps/api/src/routes/sitemap/others.xml.ts index 1fd0e10f74da..1d728b120978 100644 --- a/apps/api/src/routes/sitemap/others.xml.ts +++ b/apps/api/src/routes/sitemap/others.xml.ts @@ -18,12 +18,7 @@ export const get: Handler = (req, res) => { 'https://hey.xyz/rules' ]; - const entries = sitemaps.map((sitemap) => ({ - changefreq: 'daily', - lastmod: new Date().toISOString(), - loc: sitemap, - priority: 0.5 - })); + const entries = sitemaps.map((sitemap) => ({ loc: sitemap })); const xml = buildUrlsetXml(entries); logger.info(`Lens: Fetched other sitemaps from user-agent: ${user_agent}`); diff --git a/apps/api/src/routes/sitemap/profiles/[id].xml.ts b/apps/api/src/routes/sitemap/profiles/[id].xml.ts index 185ed966e66d..e72ef030cd5a 100644 --- a/apps/api/src/routes/sitemap/profiles/[id].xml.ts +++ b/apps/api/src/routes/sitemap/profiles/[id].xml.ts @@ -6,7 +6,6 @@ import { SITEMAP_BATCH_SIZE } from 'src/lib/constants'; import lensPrisma from 'src/lib/lensPrisma'; import { noBody } from 'src/lib/responses'; import { buildUrlsetXml } from 'src/lib/sitemap/buildSitemap'; -import getLastModDate from 'src/lib/sitemap/getLastModDate'; export const config = { api: { responseLimit: '8mb' } @@ -24,20 +23,15 @@ export const get: Handler = async (req, res) => { try { const offset = (Number(batch) - 1) * SITEMAP_BATCH_SIZE; - const response = await lensPrisma.$queryRaw< - { block_timestamp: Date; local_name: string }[] - >` - SELECT local_name, block_timestamp FROM namespace.handle + const response = await lensPrisma.$queryRaw<{ local_name: string }[]>` + SELECT local_name FROM namespace.handle ORDER BY block_timestamp ASC LIMIT ${SITEMAP_BATCH_SIZE} OFFSET ${offset}; `; const entries = response.map((handle) => ({ - changefreq: 'daily', - lastmod: getLastModDate(handle.block_timestamp), - loc: `https://hey.xyz/u/${handle.local_name}`, - priority: 0.5 + loc: `https://hey.xyz/u/${handle.local_name}` })); const xml = buildUrlsetXml(entries); diff --git a/apps/api/src/routes/sitemap/publications/[id].xml.ts b/apps/api/src/routes/sitemap/publications/[id].xml.ts index 67cb854d55bf..186439434fbf 100644 --- a/apps/api/src/routes/sitemap/publications/[id].xml.ts +++ b/apps/api/src/routes/sitemap/publications/[id].xml.ts @@ -6,7 +6,6 @@ import { SITEMAP_BATCH_SIZE } from 'src/lib/constants'; import lensPrisma from 'src/lib/lensPrisma'; import { noBody } from 'src/lib/responses'; import { buildUrlsetXml } from 'src/lib/sitemap/buildSitemap'; -import getLastModDate from 'src/lib/sitemap/getLastModDate'; export const config = { api: { responseLimit: '8mb' } @@ -24,10 +23,8 @@ export const get: Handler = async (req, res) => { try { const offset = (Number(batch) - 1) * SITEMAP_BATCH_SIZE; - const response = await lensPrisma.$queryRaw< - { block_timestamp: Date; publication_id: string }[] - >` - SELECT publication_id, block_timestamp FROM publication.record + const response = await lensPrisma.$queryRaw<{ publication_id: string }[]>` + SELECT publication_id FROM publication.record WHERE publication_type IN ('POST', 'QUOTE') ORDER BY block_timestamp ASC LIMIT ${SITEMAP_BATCH_SIZE} @@ -35,10 +32,7 @@ export const get: Handler = async (req, res) => { `; const entries = response.map((publication) => ({ - changefreq: 'daily', - lastmod: getLastModDate(publication.block_timestamp), - loc: `https://hey.xyz/posts/${publication.publication_id}`, - priority: 0.5 + loc: `https://hey.xyz/posts/${publication.publication_id}` })); const xml = buildUrlsetXml(entries); diff --git a/apps/web/package.json b/apps/web/package.json index 412bc398d05b..68e54e971237 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -68,7 +68,7 @@ "react-hot-toast": "^2.4.1", "react-markdown": "^9.0.0", "react-tracked": "^1.7.14", - "react-virtuoso": "^4.7.9", + "react-virtuoso": "^4.7.10", "remark-breaks": "^4.0.0", "remark-linkify-regex": "^1.2.1", "strip-markdown": "^6.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bf4d37f7b48a..10cd6f7379c8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -335,8 +335,8 @@ importers: specifier: ^1.7.14 version: 1.7.14(react-dom@18.2.0)(react-native@0.73.7)(react@18.2.0)(scheduler@0.23.0) react-virtuoso: - specifier: ^4.7.9 - version: 4.7.9(react-dom@18.2.0)(react@18.2.0) + specifier: ^4.7.10 + version: 4.7.10(react-dom@18.2.0)(react@18.2.0) remark-breaks: specifier: ^4.0.0 version: 4.0.0 @@ -7651,128 +7651,128 @@ packages: rollup: 2.78.0 dev: false - /@rollup/rollup-android-arm-eabi@4.15.0: - resolution: {integrity: sha512-O63bJ7p909pRRQfOJ0k/Jp8gNFMud+ZzLLG5EBWquylHxmRT2k18M2ifg8WyjCgFVdpA7+rI0YZ8EkAtg6dSUw==} + /@rollup/rollup-android-arm-eabi@4.16.0: + resolution: {integrity: sha512-4fDVBAfWYlw2CtYgHEWarAYSozTx5OYLsSM/cdGW7H51FwI10DaGnjKgdqWyWXY/VjugelzriCiKf1UdM20Bxg==} cpu: [arm] os: [android] requiresBuild: true dev: true optional: true - /@rollup/rollup-android-arm64@4.15.0: - resolution: {integrity: sha512-5UywPdmC9jiVOShjQx4uuIcnTQOf85iA4jgg8bkFoH5NYWFfAfrJpv5eeokmTdSmYwUTT5IrcrBCJNkowhrZDA==} + /@rollup/rollup-android-arm64@4.16.0: + resolution: {integrity: sha512-JltUBgsKgN108NO4/hj0B/dJYNrqqmdRCtUet5tFDi/w+0tvQP0FToyWBV4HKBcSX4cvFChrCyt5Rh4FX6M6QQ==} cpu: [arm64] os: [android] requiresBuild: true dev: true optional: true - /@rollup/rollup-darwin-arm64@4.15.0: - resolution: {integrity: sha512-hNkt75uFfWpRxHItCBmbS0ba70WnibJh6yz60WShSWITLlVRbkvAu1E/c7RlliPY4ajhqJd0UPZz//gNalTd4g==} + /@rollup/rollup-darwin-arm64@4.16.0: + resolution: {integrity: sha512-UwF7tkWf0roggMRv7Vrkof7VgX9tEZIc4vbaQl0/HNX3loWlcum+0ODp1Qsd8s7XvQGT+Zboxx1qxav3vq8YDw==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /@rollup/rollup-darwin-x64@4.15.0: - resolution: {integrity: sha512-HnC5bTP7qdfO9nUw/mBhNcjOEZfbS8NwV+nFegiMhYOn1ATAGZF4kfAxR9BuZevBrebWCxMmxm8NCU1CUoz+wQ==} + /@rollup/rollup-darwin-x64@4.16.0: + resolution: {integrity: sha512-RIY42wn6+Yb0qD29T7Dvm9/AhxrkGDf7X5dgI6rUFXR19+vCLh3u45yLcKOayu2ZQEba9rf/+BX3EggVwckiIw==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm-gnueabihf@4.15.0: - resolution: {integrity: sha512-QGOIQIJZeIIqMsc4BUGe8TnV4dkXhSW2EhaQ1G4LqMUNpkyeLztvlDlOoNHn7SR7a4dBANdcEbPkkEzz3rzjzA==} + /@rollup/rollup-linux-arm-gnueabihf@4.16.0: + resolution: {integrity: sha512-r2TGCIKzqk8VwjOvW7sveledh6aPao131ejUfZNIyFlWBCruF4HOu51KtLArDa7LL6qKd0vkgxGX3/2NmYpWig==} cpu: [arm] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm-musleabihf@4.15.0: - resolution: {integrity: sha512-PS/Cp8CinYgoysQ8i4UXYH/TZl06fXszvY/RDkyBYgUB1+tKyOMS925/4FZhfrhkl3XQEKjMc3BKtsxpB9Tz9Q==} + /@rollup/rollup-linux-arm-musleabihf@4.16.0: + resolution: {integrity: sha512-/QwaDp0RXQTtm25wQFSl02zEm9oveRXr9qAHbdxWCm9YG9dR8esqpyqzS/3GgHDm7jHktPNz9gTENfoUKRCcXQ==} cpu: [arm] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm64-gnu@4.15.0: - resolution: {integrity: sha512-XzOsnD6lGDP+k+vGgTYAryVGu8N89qpjMN5BVFUj75dGVFP3FzIVAufJAraxirpDwEQZA7Gjs0Vo5p4UmnnjsA==} + /@rollup/rollup-linux-arm64-gnu@4.16.0: + resolution: {integrity: sha512-iypHsz7YEfoyNL0iHbQ7B7pY6hpymvvMgFXXaMd5+WCtvJ9zqWPZKFmo78UeWzWNmTP9JtPiNIQt6efRxx/MNA==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm64-musl@4.15.0: - resolution: {integrity: sha512-+ScJA4Epbx/ZQGjDnbvTAcb8ZD06b+TlIka2UkujbKf1I/A+yrvEcJwG3/27zMmvcWMQyeCJhbL9TlSjzL0B7Q==} + /@rollup/rollup-linux-arm64-musl@4.16.0: + resolution: {integrity: sha512-7UpYcO0uVeomnoL5MpQhrS0FT7xZUJrEXtKVLmps5bRA7x5AiA1PDuPnMbxcOBWjIM2HHIG1t3ndnRTVMIbk5A==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-powerpc64le-gnu@4.15.0: - resolution: {integrity: sha512-1cUSvYgnyTakM4FDyf/GxUCDcqmj/hUh1NOizEOJU7+D5xEfFGCxgcNOs3hYBeRMUCcGmGkt01EhD3ILgKpGHQ==} + /@rollup/rollup-linux-powerpc64le-gnu@4.16.0: + resolution: {integrity: sha512-FSuFy4/hOQy0lH135ifnElP/6dKoHcZGHovsaRY0jrfNRR2yjMnVYaqNHKGKy0b/1I8DkD/JtclgJfq7SPti1w==} cpu: [ppc64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-riscv64-gnu@4.15.0: - resolution: {integrity: sha512-3A1FbHDbBUvpJXFAZwVsiROIcstVHP9AX/cwnyIhAp+xyQ1cBCxywKtuzmw0Av1MDNNg/y/9dDHtNypfRa8bdw==} + /@rollup/rollup-linux-riscv64-gnu@4.16.0: + resolution: {integrity: sha512-qxAB8MiHuDI8jU0D+WI9Gym3fvUJHA/AjKRXxbEH921SB3AeKQStq1FKFA59dAoqqCArjJ1voXM/gMvgEc1q4Q==} cpu: [riscv64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-s390x-gnu@4.15.0: - resolution: {integrity: sha512-hYPbhg9ow6/mXIkojc8LOeiip2sCTuw1taWyoOXTOWk9vawIXz8x7B4KkgWUAtvAElssxhSyEXr2EZycH/FGzQ==} + /@rollup/rollup-linux-s390x-gnu@4.16.0: + resolution: {integrity: sha512-j/9yBgWFlNFBfG/S1M2zkBNLeLkNVG59T5c4tlmlrxU+XITWJ3aMVWdpcZ/+mu7auGZftAXueAgAE9mb4lAlag==} cpu: [s390x] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-x64-gnu@4.15.0: - resolution: {integrity: sha512-511qln5mPSUKwv7HI28S1jCD1FK+2WbX5THM9A9annr3c1kzmfnf8Oe3ZakubEjob3IV6OPnNNcesfy+adIrmw==} + /@rollup/rollup-linux-x64-gnu@4.16.0: + resolution: {integrity: sha512-SjsBA1a9wrEleNneGEsR40HdxKdwCatyHC547o/XINqwPW4cqTYiNy/lL1WTJYWU/KgWIb8HH4SgmFStbWoBzw==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-x64-musl@4.15.0: - resolution: {integrity: sha512-4qKKGTDIv2bQZ+afhPWqPL+94+dLtk4lw1iwbcylKlLNqQ/Yyjof2CFYBxf6npiDzPV+zf4EWRiHb26/4Vsm9w==} + /@rollup/rollup-linux-x64-musl@4.16.0: + resolution: {integrity: sha512-YKCs7ghJZ5po6/qgfONiXyFKOKcTK4Kerzk/Kc89QK0JT94Qg4NurL+3Y3rZh5am2tu1OlvHPpBHQNBE8cFgJQ==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-arm64-msvc@4.15.0: - resolution: {integrity: sha512-nEtaFBHp1OnbOf+tz66DtID579sNRHGgMC23to8HUyVuOCpCMD0CvRNqiDGLErLNnwApWIUtUl1VvuovCWUxwg==} + /@rollup/rollup-win32-arm64-msvc@4.16.0: + resolution: {integrity: sha512-+wtkF+z2nw0ZwwHji01wOW0loxFl24lBNxPtVAXtnPPDL9Ew0EhiCMOegXe/EAH3Zlr8Iw9tyPJXB3DltQLEyw==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-ia32-msvc@4.15.0: - resolution: {integrity: sha512-5O49NykwSgX6iT2HgZ6cAoGHt6T/FqNMB5OqFOGxU/y1GyFSHquox1sK2OqApQc0ANxiHFQEMNDLNVCL7AUDnQ==} + /@rollup/rollup-win32-ia32-msvc@4.16.0: + resolution: {integrity: sha512-7qLyKTL7Lf2g0B8bduETVAEI3WVUVwBRVcECojVevPNVAmi19IW1P2X+uMSwhmWNy36Q/qEvxXsfts1I8wpawg==} cpu: [ia32] os: [win32] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-x64-msvc@4.15.0: - resolution: {integrity: sha512-YA0hTwCunmKNeTOFWdJuKhdXse9jBqgo34FDo+9aS0spfCkp+wj0o1bCcOOTu+0P48O95GTfkLTAaVonwNuIdQ==} + /@rollup/rollup-win32-x64-msvc@4.16.0: + resolution: {integrity: sha512-tkfxXt+7c3Ecgn7ln9NJPdBM+QKwQdmFFpgAP+FYhAuRS5y3tY8xeza82gFjbPpytkHmaQnVdMtuzbToCz2tuw==} cpu: [x64] os: [win32] requiresBuild: true @@ -19069,8 +19069,8 @@ packages: use-context-selector: 1.4.4(react-dom@18.2.0)(react-native@0.73.7)(react@18.2.0)(scheduler@0.23.0) dev: false - /react-virtuoso@4.7.9(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-Y1Tkho/yD9+UP6anfraMRv6tbjvJFJK6A6puIucHITmBzXkkKaJ1xtydH+Rl74ItLE+oB9/XfPe37hqN2gZMsg==} + /react-virtuoso@4.7.10(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-l+fnBf/G1Fp6pHCnhFq2Ra4lkZtT6c5XrS9rCS0OA6de7WGLZviCo0y61CUZZG79TeAw3L7O4czeNPiqh9CIrg==} engines: {node: '>=10'} peerDependencies: react: '>=16 || >=17 || >= 18' @@ -19525,29 +19525,29 @@ packages: fsevents: 2.3.3 dev: false - /rollup@4.15.0: - resolution: {integrity: sha512-i0ir57IMF5o7YvNYyUNeIGG+IZaaucnGZAOsSctO2tPLXlCEaZzyBa+QhpHNSgtpyLMoDev2DyN6a7J1dQA8Tw==} + /rollup@4.16.0: + resolution: {integrity: sha512-joxy/Hd4Ee289394//Q1aoebcxXyHasDieCTk8YtP4G4al4TUlx85EnuCLrfrdtLzrna9kNjH++Sx063wxSgmA==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true dependencies: '@types/estree': 1.0.5 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.15.0 - '@rollup/rollup-android-arm64': 4.15.0 - '@rollup/rollup-darwin-arm64': 4.15.0 - '@rollup/rollup-darwin-x64': 4.15.0 - '@rollup/rollup-linux-arm-gnueabihf': 4.15.0 - '@rollup/rollup-linux-arm-musleabihf': 4.15.0 - '@rollup/rollup-linux-arm64-gnu': 4.15.0 - '@rollup/rollup-linux-arm64-musl': 4.15.0 - '@rollup/rollup-linux-powerpc64le-gnu': 4.15.0 - '@rollup/rollup-linux-riscv64-gnu': 4.15.0 - '@rollup/rollup-linux-s390x-gnu': 4.15.0 - '@rollup/rollup-linux-x64-gnu': 4.15.0 - '@rollup/rollup-linux-x64-musl': 4.15.0 - '@rollup/rollup-win32-arm64-msvc': 4.15.0 - '@rollup/rollup-win32-ia32-msvc': 4.15.0 - '@rollup/rollup-win32-x64-msvc': 4.15.0 + '@rollup/rollup-android-arm-eabi': 4.16.0 + '@rollup/rollup-android-arm64': 4.16.0 + '@rollup/rollup-darwin-arm64': 4.16.0 + '@rollup/rollup-darwin-x64': 4.16.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.16.0 + '@rollup/rollup-linux-arm-musleabihf': 4.16.0 + '@rollup/rollup-linux-arm64-gnu': 4.16.0 + '@rollup/rollup-linux-arm64-musl': 4.16.0 + '@rollup/rollup-linux-powerpc64le-gnu': 4.16.0 + '@rollup/rollup-linux-riscv64-gnu': 4.16.0 + '@rollup/rollup-linux-s390x-gnu': 4.16.0 + '@rollup/rollup-linux-x64-gnu': 4.16.0 + '@rollup/rollup-linux-x64-musl': 4.16.0 + '@rollup/rollup-win32-arm64-msvc': 4.16.0 + '@rollup/rollup-win32-ia32-msvc': 4.16.0 + '@rollup/rollup-win32-x64-msvc': 4.16.0 fsevents: 2.3.3 dev: true @@ -20629,8 +20629,8 @@ packages: /through@2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} - /tinybench@2.7.0: - resolution: {integrity: sha512-Qgayeb106x2o4hNzNjsZEfFziw8IbKqtbXBjVh7VIZfBxfD5M4gWtpyx5+YTae2gJ6Y6Dz/KLepiv16RFeQWNA==} + /tinybench@2.8.0: + resolution: {integrity: sha512-1/eK7zUnIklz4JUUlL+658n58XO2hHLQfSk1Zf2LKieUjxidN16eKFEoDEfjHc3ohofSSqK3X5yO6VGb6iW8Lw==} dev: true /tinypool@0.8.4: @@ -21670,7 +21670,7 @@ packages: '@types/node': 20.12.7 esbuild: 0.20.2 postcss: 8.4.38 - rollup: 4.15.0 + rollup: 4.16.0 optionalDependencies: fsevents: 2.3.3 dev: true @@ -21716,7 +21716,7 @@ packages: picocolors: 1.0.0 std-env: 3.7.0 strip-literal: 2.1.0 - tinybench: 2.7.0 + tinybench: 2.8.0 tinypool: 0.8.4 vite: 5.2.10(@types/node@20.12.7) vite-node: 1.5.0(@types/node@20.12.7)