diff --git a/middleware.ts b/middleware.ts new file mode 100644 index 0000000000000..06ad3845212f8 --- /dev/null +++ b/middleware.ts @@ -0,0 +1,56 @@ +import { NextResponse } from 'next/server'; +import localeConfig from './i18n/config.json'; +import type { NextRequest } from 'next/server'; + +// As set of available and enabled locales for the website +// This is used for allowing us to redirect the user to any +// of the available locales that we have enabled on the website +const localeCodes = localeConfig + .filter(locale => locale.enabled) + .map(locale => locale.code); + +export async function middleware(req: NextRequest) { + const { pathname, search } = req.nextUrl; + + // This function allows us to redirect with a Locale Code + const redirectWithLocale = (locale: string) => { + const redirectUrl = `/${locale}${pathname}${search}`; + + return NextResponse.redirect(new URL(redirectUrl, req.url)); + }; + + const localeCookie = req.cookies.get('NEXT_LOCALE'); + + // If we already have a NEXT_LOCALE Cookie, then Redirect to the stored Locale Code + if (localeCookie && localeCookie.value) { + return redirectWithLocale(localeCookie.value); + } + + // If not, we try to check if the Browser is sending `Accept-Language` Header + const acceptedLanguagesRaw = req.headers.get('Accept-Language') || 'en'; + + // If present, we try to split the format into ['code', 'q=order', ...] + // Where q= is the precedence of the Accepted Language + // We then filter those out as we don't want them + const acceptedLanguages = acceptedLanguagesRaw + .split(';') + .map(collection => collection.split(',')) + .flat() + .filter(locale => !locale.startsWith('q=')); + + // We check if we have any matching Language in the order of preference given + // And if yes, we return that Locale Code + const matchedLocaleCode = acceptedLanguages.find(acceptedLocale => + localeCodes.some(supportedLocale => supportedLocale === acceptedLocale) + ); + + // We create a new Response Object containing the Locale Match or the default Language + const responseWithCookie = redirectWithLocale(matchedLocaleCode || 'en'); + + // Then we set a Cookie to avoid this calculation from happening on every / hit + responseWithCookie.cookies.set('NEXT_LOCALE', matchedLocaleCode || 'en'); + + return responseWithCookie; +} + +export const config = { matcher: '/' }; diff --git a/next.config.mjs b/next.config.mjs index 8d549e1c5b2fb..7579cee86f6f2 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -18,9 +18,12 @@ const withNextra = nextra({ }, }); +const enableImageOptimization = + process.env.NEXT_ENABLE_IMAGE_OPTIMIZATION === 'true'; + export default withNextra({ trailingSlash: false, - images: { unoptimized: true }, + images: { unoptimized: !enableImageOptimization }, outputFileTracing: false, - basePath: process.env.NEXT_BASE_PATH || '', + basePath: String(process.env.NEXT_BASE_PATH || ''), }); diff --git a/package-lock.json b/package-lock.json index d3f063498e045..2d69672029696 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,73 +13,73 @@ "@nodevu/core": "^0.0.4", "classnames": "^2.3.2", "feed": "^4.2.2", - "framer-motion": "^10.12.4", + "framer-motion": "^10.12.7", "gray-matter": "^4.0.3", "handlebars": "^4.7.7", - "highlight.js": "^11.7.0", - "isomorphic-dompurify": "^1.1.0", - "next": "13.3.0", - "next-sitemap": "^4.0.6", + "highlight.js": "^11.8.0", + "isomorphic-dompurify": "^1.3.0", + "next": "^13.3.4", + "next-sitemap": "^4.0.9", "next-themes": "^0.2.1", - "nextra": "^2.2.20", + "nextra": "^2.4.2", "node-version-data": "^1.1.0", "react": "^18.2.0", "react-dom": "^18.2.0", "react-icons": "^4.8.0", - "react-intl": "^6.3.2", + "react-intl": "^6.4.2", "remark-gfm": "^3.0.1", - "sass": "^1.60.0", - "semver": "^7.3.8", + "sass": "^1.62.1", + "semver": "^7.5.0", "strftime": "^0.10.1", - "stylelint-config-standard": "^31.0.0", - "swr": "^2.1.1" + "stylelint-config-standard": "^33.0.0", + "swr": "^2.1.5" }, "devDependencies": { - "@builder.io/partytown": "^0.7.6", - "@next/eslint-plugin-next": "^13.2.3", - "@storybook/addon-essentials": "^7.0.5", - "@storybook/addon-interactions": "^7.0.5", - "@storybook/addon-links": "^7.0.5", - "@storybook/blocks": "^7.0.5", - "@storybook/nextjs": "^7.0.5", - "@storybook/react": "^7.0.5", + "@builder.io/partytown": "^0.8.0", + "@next/eslint-plugin-next": "^13.3.4", + "@storybook/addon-essentials": "^7.0.8", + "@storybook/addon-interactions": "^7.0.8", + "@storybook/addon-links": "^7.0.8", + "@storybook/blocks": "^7.0.8", + "@storybook/nextjs": "^7.0.8", + "@storybook/react": "^7.0.8", "@storybook/testing-library": "^0.1.0", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^14.0.0", "@testing-library/user-event": "^14.4.3", "@types/jest": "^29.5.1", - "@types/mdx": "^2.0.4", - "@types/node": "^18.15.11", - "@types/react": "^18.0.31", - "@types/react-dom": "^18.0.11", + "@types/mdx": "^2.0.5", + "@types/node": "^18.16.3", + "@types/react": "^18.2.2", + "@types/react-dom": "^18.2.3", "@types/semver": "^7.3.13", "@types/strftime": "^0.9.4", "@types/testing-library__jest-dom": "^5.14.5", - "@typescript-eslint/eslint-plugin": "^5.59.0", - "@typescript-eslint/parser": "^5.59.0", + "@typescript-eslint/eslint-plugin": "^5.59.2", + "@typescript-eslint/parser": "^5.59.2", "critters": "^0.0.16", "cross-env": "^7.0.3", - "eslint": "^8.36.0", - "eslint-config-next": "^13.2.4", + "eslint": "^8.39.0", + "eslint-config-next": "^13.3.4", "eslint-config-prettier": "^8.8.0", "eslint-mdx": "^2.0.5", "eslint-plugin-import": "^2.27.5", "eslint-plugin-mdx": "^2.0.5", "eslint-plugin-prettier": "^4.2.1", - "eslint-plugin-testing-library": "^5.10.2", + "eslint-plugin-testing-library": "^5.10.3", "jest": "^29.5.0", "jest-environment-jsdom": "^29.5.0", - "prettier": "^2.8.7", + "prettier": "^2.8.8", "remark-preset-lint-node": "^3.4.0", "remark-preset-prettier": "^2.0.1", - "sharp": "^0.32.0", - "storybook": "^7.0.5", - "stylelint": "^15.3.0", - "stylelint-config-recommended-scss": "^9.0.1", + "sharp": "^0.32.1", + "storybook": "^7.0.8", + "stylelint": "^15.6.1", + "stylelint-config-recommended-scss": "^11.0.0", "stylelint-order": "^6.0.3", "stylelint-selector-bem-pattern": "^2.1.1", "turbo": "^1.9.3", - "typescript": "^4.9.5" + "typescript": "^5.0.4" }, "engines": { "node": "v18" @@ -2156,9 +2156,9 @@ "dev": true }, "node_modules/@builder.io/partytown": { - "version": "0.7.6", - "resolved": "https://registry.npmjs.org/@builder.io/partytown/-/partytown-0.7.6.tgz", - "integrity": "sha512-snXIGNiZpqjno3XYQN2lbBB+05hsQR/LSttbtIW1c0gmZ7Kh/DIo0YrxlDxCDulAMFPFM8J+4voLwvYepSj3sw==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@builder.io/partytown/-/partytown-0.8.0.tgz", + "integrity": "sha512-M6H7nSMwW2dHd1/MQ+9J1Jqdw22uhl1nKv90kIiL9G7gjFVqqouQp4qSS1oZclmtW1XjAa4Q5UnbHB4iytmxZA==", "dev": true, "bin": { "partytown": "bin/partytown.cjs" @@ -3873,8 +3873,7 @@ "node_modules/@next/env": { "version": "13.3.4", "resolved": "https://registry.npmjs.org/@next/env/-/env-13.3.4.tgz", - "integrity": "sha512-oTK/wRV2qga86m/4VdrR1+/56UA6U1Qv3sIgowB+bZjahniZLEG5BmmQjfoGv7ZuLXBZ8Eec6hkL9BqJcrEL2g==", - "peer": true + "integrity": "sha512-oTK/wRV2qga86m/4VdrR1+/56UA6U1Qv3sIgowB+bZjahniZLEG5BmmQjfoGv7ZuLXBZ8Eec6hkL9BqJcrEL2g==" }, "node_modules/@next/eslint-plugin-next": { "version": "13.3.4", @@ -3886,9 +3885,9 @@ } }, "node_modules/@next/swc-darwin-arm64": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.3.0.tgz", - "integrity": "sha512-DmIQCNq6JtccLPPBzf0dgh2vzMWt5wjxbP71pCi5EWpWYE3MsP6FcRXi4MlAmFNDQOfcFXR2r7kBeG1LpZUh1w==", + "version": "13.3.4", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.3.4.tgz", + "integrity": "sha512-vux7RWfzxy1lD21CMwZsy9Ej+0+LZdIIj1gEhVmzOQqQZ5N56h8JamrjIVCfDL+Lpj8KwOmFZbPHE8qaYnL2pg==", "cpu": [ "arm64" ], @@ -3901,9 +3900,9 @@ } }, "node_modules/@next/swc-darwin-x64": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.3.0.tgz", - "integrity": "sha512-oQoqFa88OGgwnYlnAGHVct618FRI/749se0N3S8t9Bzdv5CRbscnO0RcX901+YnNK4Q6yeiizfgO3b7kogtsZg==", + "version": "13.3.4", + "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.3.4.tgz", + "integrity": "sha512-1tb+6JT98+t7UIhVQpKL7zegKnCs9RKU6cKNyj+DYKuC/NVl49/JaIlmwCwK8Ibl+RXxJrK7uSXSIO71feXsgw==", "cpu": [ "x64" ], @@ -3916,9 +3915,9 @@ } }, "node_modules/@next/swc-linux-arm64-gnu": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.3.0.tgz", - "integrity": "sha512-Wzz2p/WqAJUqTVoLo6H18WMeAXo3i+9DkPDae4oQG8LMloJ3if4NEZTnOnTUlro6cq+S/W4pTGa97nWTrOjbGw==", + "version": "13.3.4", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.3.4.tgz", + "integrity": "sha512-UqcKkYTKslf5YAJNtZ5XV1D5MQJIkVtDHL8OehDZERHzqOe7jvy41HFto33IDPPU8gJiP5eJb3V9U26uifqHjw==", "cpu": [ "arm64" ], @@ -3931,9 +3930,9 @@ } }, "node_modules/@next/swc-linux-arm64-musl": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.3.0.tgz", - "integrity": "sha512-xPVrIQOQo9WXJYgmoTlMnAD/HlR/1e1ZIWGbwIzEirXBVBqMARUulBEIKdC19zuvoJ477qZJgBDCKtKEykCpyQ==", + "version": "13.3.4", + "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.3.4.tgz", + "integrity": "sha512-HE/FmE8VvstAfehyo/XsrhGgz97cEr7uf9IfkgJ/unqSXE0CDshDn/4as6rRid74eDR8/exi7c2tdo49Tuqxrw==", "cpu": [ "arm64" ], @@ -3946,9 +3945,9 @@ } }, "node_modules/@next/swc-linux-x64-gnu": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.3.0.tgz", - "integrity": "sha512-jOFlpGuPD7W2tuXVJP4wt9a3cpNxWAPcloq5EfMJRiXsBBOjLVFZA7boXYxEBzSVgUiVVr1V9T0HFM7pULJ1qA==", + "version": "13.3.4", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.3.4.tgz", + "integrity": "sha512-xU+ugaupGA4SL5aK1ZYEqVHrW3TPOhxVcpaJLfpANm2443J4GfxCmOacu9XcSgy5c51Mq7C9uZ1LODKHfZosRQ==", "cpu": [ "x64" ], @@ -3961,9 +3960,9 @@ } }, "node_modules/@next/swc-linux-x64-musl": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.3.0.tgz", - "integrity": "sha512-2OwKlzaBgmuet9XYHc3KwsEilzb04F540rlRXkAcjMHL7eCxB7uZIGtsVvKOnQLvC/elrUegwSw1+5f7WmfyOw==", + "version": "13.3.4", + "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.3.4.tgz", + "integrity": "sha512-cZvmf5KcYeTfIK6bCypfmxGUjme53Ep7hx94JJtGrYgCA1VwEuYdh+KouubJaQCH3aqnNE7+zGnVEupEKfoaaA==", "cpu": [ "x64" ], @@ -3976,9 +3975,9 @@ } }, "node_modules/@next/swc-win32-arm64-msvc": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.3.0.tgz", - "integrity": "sha512-OeHiA6YEvndxT46g+rzFK/MQTfftKxJmzslERMu9LDdC6Kez0bdrgEYed5eXFK2Z1viKZJCGRlhd06rBusyztA==", + "version": "13.3.4", + "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.3.4.tgz", + "integrity": "sha512-7dL+CAUAjmgnVbjXPIpdj7/AQKFqEUL3bKtaOIE1JzJ5UMHHAXCPwzQtibrsvQpf9MwcAmiv8aburD3xH1xf8w==", "cpu": [ "arm64" ], @@ -3991,9 +3990,9 @@ } }, "node_modules/@next/swc-win32-ia32-msvc": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.3.0.tgz", - "integrity": "sha512-4aB7K9mcVK1lYEzpOpqWrXHEZympU3oK65fnNcY1Qc4HLJFLJj8AViuqQd4jjjPNuV4sl8jAwTz3gN5VNGWB7w==", + "version": "13.3.4", + "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.3.4.tgz", + "integrity": "sha512-qplTyzEl1vPkS+/DRK3pKSL0HeXrPHkYsV7U6gboHYpfqoHY+bcLUj3gwVUa9PEHRIoq4vXvPzx/WtzE6q52ng==", "cpu": [ "ia32" ], @@ -4006,9 +4005,9 @@ } }, "node_modules/@next/swc-win32-x64-msvc": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.3.0.tgz", - "integrity": "sha512-Reer6rkLLcoOvB0dd66+Y7WrWVFH7sEEkF/4bJCIfsSKnTStTYaHtwIJAwbqnt9I392Tqvku0KkoqZOryWV9LQ==", + "version": "13.3.4", + "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.3.4.tgz", + "integrity": "sha512-usdvZT7JHrTuXC+4OKN5mCzUkviFkCyJJTkEz8jhBpucg+T7s83e7owm3oNFzmj5iKfvxU2St6VkcnSgpFvEYA==", "cpu": [ "x64" ], @@ -6035,9 +6034,9 @@ } }, "node_modules/@swc/helpers": { - "version": "0.4.14", - "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.4.14.tgz", - "integrity": "sha512-4C7nX/dvpzB7za4Ql9K81xK3HPxCpHMgwTZVyf+9JQ6VUbn9jjZVN7/Nkdz/Ugzs2CSjqnL/UPXroiVBVHUWUw==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.1.tgz", + "integrity": "sha512-sJ902EfIzn1Fa+qYmjdQqh8tPsoxyBz+8yBKC2HKUxyezKJFwPGOn7pv4WY6QuQW//ySQi5lJjA/ZT9sNWWNTg==", "dependencies": { "tslib": "^2.4.0" } @@ -18695,12 +18694,12 @@ "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" }, "node_modules/next": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/next/-/next-13.3.0.tgz", - "integrity": "sha512-OVTw8MpIPa12+DCUkPqRGPS3thlJPcwae2ZL4xti3iBff27goH024xy4q2lhlsdoYiKOi8Kz6uJoLW/GXwgfOA==", + "version": "13.3.4", + "resolved": "https://registry.npmjs.org/next/-/next-13.3.4.tgz", + "integrity": "sha512-sod7HeokBSvH5QV0KB+pXeLfcXUlLrGnVUXxHpmhilQ+nQYT3Im2O8DswD5e4uqbR8Pvdu9pcWgb1CbXZQZlmQ==", "dependencies": { - "@next/env": "13.3.0", - "@swc/helpers": "0.4.14", + "@next/env": "13.3.4", + "@swc/helpers": "0.5.1", "busboy": "1.6.0", "caniuse-lite": "^1.0.30001406", "postcss": "8.4.14", @@ -18710,18 +18709,18 @@ "next": "dist/bin/next" }, "engines": { - "node": ">=14.6.0" + "node": ">=16.8.0" }, "optionalDependencies": { - "@next/swc-darwin-arm64": "13.3.0", - "@next/swc-darwin-x64": "13.3.0", - "@next/swc-linux-arm64-gnu": "13.3.0", - "@next/swc-linux-arm64-musl": "13.3.0", - "@next/swc-linux-x64-gnu": "13.3.0", - "@next/swc-linux-x64-musl": "13.3.0", - "@next/swc-win32-arm64-msvc": "13.3.0", - "@next/swc-win32-ia32-msvc": "13.3.0", - "@next/swc-win32-x64-msvc": "13.3.0" + "@next/swc-darwin-arm64": "13.3.4", + "@next/swc-darwin-x64": "13.3.4", + "@next/swc-linux-arm64-gnu": "13.3.4", + "@next/swc-linux-arm64-musl": "13.3.4", + "@next/swc-linux-x64-gnu": "13.3.4", + "@next/swc-linux-x64-musl": "13.3.4", + "@next/swc-win32-arm64-msvc": "13.3.4", + "@next/swc-win32-ia32-msvc": "13.3.4", + "@next/swc-win32-x64-msvc": "13.3.4" }, "peerDependencies": { "@opentelemetry/api": "^1.1.0", @@ -18800,11 +18799,6 @@ "react-dom": "*" } }, - "node_modules/next/node_modules/@next/env": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/@next/env/-/env-13.3.0.tgz", - "integrity": "sha512-AjppRV4uG3No7L1plinoTQETH+j2F10TEnrMfzbTUYwze5sBUPveeeBAPZPm8OkJZ1epq9OyYKhZrvbD6/9HCQ==" - }, "node_modules/next/node_modules/postcss": { "version": "8.4.14", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz", @@ -23379,27 +23373,26 @@ } }, "node_modules/stylelint-config-recommended": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-10.0.1.tgz", - "integrity": "sha512-TQ4xQ48tW4QSlODcti7pgSRqBZcUaBzuh0jPpfiMhwJKBPkqzTIAU+IrSWL/7BgXlOM90DjB7YaNgFpx8QWhuA==", - "dev": true, + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-12.0.0.tgz", + "integrity": "sha512-x6x8QNARrGO2sG6iURkzqL+Dp+4bJorPMMRNPScdvaUK8PsynriOcMW7AFDKqkWAS5wbue/u8fUT/4ynzcmqdQ==", "peerDependencies": { - "stylelint": "^15.0.0" + "stylelint": "^15.5.0" } }, "node_modules/stylelint-config-recommended-scss": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-9.0.1.tgz", - "integrity": "sha512-qAmz/TdrqslwiMTuLM3QXeISUkfEDUXGMfRBCHm/xrkCJNnQefv+mzG2mWTsWkqcVk8HAyUkug10dwAcYp2fCQ==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended-scss/-/stylelint-config-recommended-scss-11.0.0.tgz", + "integrity": "sha512-EDghTDU7aOv2LTsRZvcT1w8mcjUaMhuy+t38iV5I/0Qiu6ixdkRwhLEMul3K/fnB2v9Nwqvb3xpvJfPH+HduDw==", "dev": true, "dependencies": { - "postcss-scss": "^4.0.2", - "stylelint-config-recommended": "^10.0.1", - "stylelint-scss": "^4.4.0" + "postcss-scss": "^4.0.6", + "stylelint-config-recommended": "^12.0.0", + "stylelint-scss": "^4.6.0" }, "peerDependencies": { "postcss": "^8.3.3", - "stylelint": "^15.0.0" + "stylelint": "^15.5.0" }, "peerDependenciesMeta": { "postcss": { @@ -23408,22 +23401,14 @@ } }, "node_modules/stylelint-config-standard": { - "version": "31.0.0", - "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-31.0.0.tgz", - "integrity": "sha512-CUGAmtROCvX0YgMY2+6P9tqSkHj5z/75XxrQ8bGxvkCa1xYdGDx4poM0pa7cXc3s74/PZLJH/okxZZouRfOSGw==", + "version": "33.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-33.0.0.tgz", + "integrity": "sha512-eyxnLWoXImUn77+ODIuW9qXBDNM+ALN68L3wT1lN2oNspZ7D9NVGlNHb2QCUn4xDug6VZLsh0tF8NyoYzkgTzg==", "dependencies": { - "stylelint-config-recommended": "^11.0.0" + "stylelint-config-recommended": "^12.0.0" }, "peerDependencies": { - "stylelint": "^15.3.0" - } - }, - "node_modules/stylelint-config-standard/node_modules/stylelint-config-recommended": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-11.0.0.tgz", - "integrity": "sha512-SoGIHNI748OCZn6BxFYT83ytWoYETCINVHV3LKScVAWQQauWdvmdDqJC5YXWjpBbxg2E761Tg5aUGKLFOVhEkA==", - "peerDependencies": { - "stylelint": "^15.3.0" + "stylelint": "^15.5.0" } }, "node_modules/stylelint-order": { @@ -24494,16 +24479,16 @@ "dev": true }, "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz", + "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==", "devOptional": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=12.20" } }, "node_modules/uglify-js": { diff --git a/package.json b/package.json index 57a89eeb8ba12..56dd3f591686f 100644 --- a/package.json +++ b/package.json @@ -38,72 +38,72 @@ "@nodevu/core": "^0.0.4", "classnames": "^2.3.2", "feed": "^4.2.2", - "framer-motion": "^10.12.4", + "framer-motion": "^10.12.7", "gray-matter": "^4.0.3", "handlebars": "^4.7.7", - "highlight.js": "^11.7.0", - "isomorphic-dompurify": "^1.1.0", - "next": "13.3.0", - "next-sitemap": "^4.0.6", + "highlight.js": "^11.8.0", + "isomorphic-dompurify": "^1.3.0", + "next": "^13.3.4", + "next-sitemap": "^4.0.9", "next-themes": "^0.2.1", - "nextra": "^2.2.20", + "nextra": "^2.4.2", "node-version-data": "^1.1.0", "react": "^18.2.0", "react-dom": "^18.2.0", "react-icons": "^4.8.0", - "react-intl": "^6.3.2", + "react-intl": "^6.4.2", "remark-gfm": "^3.0.1", - "sass": "^1.60.0", - "semver": "^7.3.8", + "sass": "^1.62.1", + "semver": "^7.5.0", "strftime": "^0.10.1", - "stylelint-config-standard": "^31.0.0", - "swr": "^2.1.1" + "stylelint-config-standard": "^33.0.0", + "swr": "^2.1.5" }, "devDependencies": { - "@builder.io/partytown": "^0.7.6", - "@next/eslint-plugin-next": "^13.2.3", - "@storybook/addon-essentials": "^7.0.5", - "@storybook/addon-interactions": "^7.0.5", - "@storybook/addon-links": "^7.0.5", - "@storybook/blocks": "^7.0.5", - "@storybook/nextjs": "^7.0.5", - "@storybook/react": "^7.0.5", + "@builder.io/partytown": "^0.8.0", + "@next/eslint-plugin-next": "^13.3.4", + "@storybook/addon-essentials": "^7.0.8", + "@storybook/addon-interactions": "^7.0.8", + "@storybook/addon-links": "^7.0.8", + "@storybook/blocks": "^7.0.8", + "@storybook/nextjs": "^7.0.8", + "@storybook/react": "^7.0.8", "@storybook/testing-library": "^0.1.0", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^14.0.0", "@testing-library/user-event": "^14.4.3", "@types/jest": "^29.5.1", - "@types/mdx": "^2.0.4", - "@types/node": "^18.15.11", - "@types/react": "^18.0.31", - "@types/react-dom": "^18.0.11", + "@types/mdx": "^2.0.5", + "@types/node": "^18.16.3", + "@types/react": "^18.2.2", + "@types/react-dom": "^18.2.3", "@types/semver": "^7.3.13", "@types/strftime": "^0.9.4", "@types/testing-library__jest-dom": "^5.14.5", - "@typescript-eslint/eslint-plugin": "^5.59.0", - "@typescript-eslint/parser": "^5.59.0", + "@typescript-eslint/eslint-plugin": "^5.59.2", + "@typescript-eslint/parser": "^5.59.2", "critters": "^0.0.16", "cross-env": "^7.0.3", - "eslint": "^8.36.0", - "eslint-config-next": "^13.2.4", + "eslint": "^8.39.0", + "eslint-config-next": "^13.3.4", "eslint-config-prettier": "^8.8.0", "eslint-mdx": "^2.0.5", "eslint-plugin-import": "^2.27.5", "eslint-plugin-mdx": "^2.0.5", "eslint-plugin-prettier": "^4.2.1", - "eslint-plugin-testing-library": "^5.10.2", + "eslint-plugin-testing-library": "^5.10.3", "jest": "^29.5.0", "jest-environment-jsdom": "^29.5.0", - "prettier": "^2.8.7", + "prettier": "^2.8.8", "remark-preset-lint-node": "^3.4.0", "remark-preset-prettier": "^2.0.1", - "sharp": "^0.32.0", - "storybook": "^7.0.5", - "stylelint": "^15.3.0", - "stylelint-config-recommended-scss": "^9.0.1", + "sharp": "^0.32.1", + "storybook": "^7.0.8", + "stylelint": "^15.6.1", + "stylelint-config-recommended-scss": "^11.0.0", "stylelint-order": "^6.0.3", "stylelint-selector-bem-pattern": "^2.1.1", "turbo": "^1.9.3", - "typescript": "^4.9.5" + "typescript": "^5.0.4" } } diff --git a/turbo.json b/turbo.json index c07f07292c437..c06f6c7303bc3 100644 --- a/turbo.json +++ b/turbo.json @@ -59,7 +59,8 @@ "next.config.mjs", "next.data.mjs", "next-sitemap.config.js", - "theme.tsx" + "theme.tsx", + "middleware.ts" ], "outputs": [".next/**", "!.next/cache/**"] }, @@ -76,7 +77,8 @@ "next.config.mjs", "next.data.mjs", "next-sitemap.config.js", - "theme.tsx" + "theme.tsx", + "middleware.ts" ], "outputs": [".next/**", "!.next/cache/**"] },