From 1c242bc1adb150f64cedcd87535519be804c9f80 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Wed, 26 Jun 2024 09:35:13 +0200 Subject: [PATCH 1/7] deps: Bump next and related dependencies --- package.json | 14 ++-- yarn.lock | 213 ++++++++++++++++++++++----------------------------- 2 files changed, 100 insertions(+), 127 deletions(-) diff --git a/package.json b/package.json index 109d2fb95e0138..ffc9a0a6ed3770 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ }, "scripts": { "dev": "concurrently \"yarn sidecar\" \"node ./src/hotReloadWatcher.mjs\" \"next dev\"", - "build": "prisma generate && next build", + "build": "prisma generate && next build --profile", "start": "next start", "migrate:dev": "dotenv -e .env.development -- yarn prisma migrate reset", "lint": "next lint", @@ -36,9 +36,9 @@ "@emotion/react": "^11.11.0", "@emotion/styled": "^11.0.0", "@google-cloud/storage": "^7.7.0", - "@mdx-js/loader": "^3.0.0", - "@mdx-js/react": "^3.0.0", - "@next/mdx": "^14.0.1", + "@mdx-js/loader": "^3.0.1", + "@mdx-js/react": "^3.0.1", + "@next/mdx": "^14.2.4", "@popperjs/core": "^2.11.8", "@prettier/plugin-xml": "^3.3.1", "@prisma/client": "^5.8.1", @@ -51,7 +51,7 @@ "@radix-ui/themes": "^2.0.3", "@sentry-internal/global-search": "^1.0.0", "@sentry/nextjs": "^8.8.0", - "@types/mdx": "^2.0.9", + "@types/mdx": "^2.0.13", "algoliasearch": "^4.23.3", "esbuild": "^0.19.8", "framer-motion": "^10.12.16", @@ -61,9 +61,9 @@ "js-cookie": "^3.0.5", "js-yaml": "^4.1.0", "match-sorter": "^6.3.4", - "mdx-bundler": "^10.0.1", + "mdx-bundler": "^10.0.2", "micromark": "^4.0.0", - "next": "14.0.2", + "next": "14.2.4", "next-auth": "^4.24.5", "next-mdx-remote": "^4.4.1", "nextjs-toploader": "^1.6.6", diff --git a/yarn.lock b/yarn.lock index 445ee87be3ed9c..ce137b3ea8905a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1231,7 +1231,7 @@ vfile "^6.0.0" vfile-message "^4.0.0" -"@mdx-js/loader@^3.0.0": +"@mdx-js/loader@^3.0.1": version "3.0.1" resolved "https://registry.yarnpkg.com/@mdx-js/loader/-/loader-3.0.1.tgz#d21e5bd50b38a4713559586dcdaa987ef9dc02c9" integrity sha512-YbYUt7YyEOdFxhyuCWmLKf5vKhID/hJAojEUnheJk4D8iYVLFQw+BAoBWru/dHGch1omtmZOPstsmKPyBF68Tw== @@ -1299,17 +1299,17 @@ "@types/mdx" "^2.0.0" "@types/react" ">=16" -"@mdx-js/react@^3.0.0": +"@mdx-js/react@^3.0.1": version "3.0.1" resolved "https://registry.yarnpkg.com/@mdx-js/react/-/react-3.0.1.tgz#997a19b3a5b783d936c75ae7c47cfe62f967f746" integrity sha512-9ZrPIU4MGf6et1m1ov3zKf+q9+deetI51zprKB1D/z3NOb+rUxxtEl3mCjW5wTGh6VhRdwPueh1oRzi6ezkA8A== dependencies: "@types/mdx" "^2.0.0" -"@next/env@14.0.2": - version "14.0.2" - resolved "https://registry.yarnpkg.com/@next/env/-/env-14.0.2.tgz#c1fb535983bca768e7eccd7b9cf4636127fc6d25" - integrity sha512-HAW1sljizEaduEOes/m84oUqeIDAUYBR1CDwu2tobNlNDFP3cSm9d6QsOsGeNlIppU1p/p1+bWbYCbvwjFiceA== +"@next/env@14.2.4": + version "14.2.4" + resolved "https://registry.yarnpkg.com/@next/env/-/env-14.2.4.tgz#5546813dc4f809884a37d257b254a5ce1b0248d7" + integrity sha512-3EtkY5VDkuV2+lNmKlbkibIJxcO4oIHEhBWne6PaAp+76J9KoSsGvNikp6ivzAT8dhhBMYrm6op2pS1ApG0Hzg== "@next/eslint-plugin-next@14.0.1": version "14.0.1" @@ -1318,57 +1318,57 @@ dependencies: glob "7.1.7" -"@next/mdx@^14.0.1": - version "14.2.0" - resolved "https://registry.yarnpkg.com/@next/mdx/-/mdx-14.2.0.tgz#8329cc9725037a9b58abeda08443429741999974" - integrity sha512-sk8dlm8DD/Z8Xf+pTtfTLN+qs+lZZBQv/dCf+Pegpe4HYE1GkbJV3dIw/iK+upf475iQOBigj7F6QyVVGjUbZw== +"@next/mdx@^14.2.4": + version "14.2.4" + resolved "https://registry.yarnpkg.com/@next/mdx/-/mdx-14.2.4.tgz#a15ba763f363a5f5b79c1dff0fa742a13bd80cfe" + integrity sha512-eklTNNoH08xGy9UiKcohZmoLhmHAYaYm5ndPGQqJybaeNErgYL8fmp2tk5DRD0L54DNqMz97oN+CAEHqfqIVcw== dependencies: source-map "^0.7.0" -"@next/swc-darwin-arm64@14.0.2": - version "14.0.2" - resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.0.2.tgz#eba35a1425fee5d305903c85ae0d6d2b0d512c7b" - integrity sha512-i+jQY0fOb8L5gvGvojWyZMfQoQtDVB2kYe7fufOEiST6sicvzI2W5/EXo4lX5bLUjapHKe+nFxuVv7BA+Pd7LQ== - -"@next/swc-darwin-x64@14.0.2": - version "14.0.2" - resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-14.0.2.tgz#8adb4dfc3d596c0816da67df9b75603218cf2a42" - integrity sha512-zRCAO0d2hW6gBEa4wJaLn+gY8qtIqD3gYd9NjruuN98OCI6YyelmhWVVLlREjS7RYrm9OUQIp/iVJFeB6kP1hg== - -"@next/swc-linux-arm64-gnu@14.0.2": - version "14.0.2" - resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.0.2.tgz#1f88d066d44c9229a861815e3d449b0037dae14e" - integrity sha512-tSJmiaon8YaKsVhi7GgRizZoV0N1Sx5+i+hFTrCKKQN7s3tuqW0Rov+RYdPhAv/pJl4qiG+XfSX4eJXqpNg3dA== - -"@next/swc-linux-arm64-musl@14.0.2": - version "14.0.2" - resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.0.2.tgz#de9b2708abc35dd19429a662a11785d0c54d1ec7" - integrity sha512-dXJLMSEOwqJKcag1BeX1C+ekdPPJ9yXbWIt3nAadhbLx5CjACoB2NQj9Xcqu2tmdr5L6m34fR+fjGPs+ZVPLzA== - -"@next/swc-linux-x64-gnu@14.0.2": - version "14.0.2" - resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.0.2.tgz#64bd555dcbc7fd6c38cb86028baf7d7fc80bd4ac" - integrity sha512-WC9KAPSowj6as76P3vf1J3mf2QTm3Wv3FBzQi7UJ+dxWjK3MhHVWsWUo24AnmHx9qDcEtHM58okgZkXVqeLB+Q== - -"@next/swc-linux-x64-musl@14.0.2": - version "14.0.2" - resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.0.2.tgz#69e6abf0f516df69acbf663eeb8ed6fd8eebcc38" - integrity sha512-KSSAwvUcjtdZY4zJFa2f5VNJIwuEVnOSlqYqbQIawREJA+gUI6egeiRu290pXioQXnQHYYdXmnVNZ4M+VMB7KQ== - -"@next/swc-win32-arm64-msvc@14.0.2": - version "14.0.2" - resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.0.2.tgz#82bc49af0986f4b2c113b5f223a559fc51b49b9d" - integrity sha512-2/O0F1SqJ0bD3zqNuYge0ok7OEWCQwk55RPheDYD0va5ij7kYwrFkq5ycCRN0TLjLfxSF6xI5NM6nC5ux7svEQ== - -"@next/swc-win32-ia32-msvc@14.0.2": - version "14.0.2" - resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.0.2.tgz#2f1958ad82b7f7ec5da8ad8ac2f18ef7a8e7757f" - integrity sha512-vJI/x70Id0oN4Bq/R6byBqV1/NS5Dl31zC+lowO8SDu1fHmUxoAdILZR5X/sKbiJpuvKcCrwbYgJU8FF/Gh50Q== - -"@next/swc-win32-x64-msvc@14.0.2": - version "14.0.2" - resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.0.2.tgz#629174f587beb640a431a4a3fe4e26d5d4f8de52" - integrity sha512-Ut4LXIUvC5m8pHTe2j0vq/YDnTEyq6RSR9vHYPqnELrDapPhLNz9Od/L5Ow3J8RNDWpEnfCiQXuVdfjlNEJ7ug== +"@next/swc-darwin-arm64@14.2.4": + version "14.2.4" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-14.2.4.tgz#da9f04c34a3d5f0b8401ed745768420e4a604036" + integrity sha512-AH3mO4JlFUqsYcwFUHb1wAKlebHU/Hv2u2kb1pAuRanDZ7pD/A/KPD98RHZmwsJpdHQwfEc/06mgpSzwrJYnNg== + +"@next/swc-darwin-x64@14.2.4": + version "14.2.4" + resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-14.2.4.tgz#46dedb29ec5503bf171a72a3ecb8aac6e738e9d6" + integrity sha512-QVadW73sWIO6E2VroyUjuAxhWLZWEpiFqHdZdoQ/AMpN9YWGuHV8t2rChr0ahy+irKX5mlDU7OY68k3n4tAZTg== + +"@next/swc-linux-arm64-gnu@14.2.4": + version "14.2.4" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-14.2.4.tgz#c9697ab9eb422bd1d7ffd0eb0779cc2aefa9d4a1" + integrity sha512-KT6GUrb3oyCfcfJ+WliXuJnD6pCpZiosx2X3k66HLR+DMoilRb76LpWPGb4tZprawTtcnyrv75ElD6VncVamUQ== + +"@next/swc-linux-arm64-musl@14.2.4": + version "14.2.4" + resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-14.2.4.tgz#cbbceb2008571c743b5a310a488d2e166d200a75" + integrity sha512-Alv8/XGSs/ytwQcbCHwze1HmiIkIVhDHYLjczSVrf0Wi2MvKn/blt7+S6FJitj3yTlMwMxII1gIJ9WepI4aZ/A== + +"@next/swc-linux-x64-gnu@14.2.4": + version "14.2.4" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-14.2.4.tgz#d79184223f857bacffb92f643cb2943a43632568" + integrity sha512-ze0ShQDBPCqxLImzw4sCdfnB3lRmN3qGMB2GWDRlq5Wqy4G36pxtNOo2usu/Nm9+V2Rh/QQnrRc2l94kYFXO6Q== + +"@next/swc-linux-x64-musl@14.2.4": + version "14.2.4" + resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-14.2.4.tgz#6b6c3e5ac02ca5e63394d280ec8ee607491902df" + integrity sha512-8dwC0UJoc6fC7PX70csdaznVMNr16hQrTDAMPvLPloazlcaWfdPogq+UpZX6Drqb1OBlwowz8iG7WR0Tzk/diQ== + +"@next/swc-win32-arm64-msvc@14.2.4": + version "14.2.4" + resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-14.2.4.tgz#dbad3906e870dba84c5883d9d4c4838472e0697f" + integrity sha512-jxyg67NbEWkDyvM+O8UDbPAyYRZqGLQDTPwvrBBeOSyVWW/jFQkQKQ70JDqDSYg1ZDdl+E3nkbFbq8xM8E9x8A== + +"@next/swc-win32-ia32-msvc@14.2.4": + version "14.2.4" + resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-14.2.4.tgz#6074529b91ba49132922ce89a2e16d25d2ec235d" + integrity sha512-twrmN753hjXRdcrZmZttb/m5xaCBFa48Dt3FbeEItpJArxriYDunWxJn+QFXdJ3hPkm4u7CKxncVvnmgQMY1ag== + +"@next/swc-win32-x64-msvc@14.2.4": + version "14.2.4" + resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-14.2.4.tgz#e65a1c6539a671f97bb86d5183d6e3a1733c29c7" + integrity sha512-tkLrjBzqFTP8DVrAAQmZelEahfR9OxWpFR++vAI9FBhCiIxtwHwBHC23SBHCTURBtwB4kc/x44imVOnkKGNVGg== "@nodelib/fs.scandir@2.1.5": version "2.1.5" @@ -2687,11 +2687,17 @@ "@spotlightjs/overlay" "2.0.0-alpha.1" "@spotlightjs/sidecar" "1.4.0" -"@swc/helpers@0.5.2": - version "0.5.2" - resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.5.2.tgz#85ea0c76450b61ad7d10a37050289eded783c27d" - integrity sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw== +"@swc/counter@^0.1.3": + version "0.1.3" + resolved "https://registry.yarnpkg.com/@swc/counter/-/counter-0.1.3.tgz#cc7463bd02949611c6329596fccd2b0ec782b0e9" + integrity sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ== + +"@swc/helpers@0.5.5": + version "0.5.5" + resolved "https://registry.yarnpkg.com/@swc/helpers/-/helpers-0.5.5.tgz#12689df71bfc9b21c4f4ca00ae55f2f16c8b77c0" + integrity sha512-KGYxvIOXcceOAbEk4bi/dVLEK9z8sZ0uBB3Il5b1rhfClSpcX0yfRO0KmTkqR2cnQDymwLB+25ZyMzICg/cm/A== dependencies: + "@swc/counter" "^0.1.3" tslib "^2.4.0" "@tailwindcss/forms@^0.5.7": @@ -3009,7 +3015,7 @@ dependencies: "@types/unist" "*" -"@types/mdx@^2.0.0", "@types/mdx@^2.0.9": +"@types/mdx@^2.0.0", "@types/mdx@^2.0.13": version "2.0.13" resolved "https://registry.yarnpkg.com/@types/mdx/-/mdx-2.0.13.tgz#68f6877043d377092890ff5b298152b0a21671bd" integrity sha512-+OWZQfAYyio6YkJb3HLxDrvnx6SWWDbC0zVPfBRzUk0/nqoDyf6dNxQi3eArPe8rJ473nobTMQ/8Zk+LxJ+Yuw== @@ -3933,11 +3939,16 @@ camelcase@^6.2.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a" integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== -caniuse-lite@^1.0.30001283, caniuse-lite@^1.0.30001406, caniuse-lite@^1.0.30001587, caniuse-lite@^1.0.30001599: +caniuse-lite@^1.0.30001283, caniuse-lite@^1.0.30001587, caniuse-lite@^1.0.30001599: version "1.0.30001609" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001609.tgz#fc34fad75c0c6d6d6303bdbceec2da8f203dabd6" integrity sha512-JFPQs34lHKx1B5t1EpQpWH4c+29zIyn/haGsbpfq3suuV9v56enjFt23zqijxGTMwy1p/4H2tjnQMY+p1WoAyA== +caniuse-lite@^1.0.30001579: + version "1.0.30001637" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001637.tgz#d9fab531493d9ef46a8ff305e9812190ac463f21" + integrity sha512-1x0qRI1mD1o9e+7mBI7XtzFAP4XszbHaVWsMiGbSPLYekKTJF7K+FNk6AsXH4sUpc+qrsI3pVgf1Jdl/uGkuSQ== + ccount@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/ccount/-/ccount-2.0.1.tgz#17a3bf82302e0870d6da43a01311a8bc02a3ecf5" @@ -5587,11 +5598,6 @@ glob-parent@^6.0.2: dependencies: is-glob "^4.0.3" -glob-to-regexp@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" - integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== - glob@7.1.7: version "7.1.7" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" @@ -5698,7 +5704,7 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" -graceful-fs@^4.1.2, graceful-fs@^4.2.4, graceful-fs@^4.2.9: +graceful-fs@^4.1.2, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.9: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -7694,7 +7700,7 @@ mdast-util-to-string@^4.0.0: dependencies: "@types/mdast" "^4.0.0" -mdx-bundler@^10.0.1: +mdx-bundler@^10.0.2: version "10.0.2" resolved "https://registry.yarnpkg.com/mdx-bundler/-/mdx-bundler-10.0.2.tgz#bae47e7c477a220e68ee4f316cdfde94192949c5" integrity sha512-0wF0zoCv+Ms4G+eSlk/jaKYoJHc0oXBaOma3kYlFJiKq9H8h41Dd66ioDBGF4noy80Pf7KTBQlyHfEpTqVml7A== @@ -8565,28 +8571,28 @@ next-mdx-remote@^4.4.1: vfile "^5.3.0" vfile-matter "^3.0.1" -next@14.0.2: - version "14.0.2" - resolved "https://registry.yarnpkg.com/next/-/next-14.0.2.tgz#02ba6a1656edf14d3913c7a3553026e9d6e083c7" - integrity sha512-jsAU2CkYS40GaQYOiLl9m93RTv2DA/tTJ0NRlmZIBIL87YwQ/xR8k796z7IqgM3jydI8G25dXvyYMC9VDIevIg== +next@14.2.4: + version "14.2.4" + resolved "https://registry.yarnpkg.com/next/-/next-14.2.4.tgz#ef66c39c71e2d8ad0a3caa0383c8933f4663e4d1" + integrity sha512-R8/V7vugY+822rsQGQCjoLhMuC9oFj9SOi4Cl4b2wjDrseD0LRZ10W7R6Czo4w9ZznVSshKjuIomsRjvm9EKJQ== dependencies: - "@next/env" "14.0.2" - "@swc/helpers" "0.5.2" + "@next/env" "14.2.4" + "@swc/helpers" "0.5.5" busboy "1.6.0" - caniuse-lite "^1.0.30001406" + caniuse-lite "^1.0.30001579" + graceful-fs "^4.2.11" postcss "8.4.31" styled-jsx "5.1.1" - watchpack "2.4.0" optionalDependencies: - "@next/swc-darwin-arm64" "14.0.2" - "@next/swc-darwin-x64" "14.0.2" - "@next/swc-linux-arm64-gnu" "14.0.2" - "@next/swc-linux-arm64-musl" "14.0.2" - "@next/swc-linux-x64-gnu" "14.0.2" - "@next/swc-linux-x64-musl" "14.0.2" - "@next/swc-win32-arm64-msvc" "14.0.2" - "@next/swc-win32-ia32-msvc" "14.0.2" - "@next/swc-win32-x64-msvc" "14.0.2" + "@next/swc-darwin-arm64" "14.2.4" + "@next/swc-darwin-x64" "14.2.4" + "@next/swc-linux-arm64-gnu" "14.2.4" + "@next/swc-linux-arm64-musl" "14.2.4" + "@next/swc-linux-x64-gnu" "14.2.4" + "@next/swc-linux-x64-musl" "14.2.4" + "@next/swc-win32-arm64-msvc" "14.2.4" + "@next/swc-win32-ia32-msvc" "14.2.4" + "@next/swc-win32-x64-msvc" "14.2.4" nextjs-toploader@^1.6.6: version "1.6.11" @@ -10283,16 +10289,7 @@ string-length@^4.0.1: char-regex "^1.0.2" strip-ansi "^6.0.0" -"string-width-cjs@npm:string-width@^4.2.0": - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -10371,14 +10368,7 @@ stringify-entities@^4.0.0: character-entities-html4 "^2.0.0" character-entities-legacy "^3.0.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1": - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -11192,14 +11182,6 @@ warning@^4.0.2: dependencies: loose-envify "^1.0.0" -watchpack@2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d" - integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg== - dependencies: - glob-to-regexp "^0.4.1" - graceful-fs "^4.1.2" - web-namespaces@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/web-namespaces/-/web-namespaces-2.0.1.tgz#1010ff7c650eccb2592cebeeaf9a1b253fd40692" @@ -11346,16 +11328,7 @@ which@^2.0.1, which@^2.0.2: dependencies: isexe "^2.0.0" -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== From 73b81704a5a1d284643614092b737376f69a02bc Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Wed, 26 Jun 2024 09:55:01 +0200 Subject: [PATCH 2/7] platform redirect on edge? --- app/platform-redirect/page.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/platform-redirect/page.tsx b/app/platform-redirect/page.tsx index b77af12c828b65..f95d1db5081798 100644 --- a/app/platform-redirect/page.tsx +++ b/app/platform-redirect/page.tsx @@ -6,6 +6,8 @@ import {SmartLink} from 'sentry-docs/components/smartLink'; import {extractPlatforms, getDocsRootNode, nodeForPath} from 'sentry-docs/docTree'; import {setServerContext} from 'sentry-docs/serverContext'; +export const runtime = 'edge'; + export default async function Page({ searchParams: {next = '', platform}, }: { From 49e31655059a643aca463306e344c76c404bfcad Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Wed, 26 Jun 2024 10:06:39 +0200 Subject: [PATCH 3/7] sad workaround --- app/platform-redirect/page.tsx | 2 -- next.config.js | 5 +++++ vercel.json | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/platform-redirect/page.tsx b/app/platform-redirect/page.tsx index f95d1db5081798..b77af12c828b65 100644 --- a/app/platform-redirect/page.tsx +++ b/app/platform-redirect/page.tsx @@ -6,8 +6,6 @@ import {SmartLink} from 'sentry-docs/components/smartLink'; import {extractPlatforms, getDocsRootNode, nodeForPath} from 'sentry-docs/docTree'; import {setServerContext} from 'sentry-docs/serverContext'; -export const runtime = 'edge'; - export default async function Page({ searchParams: {next = '', platform}, }: { diff --git a/next.config.js b/next.config.js index 075b8734d4a20e..a5fa49bf3ccd23 100644 --- a/next.config.js +++ b/next.config.js @@ -11,6 +11,11 @@ const nextConfig = { experimental: { serverComponentsExternalPackages: ['rehype-preset-minify'], + + // These are put into the lambdas for unknown reasons when Next.js was bumped from 14.0.2 to 14.2.4. + // Since they are huge we need to ignore them so we don't reach the maximum lambda size: + // https://vercel.com/docs/functions/runtimes#bundle-size-limits + outputFileTracingExcludes: ['.next/cache/webpack', '.git/objects/pack'], }, webpack: (config, _options) => { diff --git a/vercel.json b/vercel.json index 10996680e7f3ec..f890553012cac2 100644 --- a/vercel.json +++ b/vercel.json @@ -1,4 +1,5 @@ { + "$schema": "https://openapi.vercel.sh/vercel.json", "headers": [ { "source": "/(.*)", From de3ce35cb6a2b3b431f740786110e97c6d0ae6e8 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Wed, 26 Jun 2024 10:11:13 +0200 Subject: [PATCH 4/7] no profile --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ffc9a0a6ed3770..bd68bc0fa9f399 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ }, "scripts": { "dev": "concurrently \"yarn sidecar\" \"node ./src/hotReloadWatcher.mjs\" \"next dev\"", - "build": "prisma generate && next build --profile", + "build": "prisma generate && next build", "start": "next start", "migrate:dev": "dotenv -e .env.development -- yarn prisma migrate reset", "lint": "next lint", From 34e4939d4169994c9562cf4dd1499252eaa1e071 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Wed, 26 Jun 2024 10:31:45 +0200 Subject: [PATCH 5/7] maybe --- next.config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/next.config.js b/next.config.js index a5fa49bf3ccd23..d5889b7b348d5c 100644 --- a/next.config.js +++ b/next.config.js @@ -15,7 +15,9 @@ const nextConfig = { // These are put into the lambdas for unknown reasons when Next.js was bumped from 14.0.2 to 14.2.4. // Since they are huge we need to ignore them so we don't reach the maximum lambda size: // https://vercel.com/docs/functions/runtimes#bundle-size-limits - outputFileTracingExcludes: ['.next/cache/webpack', '.git/objects/pack'], + outputFileTracingExcludes: { + '/**': ['./**/.next/cache/webpack', './**/.git/objects/pack'], + }, }, webpack: (config, _options) => { From a061d673fb20e6c32c1247c95ffeb884e7ad5137 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Wed, 26 Jun 2024 12:20:38 +0200 Subject: [PATCH 6/7] lets see --- src/mdx.ts | 46 ++++++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/src/mdx.ts b/src/mdx.ts index 43317371c2f032..5eae77cecfccf9 100644 --- a/src/mdx.ts +++ b/src/mdx.ts @@ -1,5 +1,6 @@ import fs from 'fs'; import path from 'path'; +import {fileURLToPath} from 'url'; import matter from 'gray-matter'; import {s} from 'hastscript'; @@ -28,7 +29,8 @@ import remarkTocHeadings, {TocNode} from './remark-toc-headings'; import remarkVariables from './remark-variables'; import {FrontMatter, Platform, PlatformConfig} from './types'; -const root = process.cwd(); +// @ts-ignore +const directoryName = path.dirname(fileURLToPath(import.meta.url)); function formatSlug(slug: string) { return slug.replace(/\.(mdx|md)/, ''); @@ -96,8 +98,8 @@ async function getDocsFrontMatterUncached(): Promise { return frontMatter; } -export function getAllFilesFrontMatter(folder: string = 'docs') { - const docsPath = path.join(root, folder); +function getAllFilesFrontMatter() { + const docsPath = path.join(directoryName, '..', 'docs'); const files = getAllFilesRecursively(docsPath); const allFrontMatter: FrontMatter[] = []; files.forEach(file => { @@ -115,15 +117,10 @@ export function getAllFilesFrontMatter(folder: string = 'docs') { allFrontMatter.push({ ...(frontmatter as FrontMatter), slug: formatSlug(fileName), - sourcePath: path.join(folder, fileName), + sourcePath: path.join('docs', fileName), }); }); - if (folder !== 'docs') { - // We exit early if we're not in the docs folder. We use this for the changelog. - return allFrontMatter; - } - // Add all `common` files in the right place. const platformsPath = path.join(docsPath, 'platforms'); const platformNames = fs @@ -218,17 +215,17 @@ export function getAllFilesFrontMatter(folder: string = 'docs') { } export async function getFileBySlug(slug: string) { - const configPath = path.join(root, slug, 'config.yml'); + const configPath = path.join(directoryName, '..', slug, 'config.yml'); let configFrontmatter: PlatformConfig | undefined; if (fs.existsSync(configPath)) { configFrontmatter = yaml.load(fs.readFileSync(configPath, 'utf8')) as PlatformConfig; } - let mdxPath = path.join(root, `${slug}.mdx`); - let mdxIndexPath = path.join(root, slug, 'index.mdx'); - let mdPath = path.join(root, `${slug}.md`); - let mdIndexPath = path.join(root, slug, 'index.md'); + let mdxPath = path.join(directoryName, '..', `${slug}.mdx`); + let mdxIndexPath = path.join(directoryName, '..', slug, 'index.mdx'); + let mdPath = path.join(directoryName, '..', `${slug}.md`); + let mdIndexPath = path.join(directoryName, '..', slug, 'index.md'); if ( slug.indexOf('docs/platforms/') === 0 && @@ -249,18 +246,20 @@ export async function getFileBySlug(slug: string) { commonFilePath = path.join(commonPath, slugParts.slice(3).join('/')); } if (commonFilePath && fs.existsSync(commonPath)) { - mdxPath = path.join(root, `${commonFilePath}.mdx`); - mdxIndexPath = path.join(root, commonFilePath, 'index.mdx'); - mdPath = path.join(root, `${commonFilePath}.md`); - mdIndexPath = path.join(root, commonFilePath, 'index.md'); + mdxPath = path.join(directoryName, '..', `${commonFilePath}.mdx`); + mdxIndexPath = path.join(directoryName, '..', commonFilePath, 'index.mdx'); + mdPath = path.join(directoryName, '..', `${commonFilePath}.md`); + mdIndexPath = path.join(directoryName, '..', commonFilePath, 'index.md'); } } - const sourcePath = [mdxPath, mdxIndexPath, mdPath].find(fs.existsSync) ?? mdIndexPath; + const sourcePath = + [mdxPath, mdxIndexPath, mdPath].find(p => fs.existsSync(p)) ?? mdIndexPath; const source = fs.readFileSync(sourcePath, 'utf8'); process.env.ESBUILD_BINARY_PATH = path.join( - root, + directoryName, + '..', 'node_modules', 'esbuild', 'bin', @@ -285,7 +284,10 @@ export async function getFileBySlug(slug: string) { [remarkTocHeadings, {exportRef: toc}], remarkGfm, remarkFormatCodeBlocks, - [remarkImageSize, {sourceFolder: cwd, publicFolder: path.join(root, 'public')}], + [ + remarkImageSize, + {sourceFolder: cwd, publicFolder: path.join(directoryName, '..', 'public')}, + ], remarkMdxImages, remarkCodeTitles, remarkCodeTabs, @@ -353,7 +355,7 @@ export async function getFileBySlug(slug: string) { }; // Set the `outdir` to a public location for this bundle. // this where this images will be copied - options.outdir = path.join(root, 'public', 'mdx-images'); + options.outdir = path.join(directoryName, '..', 'public', 'mdx-images'); // Set write to true so that esbuild will output the files. options.write = true; From 52981f469dbbba0c16da3e7e4d9a301d13ba2dba Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Wed, 26 Jun 2024 12:41:39 +0200 Subject: [PATCH 7/7] qol & cleanup --- next.config.js | 7 ------- package.json | 3 ++- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/next.config.js b/next.config.js index d5889b7b348d5c..075b8734d4a20e 100644 --- a/next.config.js +++ b/next.config.js @@ -11,13 +11,6 @@ const nextConfig = { experimental: { serverComponentsExternalPackages: ['rehype-preset-minify'], - - // These are put into the lambdas for unknown reasons when Next.js was bumped from 14.0.2 to 14.2.4. - // Since they are huge we need to ignore them so we don't reach the maximum lambda size: - // https://vercel.com/docs/functions/runtimes#bundle-size-limits - outputFileTracingExcludes: { - '/**': ['./**/.next/cache/webpack', './**/.git/objects/pack'], - }, }, webpack: (config, _options) => { diff --git a/package.json b/package.json index bd68bc0fa9f399..eff4fb8fe7da12 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,8 @@ "lint:prettier:fix": "prettier --write \"./{src,app,scripts}/**/*.{md,mdx,ts,tsx,js,jsx,mjs}\"", "lint:fix": "yarn run lint:prettier:fix && yarn run lint:eslint:fix", "sidecar": "yarn spotlight-sidecar", - "test": "jest" + "test": "jest", + "build-trace": "npx next@canary internal turbo-trace-server .next/trace" }, "prisma": { "seed": "node prisma/seed/seed.mjs"