diff --git a/package.json b/package.json index 5621a15..4fdcf51 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ }, "dependencies": { "@mdx-js/mdx": "^2.3.0", - "@next/mdx": "^13.2.4", + "@next/mdx": "^13.3.0", "github-slugger": "^2.0.0", "gray-matter": "^4.0.3", "lodash": "^4.17.21", @@ -103,17 +103,17 @@ "@testing-library/react": "^14.0.0", "@testing-library/user-event": "^14.4.3", "@vitejs/plugin-react": "^3.1.0", - "esbuild": "^0.17.15", - "eslint": "^8.37.0", + "esbuild": "^0.17.16", + "eslint": "^8.38.0", "eslint-config-prettier": "^8.8.0", "eslint-plugin-mdx": "^2.0.5", "eslint-plugin-react": "^7.32.2", "eslint-plugin-react-hooks": "^4.6.0", "husky": "^8.0.3", "jsdom": "^21.1.1", - "lint-staged": "^13.2.0", + "lint-staged": "^13.2.1", "mdx-observable": "^0.2.0", - "next": "^13.2.4", + "next": "^13.3.0", "nock": "^13.3.0", "pinst": "^3.0.0", "pkg-dir": "^7.0.0", @@ -121,7 +121,7 @@ "react": "18.2.0", "react-dom": "18.2.0", "rollup": "^3.20.2", - "vitest": "^0.29.8", + "vitest": "^0.30.1", "watch": "^1.0.2", "whatwg-fetch": "^3.6.2" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 761f951..ee54e89 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,8 +5,8 @@ dependencies: specifier: ^2.3.0 version: 2.3.0 '@next/mdx': - specifier: ^13.2.4 - version: 13.2.4 + specifier: ^13.3.0 + version: 13.3.0 github-slugger: specifier: ^2.0.0 version: 2.0.0 @@ -121,23 +121,23 @@ devDependencies: specifier: ^3.1.0 version: 3.1.0(vite@4.1.1) esbuild: - specifier: ^0.17.15 - version: 0.17.15 + specifier: ^0.17.16 + version: 0.17.16 eslint: - specifier: ^8.37.0 - version: 8.37.0 + specifier: ^8.38.0 + version: 8.38.0 eslint-config-prettier: specifier: ^8.8.0 - version: 8.8.0(eslint@8.37.0) + version: 8.8.0(eslint@8.38.0) eslint-plugin-mdx: specifier: ^2.0.5 - version: 2.0.5(eslint@8.37.0) + version: 2.0.5(eslint@8.38.0) eslint-plugin-react: specifier: ^7.32.2 - version: 7.32.2(eslint@8.37.0) + version: 7.32.2(eslint@8.38.0) eslint-plugin-react-hooks: specifier: ^4.6.0 - version: 4.6.0(eslint@8.37.0) + version: 4.6.0(eslint@8.38.0) husky: specifier: ^8.0.3 version: 8.0.3 @@ -145,14 +145,14 @@ devDependencies: specifier: ^21.1.1 version: 21.1.1 lint-staged: - specifier: ^13.2.0 - version: 13.2.0 + specifier: ^13.2.1 + version: 13.2.1 mdx-observable: specifier: ^0.2.0 version: 0.2.0(react@18.2.0) next: - specifier: ^13.2.4 - version: 13.2.4(@babel/core@7.20.12)(react-dom@18.2.0)(react@18.2.0) + specifier: ^13.3.0 + version: 13.3.0(@babel/core@7.20.12)(react-dom@18.2.0)(react@18.2.0) nock: specifier: ^13.3.0 version: 13.3.0 @@ -175,8 +175,8 @@ devDependencies: specifier: ^3.20.2 version: 3.20.2 vitest: - specifier: ^0.29.8 - version: 0.29.8(jsdom@21.1.1) + specifier: ^0.30.1 + version: 0.30.1(jsdom@21.1.1) watch: specifier: ^1.0.2 version: 1.0.2 @@ -1970,8 +1970,8 @@ packages: dev: true optional: true - /@esbuild/android-arm64@0.17.15: - resolution: {integrity: sha512-0kOB6Y7Br3KDVgHeg8PRcvfLkq+AccreK///B4Z6fNZGr/tNHX0z2VywCc7PTeWp+bPvjA5WMvNXltHw5QjAIA==} + /@esbuild/android-arm64@0.17.16: + resolution: {integrity: sha512-QX48qmsEZW+gcHgTmAj+x21mwTz8MlYQBnzF6861cNdQGvj2jzzFjqH0EBabrIa/WVZ2CHolwMoqxVryqKt8+Q==} engines: {node: '>=12'} cpu: [arm64] os: [android] @@ -1988,8 +1988,8 @@ packages: dev: true optional: true - /@esbuild/android-arm@0.17.15: - resolution: {integrity: sha512-sRSOVlLawAktpMvDyJIkdLI/c/kdRTOqo8t6ImVxg8yT7LQDUYV5Rp2FKeEosLr6ZCja9UjYAzyRSxGteSJPYg==} + /@esbuild/android-arm@0.17.16: + resolution: {integrity: sha512-baLqRpLe4JnKrUXLJChoTN0iXZH7El/mu58GE3WIA6/H834k0XWvLRmGLG8y8arTRS9hJJibPnF0tiGhmWeZgw==} engines: {node: '>=12'} cpu: [arm] os: [android] @@ -2006,8 +2006,8 @@ packages: dev: true optional: true - /@esbuild/android-x64@0.17.15: - resolution: {integrity: sha512-MzDqnNajQZ63YkaUWVl9uuhcWyEyh69HGpMIrf+acR4otMkfLJ4sUCxqwbCyPGicE9dVlrysI3lMcDBjGiBBcQ==} + /@esbuild/android-x64@0.17.16: + resolution: {integrity: sha512-G4wfHhrrz99XJgHnzFvB4UwwPxAWZaZBOFXh+JH1Duf1I4vIVfuYY9uVLpx4eiV2D/Jix8LJY+TAdZ3i40tDow==} engines: {node: '>=12'} cpu: [x64] os: [android] @@ -2024,8 +2024,8 @@ packages: dev: true optional: true - /@esbuild/darwin-arm64@0.17.15: - resolution: {integrity: sha512-7siLjBc88Z4+6qkMDxPT2juf2e8SJxmsbNVKFY2ifWCDT72v5YJz9arlvBw5oB4W/e61H1+HDB/jnu8nNg0rLA==} + /@esbuild/darwin-arm64@0.17.16: + resolution: {integrity: sha512-/Ofw8UXZxuzTLsNFmz1+lmarQI6ztMZ9XktvXedTbt3SNWDn0+ODTwxExLYQ/Hod91EZB4vZPQJLoqLF0jvEzA==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] @@ -2042,8 +2042,8 @@ packages: dev: true optional: true - /@esbuild/darwin-x64@0.17.15: - resolution: {integrity: sha512-NbImBas2rXwYI52BOKTW342Tm3LTeVlaOQ4QPZ7XuWNKiO226DisFk/RyPk3T0CKZkKMuU69yOvlapJEmax7cg==} + /@esbuild/darwin-x64@0.17.16: + resolution: {integrity: sha512-SzBQtCV3Pdc9kyizh36Ol+dNVhkDyIrGb/JXZqFq8WL37LIyrXU0gUpADcNV311sCOhvY+f2ivMhb5Tuv8nMOQ==} engines: {node: '>=12'} cpu: [x64] os: [darwin] @@ -2060,8 +2060,8 @@ packages: dev: true optional: true - /@esbuild/freebsd-arm64@0.17.15: - resolution: {integrity: sha512-Xk9xMDjBVG6CfgoqlVczHAdJnCs0/oeFOspFap5NkYAmRCT2qTn1vJWA2f419iMtsHSLm+O8B6SLV/HlY5cYKg==} + /@esbuild/freebsd-arm64@0.17.16: + resolution: {integrity: sha512-ZqftdfS1UlLiH1DnS2u3It7l4Bc3AskKeu+paJSfk7RNOMrOxmeFDhLTMQqMxycP1C3oj8vgkAT6xfAuq7ZPRA==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] @@ -2078,8 +2078,8 @@ packages: dev: true optional: true - /@esbuild/freebsd-x64@0.17.15: - resolution: {integrity: sha512-3TWAnnEOdclvb2pnfsTWtdwthPfOz7qAfcwDLcfZyGJwm1SRZIMOeB5FODVhnM93mFSPsHB9b/PmxNNbSnd0RQ==} + /@esbuild/freebsd-x64@0.17.16: + resolution: {integrity: sha512-rHV6zNWW1tjgsu0dKQTX9L0ByiJHHLvQKrWtnz8r0YYJI27FU3Xu48gpK2IBj1uCSYhJ+pEk6Y0Um7U3rIvV8g==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] @@ -2096,8 +2096,8 @@ packages: dev: true optional: true - /@esbuild/linux-arm64@0.17.15: - resolution: {integrity: sha512-T0MVnYw9KT6b83/SqyznTs/3Jg2ODWrZfNccg11XjDehIved2oQfrX/wVuev9N936BpMRaTR9I1J0tdGgUgpJA==} + /@esbuild/linux-arm64@0.17.16: + resolution: {integrity: sha512-8yoZhGkU6aHu38WpaM4HrRLTFc7/VVD9Q2SvPcmIQIipQt2I/GMTZNdEHXoypbbGao5kggLcxg0iBKjo0SQYKA==} engines: {node: '>=12'} cpu: [arm64] os: [linux] @@ -2114,8 +2114,8 @@ packages: dev: true optional: true - /@esbuild/linux-arm@0.17.15: - resolution: {integrity: sha512-MLTgiXWEMAMr8nmS9Gigx43zPRmEfeBfGCwxFQEMgJ5MC53QKajaclW6XDPjwJvhbebv+RzK05TQjvH3/aM4Xw==} + /@esbuild/linux-arm@0.17.16: + resolution: {integrity: sha512-n4O8oVxbn7nl4+m+ISb0a68/lcJClIbaGAoXwqeubj/D1/oMMuaAXmJVfFlRjJLu/ZvHkxoiFJnmbfp4n8cdSw==} engines: {node: '>=12'} cpu: [arm] os: [linux] @@ -2132,8 +2132,8 @@ packages: dev: true optional: true - /@esbuild/linux-ia32@0.17.15: - resolution: {integrity: sha512-wp02sHs015T23zsQtU4Cj57WiteiuASHlD7rXjKUyAGYzlOKDAjqK6bk5dMi2QEl/KVOcsjwL36kD+WW7vJt8Q==} + /@esbuild/linux-ia32@0.17.16: + resolution: {integrity: sha512-9ZBjlkdaVYxPNO8a7OmzDbOH9FMQ1a58j7Xb21UfRU29KcEEU3VTHk+Cvrft/BNv0gpWJMiiZ/f4w0TqSP0gLA==} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -2150,8 +2150,8 @@ packages: dev: true optional: true - /@esbuild/linux-loong64@0.17.15: - resolution: {integrity: sha512-k7FsUJjGGSxwnBmMh8d7IbObWu+sF/qbwc+xKZkBe/lTAF16RqxRCnNHA7QTd3oS2AfGBAnHlXL67shV5bBThQ==} + /@esbuild/linux-loong64@0.17.16: + resolution: {integrity: sha512-TIZTRojVBBzdgChY3UOG7BlPhqJz08AL7jdgeeu+kiObWMFzGnQD7BgBBkWRwOtKR1i2TNlO7YK6m4zxVjjPRQ==} engines: {node: '>=12'} cpu: [loong64] os: [linux] @@ -2168,8 +2168,8 @@ packages: dev: true optional: true - /@esbuild/linux-mips64el@0.17.15: - resolution: {integrity: sha512-ZLWk6czDdog+Q9kE/Jfbilu24vEe/iW/Sj2d8EVsmiixQ1rM2RKH2n36qfxK4e8tVcaXkvuV3mU5zTZviE+NVQ==} + /@esbuild/linux-mips64el@0.17.16: + resolution: {integrity: sha512-UPeRuFKCCJYpBbIdczKyHLAIU31GEm0dZl1eMrdYeXDH+SJZh/i+2cAmD3A1Wip9pIc5Sc6Kc5cFUrPXtR0XHA==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] @@ -2186,8 +2186,8 @@ packages: dev: true optional: true - /@esbuild/linux-ppc64@0.17.15: - resolution: {integrity: sha512-mY6dPkIRAiFHRsGfOYZC8Q9rmr8vOBZBme0/j15zFUKM99d4ILY4WpOC7i/LqoY+RE7KaMaSfvY8CqjJtuO4xg==} + /@esbuild/linux-ppc64@0.17.16: + resolution: {integrity: sha512-io6yShgIEgVUhExJejJ21xvO5QtrbiSeI7vYUnr7l+v/O9t6IowyhdiYnyivX2X5ysOVHAuyHW+Wyi7DNhdw6Q==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] @@ -2204,8 +2204,8 @@ packages: dev: true optional: true - /@esbuild/linux-riscv64@0.17.15: - resolution: {integrity: sha512-EcyUtxffdDtWjjwIH8sKzpDRLcVtqANooMNASO59y+xmqqRYBBM7xVLQhqF7nksIbm2yHABptoioS9RAbVMWVA==} + /@esbuild/linux-riscv64@0.17.16: + resolution: {integrity: sha512-WhlGeAHNbSdG/I2gqX2RK2gfgSNwyJuCiFHMc8s3GNEMMHUI109+VMBfhVqRb0ZGzEeRiibi8dItR3ws3Lk+cA==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] @@ -2222,8 +2222,8 @@ packages: dev: true optional: true - /@esbuild/linux-s390x@0.17.15: - resolution: {integrity: sha512-BuS6Jx/ezxFuHxgsfvz7T4g4YlVrmCmg7UAwboeyNNg0OzNzKsIZXpr3Sb/ZREDXWgt48RO4UQRDBxJN3B9Rbg==} + /@esbuild/linux-s390x@0.17.16: + resolution: {integrity: sha512-gHRReYsJtViir63bXKoFaQ4pgTyah4ruiMRQ6im9YZuv+gp3UFJkNTY4sFA73YDynmXZA6hi45en4BGhNOJUsw==} engines: {node: '>=12'} cpu: [s390x] os: [linux] @@ -2240,8 +2240,8 @@ packages: dev: true optional: true - /@esbuild/linux-x64@0.17.15: - resolution: {integrity: sha512-JsdS0EgEViwuKsw5tiJQo9UdQdUJYuB+Mf6HxtJSPN35vez1hlrNb1KajvKWF5Sa35j17+rW1ECEO9iNrIXbNg==} + /@esbuild/linux-x64@0.17.16: + resolution: {integrity: sha512-mfiiBkxEbUHvi+v0P+TS7UnA9TeGXR48aK4XHkTj0ZwOijxexgMF01UDFaBX7Q6CQsB0d+MFNv9IiXbIHTNd4g==} engines: {node: '>=12'} cpu: [x64] os: [linux] @@ -2258,8 +2258,8 @@ packages: dev: true optional: true - /@esbuild/netbsd-x64@0.17.15: - resolution: {integrity: sha512-R6fKjtUysYGym6uXf6qyNephVUQAGtf3n2RCsOST/neIwPqRWcnc3ogcielOd6pT+J0RDR1RGcy0ZY7d3uHVLA==} + /@esbuild/netbsd-x64@0.17.16: + resolution: {integrity: sha512-n8zK1YRDGLRZfVcswcDMDM0j2xKYLNXqei217a4GyBxHIuPMGrrVuJ+Ijfpr0Kufcm7C1k/qaIrGy6eG7wvgmA==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] @@ -2276,8 +2276,8 @@ packages: dev: true optional: true - /@esbuild/openbsd-x64@0.17.15: - resolution: {integrity: sha512-mVD4PGc26b8PI60QaPUltYKeSX0wxuy0AltC+WCTFwvKCq2+OgLP4+fFd+hZXzO2xW1HPKcytZBdjqL6FQFa7w==} + /@esbuild/openbsd-x64@0.17.16: + resolution: {integrity: sha512-lEEfkfsUbo0xC47eSTBqsItXDSzwzwhKUSsVaVjVji07t8+6KA5INp2rN890dHZeueXJAI8q0tEIfbwVRYf6Ew==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] @@ -2294,8 +2294,8 @@ packages: dev: true optional: true - /@esbuild/sunos-x64@0.17.15: - resolution: {integrity: sha512-U6tYPovOkw3459t2CBwGcFYfFRjivcJJc1WC8Q3funIwX8x4fP+R6xL/QuTPNGOblbq/EUDxj9GU+dWKX0oWlQ==} + /@esbuild/sunos-x64@0.17.16: + resolution: {integrity: sha512-jlRjsuvG1fgGwnE8Afs7xYDnGz0dBgTNZfgCK6TlvPH3Z13/P5pi6I57vyLE8qZYLrGVtwcm9UbUx1/mZ8Ukag==} engines: {node: '>=12'} cpu: [x64] os: [sunos] @@ -2312,8 +2312,8 @@ packages: dev: true optional: true - /@esbuild/win32-arm64@0.17.15: - resolution: {integrity: sha512-W+Z5F++wgKAleDABemiyXVnzXgvRFs+GVKThSI+mGgleLWluv0D7Diz4oQpgdpNzh4i2nNDzQtWbjJiqutRp6Q==} + /@esbuild/win32-arm64@0.17.16: + resolution: {integrity: sha512-TzoU2qwVe2boOHl/3KNBUv2PNUc38U0TNnzqOAcgPiD/EZxT2s736xfC2dYQbszAwo4MKzzwBV0iHjhfjxMimg==} engines: {node: '>=12'} cpu: [arm64] os: [win32] @@ -2330,8 +2330,8 @@ packages: dev: true optional: true - /@esbuild/win32-ia32@0.17.15: - resolution: {integrity: sha512-Muz/+uGgheShKGqSVS1KsHtCyEzcdOn/W/Xbh6H91Etm+wiIfwZaBn1W58MeGtfI8WA961YMHFYTthBdQs4t+w==} + /@esbuild/win32-ia32@0.17.16: + resolution: {integrity: sha512-B8b7W+oo2yb/3xmwk9Vc99hC9bNolvqjaTZYEfMQhzdpBsjTvZBlXQ/teUE55Ww6sg//wlcDjOaqldOKyigWdA==} engines: {node: '>=12'} cpu: [ia32] os: [win32] @@ -2348,8 +2348,8 @@ packages: dev: true optional: true - /@esbuild/win32-x64@0.17.15: - resolution: {integrity: sha512-DjDa9ywLUUmjhV2Y9wUTIF+1XsmuFGvZoCmOWkli1XcNAh5t25cc7fgsCx4Zi/Uurep3TTLyDiKATgGEg61pkA==} + /@esbuild/win32-x64@0.17.16: + resolution: {integrity: sha512-xJ7OH/nanouJO9pf03YsL9NAFQBHd8AqfrQd7Pf5laGyyTt/gToul6QYOA/i5i/q8y9iaM5DQFNTgpi995VkOg==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -2357,13 +2357,13 @@ packages: dev: true optional: true - /@eslint-community/eslint-utils@4.3.0(eslint@8.37.0): + /@eslint-community/eslint-utils@4.3.0(eslint@8.38.0): resolution: {integrity: sha512-v3oplH6FYCULtFuCeqyuTd9D2WKO937Dxdq+GmHOLL72TTRriLxz2VLlNfkZRsvj6PKnOPAtuT6dwrs/pA5DvA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: - eslint: 8.37.0 + eslint: 8.38.0 eslint-visitor-keys: 3.4.0 dev: true @@ -2389,8 +2389,8 @@ packages: - supports-color dev: true - /@eslint/js@8.37.0: - resolution: {integrity: sha512-x5vzdtOOGgFVDCUs81QRB2+liax8rFg3+7hqM+QhBG0/G3F1ZsoYl97UrqgHgQ9KKT7G6c4V+aTUCgu/n22v1A==} + /@eslint/js@8.38.0: + resolution: {integrity: sha512-IoD2MfUnOV58ghIHCiil01PcohxjbYR/qCxsoC+xNgUwh1EY8jOOrYmu3d3a71+tJJ23uscEV4X2HJWMsPJu4g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true @@ -2578,12 +2578,12 @@ packages: resolution: {integrity: sha512-H1rQc1ZOHANWBvPcW+JpGwr+juXSxM8Q8YCkm3GhZd8REu1fHR3z99CErO1p9pkcfcxZnMdIZdIsXkOHY0NilA==} dev: true - /@next/env@13.2.4: - resolution: {integrity: sha512-+Mq3TtpkeeKFZanPturjcXt+KHfKYnLlX6jMLyCrmpq6OOs4i1GqBOAauSkii9QeKCMTYzGppar21JU57b/GEA==} + /@next/env@13.3.0: + resolution: {integrity: sha512-AjppRV4uG3No7L1plinoTQETH+j2F10TEnrMfzbTUYwze5sBUPveeeBAPZPm8OkJZ1epq9OyYKhZrvbD6/9HCQ==} dev: true - /@next/mdx@13.2.4: - resolution: {integrity: sha512-inl7u+OEa4Ok3uL052oa8EDw1bUkMGLVKzFfVBIgG19s29gxQvcWYzxa5t438J31ljApjh6Y5k4AD6yLaCAlQw==} + /@next/mdx@13.3.0: + resolution: {integrity: sha512-qrf1K/dTzC9LLPFyacNJBqmnT7BQphrvRDlXb6sfjgMK1iBaKpTmR1PETBT4CSaHzjRY9JjuRftZeYzWGJq3TQ==} peerDependencies: '@mdx-js/loader': '>=0.15.0' '@mdx-js/react': '>=0.15.0' @@ -2596,26 +2596,8 @@ packages: source-map: 0.7.4 dev: false - /@next/swc-android-arm-eabi@13.2.4: - resolution: {integrity: sha512-DWlalTSkLjDU11MY11jg17O1gGQzpRccM9Oes2yTqj2DpHndajrXHGxj9HGtJ+idq2k7ImUdJVWS2h2l/EDJOw==} - engines: {node: '>= 10'} - cpu: [arm] - os: [android] - requiresBuild: true - dev: true - optional: true - - /@next/swc-android-arm64@13.2.4: - resolution: {integrity: sha512-sRavmUImUCf332Gy+PjIfLkMhiRX1Ez4SI+3vFDRs1N5eXp+uNzjFUK/oLMMOzk6KFSkbiK/3Wt8+dHQR/flNg==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [android] - requiresBuild: true - dev: true - optional: true - - /@next/swc-darwin-arm64@13.2.4: - resolution: {integrity: sha512-S6vBl+OrInP47TM3LlYx65betocKUUlTZDDKzTiRDbsRESeyIkBtZ6Qi5uT2zQs4imqllJznVjFd1bXLx3Aa6A==} + /@next/swc-darwin-arm64@13.3.0: + resolution: {integrity: sha512-DmIQCNq6JtccLPPBzf0dgh2vzMWt5wjxbP71pCi5EWpWYE3MsP6FcRXi4MlAmFNDQOfcFXR2r7kBeG1LpZUh1w==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] @@ -2623,8 +2605,8 @@ packages: dev: true optional: true - /@next/swc-darwin-x64@13.2.4: - resolution: {integrity: sha512-a6LBuoYGcFOPGd4o8TPo7wmv5FnMr+Prz+vYHopEDuhDoMSHOnC+v+Ab4D7F0NMZkvQjEJQdJS3rqgFhlZmKlw==} + /@next/swc-darwin-x64@13.3.0: + resolution: {integrity: sha512-oQoqFa88OGgwnYlnAGHVct618FRI/749se0N3S8t9Bzdv5CRbscnO0RcX901+YnNK4Q6yeiizfgO3b7kogtsZg==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] @@ -2632,26 +2614,8 @@ packages: dev: true optional: true - /@next/swc-freebsd-x64@13.2.4: - resolution: {integrity: sha512-kkbzKVZGPaXRBPisoAQkh3xh22r+TD+5HwoC5bOkALraJ0dsOQgSMAvzMXKsN3tMzJUPS0tjtRf1cTzrQ0I5vQ==} - engines: {node: '>= 10'} - cpu: [x64] - os: [freebsd] - requiresBuild: true - dev: true - optional: true - - /@next/swc-linux-arm-gnueabihf@13.2.4: - resolution: {integrity: sha512-7qA1++UY0fjprqtjBZaOA6cas/7GekpjVsZn/0uHvquuITFCdKGFCsKNBx3S0Rpxmx6WYo0GcmhNRM9ru08BGg==} - engines: {node: '>= 10'} - cpu: [arm] - os: [linux] - requiresBuild: true - dev: true - optional: true - - /@next/swc-linux-arm64-gnu@13.2.4: - resolution: {integrity: sha512-xzYZdAeq883MwXgcwc72hqo/F/dwUxCukpDOkx/j1HTq/J0wJthMGjinN9wH5bPR98Mfeh1MZJ91WWPnZOedOg==} + /@next/swc-linux-arm64-gnu@13.3.0: + resolution: {integrity: sha512-Wzz2p/WqAJUqTVoLo6H18WMeAXo3i+9DkPDae4oQG8LMloJ3if4NEZTnOnTUlro6cq+S/W4pTGa97nWTrOjbGw==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -2659,8 +2623,8 @@ packages: dev: true optional: true - /@next/swc-linux-arm64-musl@13.2.4: - resolution: {integrity: sha512-8rXr3WfmqSiYkb71qzuDP6I6R2T2tpkmf83elDN8z783N9nvTJf2E7eLx86wu2OJCi4T05nuxCsh4IOU3LQ5xw==} + /@next/swc-linux-arm64-musl@13.3.0: + resolution: {integrity: sha512-xPVrIQOQo9WXJYgmoTlMnAD/HlR/1e1ZIWGbwIzEirXBVBqMARUulBEIKdC19zuvoJ477qZJgBDCKtKEykCpyQ==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -2668,8 +2632,8 @@ packages: dev: true optional: true - /@next/swc-linux-x64-gnu@13.2.4: - resolution: {integrity: sha512-Ngxh51zGSlYJ4EfpKG4LI6WfquulNdtmHg1yuOYlaAr33KyPJp4HeN/tivBnAHcZkoNy0hh/SbwDyCnz5PFJQQ==} + /@next/swc-linux-x64-gnu@13.3.0: + resolution: {integrity: sha512-jOFlpGuPD7W2tuXVJP4wt9a3cpNxWAPcloq5EfMJRiXsBBOjLVFZA7boXYxEBzSVgUiVVr1V9T0HFM7pULJ1qA==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -2677,8 +2641,8 @@ packages: dev: true optional: true - /@next/swc-linux-x64-musl@13.2.4: - resolution: {integrity: sha512-gOvwIYoSxd+j14LOcvJr+ekd9fwYT1RyMAHOp7znA10+l40wkFiMONPLWiZuHxfRk+Dy7YdNdDh3ImumvL6VwA==} + /@next/swc-linux-x64-musl@13.3.0: + resolution: {integrity: sha512-2OwKlzaBgmuet9XYHc3KwsEilzb04F540rlRXkAcjMHL7eCxB7uZIGtsVvKOnQLvC/elrUegwSw1+5f7WmfyOw==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -2686,8 +2650,8 @@ packages: dev: true optional: true - /@next/swc-win32-arm64-msvc@13.2.4: - resolution: {integrity: sha512-q3NJzcfClgBm4HvdcnoEncmztxrA5GXqKeiZ/hADvC56pwNALt3ngDC6t6qr1YW9V/EPDxCYeaX4zYxHciW4Dw==} + /@next/swc-win32-arm64-msvc@13.3.0: + resolution: {integrity: sha512-OeHiA6YEvndxT46g+rzFK/MQTfftKxJmzslERMu9LDdC6Kez0bdrgEYed5eXFK2Z1viKZJCGRlhd06rBusyztA==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] @@ -2695,8 +2659,8 @@ packages: dev: true optional: true - /@next/swc-win32-ia32-msvc@13.2.4: - resolution: {integrity: sha512-/eZ5ncmHUYtD2fc6EUmAIZlAJnVT2YmxDsKs1Ourx0ttTtvtma/WKlMV5NoUsyOez0f9ExLyOpeCoz5aj+MPXw==} + /@next/swc-win32-ia32-msvc@13.3.0: + resolution: {integrity: sha512-4aB7K9mcVK1lYEzpOpqWrXHEZympU3oK65fnNcY1Qc4HLJFLJj8AViuqQd4jjjPNuV4sl8jAwTz3gN5VNGWB7w==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] @@ -2704,8 +2668,8 @@ packages: dev: true optional: true - /@next/swc-win32-x64-msvc@13.2.4: - resolution: {integrity: sha512-0MffFmyv7tBLlji01qc0IaPP/LVExzvj7/R5x1Jph1bTAIj4Vu81yFQWHHQAP6r4ff9Ukj1mBK6MDNVXm7Tcvw==} + /@next/swc-win32-x64-msvc@13.3.0: + resolution: {integrity: sha512-Reer6rkLLcoOvB0dd66+Y7WrWVFH7sEEkF/4bJCIfsSKnTStTYaHtwIJAwbqnt9I392Tqvku0KkoqZOryWV9LQ==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -3082,33 +3046,41 @@ packages: - supports-color dev: true - /@vitest/expect@0.29.8: - resolution: {integrity: sha512-xlcVXn5I5oTq6NiZSY3ykyWixBxr5mG8HYtjvpgg6KaqHm0mvhX18xuwl5YGxIRNt/A5jidd7CWcNHrSvgaQqQ==} + /@vitest/expect@0.30.1: + resolution: {integrity: sha512-c3kbEtN8XXJSeN81iDGq29bUzSjQhjES2WR3aColsS4lPGbivwLtas4DNUe0jD9gg/FYGIteqOenfU95EFituw==} dependencies: - '@vitest/spy': 0.29.8 - '@vitest/utils': 0.29.8 + '@vitest/spy': 0.30.1 + '@vitest/utils': 0.30.1 chai: 4.3.7 dev: true - /@vitest/runner@0.29.8: - resolution: {integrity: sha512-FzdhnRDwEr/A3Oo1jtIk/B952BBvP32n1ObMEb23oEJNO+qO5cBet6M2XWIDQmA7BDKGKvmhUf2naXyp/2JEwQ==} + /@vitest/runner@0.30.1: + resolution: {integrity: sha512-W62kT/8i0TF1UBCNMRtRMOBWJKRnNyv9RrjIgdUryEe0wNpGZvvwPDLuzYdxvgSckzjp54DSpv1xUbv4BQ0qVA==} dependencies: - '@vitest/utils': 0.29.8 + '@vitest/utils': 0.30.1 + concordance: 5.0.4 p-limit: 4.0.0 pathe: 1.1.0 dev: true - /@vitest/spy@0.29.8: - resolution: {integrity: sha512-VdjBe9w34vOMl5I5mYEzNX8inTxrZ+tYUVk9jxaZJmHFwmDFC/GV3KBFTA/JKswr3XHvZL+FE/yq5EVhb6pSAw==} + /@vitest/snapshot@0.30.1: + resolution: {integrity: sha512-fJZqKrE99zo27uoZA/azgWyWbFvM1rw2APS05yB0JaLwUIg9aUtvvnBf4q7JWhEcAHmSwbrxKFgyBUga6tq9Tw==} dependencies: - tinyspy: 1.0.2 + magic-string: 0.30.0 + pathe: 1.1.0 + pretty-format: 27.5.1 dev: true - /@vitest/utils@0.29.8: - resolution: {integrity: sha512-qGzuf3vrTbnoY+RjjVVIBYfuWMjn3UMUqyQtdGNZ6ZIIyte7B37exj6LaVkrZiUTvzSadVvO/tJm8AEgbGCBPg==} + /@vitest/spy@0.30.1: + resolution: {integrity: sha512-YfJeIf37GvTZe04ZKxzJfnNNuNSmTEGnla2OdL60C8od16f3zOfv9q9K0nNii0NfjDJRt/CVN/POuY5/zTS+BA==} dependencies: - cli-truncate: 3.1.0 - diff: 5.1.0 + tinyspy: 2.1.0 + dev: true + + /@vitest/utils@0.30.1: + resolution: {integrity: sha512-/c8Xv2zUVc+rnNt84QF0Y0zkfxnaGhp87K2dYJMLtLOIckPzuxLVzAtFCicGFdB4NeBHNzTRr1tNn7rCtQcWFA==} + dependencies: + concordance: 5.0.4 loupe: 2.3.6 pretty-format: 27.5.1 dev: true @@ -3428,6 +3400,10 @@ packages: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} dev: true + /blueimp-md5@2.19.0: + resolution: {integrity: sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w==} + dev: true + /brace-expansion@1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} dependencies: @@ -3477,6 +3453,13 @@ packages: engines: {node: '>=6'} dev: true + /busboy@1.6.0: + resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==} + engines: {node: '>=10.16.0'} + dependencies: + streamsearch: 1.1.0 + dev: true + /cac@6.7.14: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} @@ -3707,6 +3690,20 @@ packages: resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} dev: true + /concordance@5.0.4: + resolution: {integrity: sha512-OAcsnTEYu1ARJqWVGwf4zh4JDfHZEaSNlNccFmt8YjB2l/n19/PF2viLINHc57vO4FKIAFl2FWASIGZZWZ2Kxw==} + engines: {node: '>=10.18.0 <11 || >=12.14.0 <13 || >=14'} + dependencies: + date-time: 3.1.0 + esutils: 2.0.3 + fast-diff: 1.2.0 + js-string-escape: 1.0.1 + lodash: 4.17.21 + md5-hex: 3.0.1 + semver: 7.3.8 + well-known-symbols: 2.0.0 + dev: true + /conventional-changelog-angular@5.0.13: resolution: {integrity: sha512-i/gipMxs7s8L/QeuavPF2hLnJgH6pEZAttySB6aiQLWcX3puWDL3ACVmvBhJGxnAy52Qc15ua26BufY6KpmrVA==} engines: {node: '>=10'} @@ -3832,6 +3829,13 @@ packages: whatwg-url: 12.0.1 dev: true + /date-time@3.1.0: + resolution: {integrity: sha512-uqCUKXE5q1PNBXjPqvwhwJf9SwMoAHBgWJ6DcrnS5o+W2JOiIILl0JEdVD8SGujrNS02GGxgwAg2PN2zONgtjg==} + engines: {node: '>=6'} + dependencies: + time-zone: 1.0.0 + dev: true + /debug@4.3.4: resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} engines: {node: '>=6.0'} @@ -4057,34 +4061,34 @@ packages: '@esbuild/win32-x64': 0.16.17 dev: true - /esbuild@0.17.15: - resolution: {integrity: sha512-LBUV2VsUIc/iD9ME75qhT4aJj0r75abCVS0jakhFzOtR7TQsqQA5w0tZ+KTKnwl3kXE0MhskNdHDh/I5aCR1Zw==} + /esbuild@0.17.16: + resolution: {integrity: sha512-aeSuUKr9aFVY9Dc8ETVELGgkj4urg5isYx8pLf4wlGgB0vTFjxJQdHnNH6Shmx4vYYrOTLCHtRI5i1XZ9l2Zcg==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - '@esbuild/android-arm': 0.17.15 - '@esbuild/android-arm64': 0.17.15 - '@esbuild/android-x64': 0.17.15 - '@esbuild/darwin-arm64': 0.17.15 - '@esbuild/darwin-x64': 0.17.15 - '@esbuild/freebsd-arm64': 0.17.15 - '@esbuild/freebsd-x64': 0.17.15 - '@esbuild/linux-arm': 0.17.15 - '@esbuild/linux-arm64': 0.17.15 - '@esbuild/linux-ia32': 0.17.15 - '@esbuild/linux-loong64': 0.17.15 - '@esbuild/linux-mips64el': 0.17.15 - '@esbuild/linux-ppc64': 0.17.15 - '@esbuild/linux-riscv64': 0.17.15 - '@esbuild/linux-s390x': 0.17.15 - '@esbuild/linux-x64': 0.17.15 - '@esbuild/netbsd-x64': 0.17.15 - '@esbuild/openbsd-x64': 0.17.15 - '@esbuild/sunos-x64': 0.17.15 - '@esbuild/win32-arm64': 0.17.15 - '@esbuild/win32-ia32': 0.17.15 - '@esbuild/win32-x64': 0.17.15 + '@esbuild/android-arm': 0.17.16 + '@esbuild/android-arm64': 0.17.16 + '@esbuild/android-x64': 0.17.16 + '@esbuild/darwin-arm64': 0.17.16 + '@esbuild/darwin-x64': 0.17.16 + '@esbuild/freebsd-arm64': 0.17.16 + '@esbuild/freebsd-x64': 0.17.16 + '@esbuild/linux-arm': 0.17.16 + '@esbuild/linux-arm64': 0.17.16 + '@esbuild/linux-ia32': 0.17.16 + '@esbuild/linux-loong64': 0.17.16 + '@esbuild/linux-mips64el': 0.17.16 + '@esbuild/linux-ppc64': 0.17.16 + '@esbuild/linux-riscv64': 0.17.16 + '@esbuild/linux-s390x': 0.17.16 + '@esbuild/linux-x64': 0.17.16 + '@esbuild/netbsd-x64': 0.17.16 + '@esbuild/openbsd-x64': 0.17.16 + '@esbuild/sunos-x64': 0.17.16 + '@esbuild/win32-arm64': 0.17.16 + '@esbuild/win32-ia32': 0.17.16 + '@esbuild/win32-x64': 0.17.16 dev: true /escalade@3.1.1: @@ -4125,16 +4129,16 @@ packages: source-map: 0.6.1 dev: true - /eslint-config-prettier@8.8.0(eslint@8.37.0): + /eslint-config-prettier@8.8.0(eslint@8.38.0): resolution: {integrity: sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==} hasBin: true peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 8.37.0 + eslint: 8.38.0 dev: true - /eslint-mdx@2.0.5(eslint@8.37.0): + /eslint-mdx@2.0.5(eslint@8.38.0): resolution: {integrity: sha512-1ZzcJwJNfladtuK+uuG/MdC0idc1e3d1vCI2STOq/pLcJBGuao2biWh90vEh2M93zDiNoHJGUIU7UAxupiiHFw==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} peerDependencies: @@ -4143,7 +4147,7 @@ packages: acorn: 8.8.1 acorn-jsx: 5.3.2(acorn@8.8.1) cosmiconfig: 7.0.1 - eslint: 8.37.0 + eslint: 8.38.0 espree: 9.4.0 estree-util-visit: 1.2.0 remark-mdx: 2.1.3 @@ -4159,27 +4163,27 @@ packages: - supports-color dev: true - /eslint-plugin-markdown@3.0.0(eslint@8.37.0): + /eslint-plugin-markdown@3.0.0(eslint@8.38.0): resolution: {integrity: sha512-hRs5RUJGbeHDLfS7ELanT0e29Ocyssf/7kBM+p7KluY5AwngGkDf8Oyu4658/NZSGTTq05FZeWbkxXtbVyHPwg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - eslint: 8.37.0 + eslint: 8.38.0 mdast-util-from-markdown: 0.8.5 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-mdx@2.0.5(eslint@8.37.0): + /eslint-plugin-mdx@2.0.5(eslint@8.38.0): resolution: {integrity: sha512-j2xN97jSlc5IoH94rJTHqYMztl46+hHzyC8Zqjx+OI1Rvv33isyf8xSSBHN6f0z8IJmgPgGsb/fH90JbvKplXg==} engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} peerDependencies: eslint: '>=8.0.0' dependencies: - eslint: 8.37.0 - eslint-mdx: 2.0.5(eslint@8.37.0) - eslint-plugin-markdown: 3.0.0(eslint@8.37.0) + eslint: 8.38.0 + eslint-mdx: 2.0.5(eslint@8.38.0) + eslint-plugin-markdown: 3.0.0(eslint@8.38.0) remark-mdx: 2.1.3 remark-parse: 10.0.1 remark-stringify: 10.0.2 @@ -4190,16 +4194,16 @@ packages: - supports-color dev: true - /eslint-plugin-react-hooks@4.6.0(eslint@8.37.0): + /eslint-plugin-react-hooks@4.6.0(eslint@8.38.0): resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==} engines: {node: '>=10'} peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 dependencies: - eslint: 8.37.0 + eslint: 8.38.0 dev: true - /eslint-plugin-react@7.32.2(eslint@8.37.0): + /eslint-plugin-react@7.32.2(eslint@8.38.0): resolution: {integrity: sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg==} engines: {node: '>=4'} peerDependencies: @@ -4209,7 +4213,7 @@ packages: array.prototype.flatmap: 1.3.1 array.prototype.tosorted: 1.1.1 doctrine: 2.1.0 - eslint: 8.37.0 + eslint: 8.38.0 estraverse: 5.3.0 jsx-ast-utils: 3.3.2 minimatch: 3.1.2 @@ -4241,15 +4245,15 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint@8.37.0: - resolution: {integrity: sha512-NU3Ps9nI05GUoVMxcZx1J8CNR6xOvUT4jAUMH5+z8lpp3aEdPVCImKw6PWG4PY+Vfkpr+jvMpxs/qoE7wq0sPw==} + /eslint@8.38.0: + resolution: {integrity: sha512-pIdsD2jwlUGf/U38Jv97t8lq6HpaU/G9NKbYmpWpZGw3LdTNhZLbJePqxOXGB5+JEKfOPU/XLxYxFh03nr1KTg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.3.0(eslint@8.37.0) + '@eslint-community/eslint-utils': 4.3.0(eslint@8.38.0) '@eslint-community/regexpp': 4.4.0 '@eslint/eslintrc': 2.0.2 - '@eslint/js': 8.37.0 + '@eslint/js': 8.38.0 '@humanwhocodes/config-array': 0.11.8 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 @@ -4437,6 +4441,10 @@ packages: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} dev: true + /fast-diff@1.2.0: + resolution: {integrity: sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==} + dev: true + /fast-json-stable-stringify@2.1.0: resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} dev: true @@ -5256,6 +5264,11 @@ packages: resolution: {integrity: sha512-Y2/yD55y5jteOAmY50JbUZYwk3CP3wnLPEZnlR1w9oKhITrBEtAxwuWKebFf8hMrPMgbYwFoWK/lH2sBkErELw==} dev: true + /js-string-escape@1.0.1: + resolution: {integrity: sha512-Smw4xcfIQ5LVjAOuJCvN/zIodzA/BBSsluuoSykP+lUvScIi4U6RJLfwHet5cxFnCswUjISV8oAXaqaJDY3chg==} + engines: {node: '>= 0.8'} + dev: true + /js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} @@ -5409,8 +5422,8 @@ packages: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} dev: true - /lint-staged@13.2.0: - resolution: {integrity: sha512-GbyK5iWinax5Dfw5obm2g2ccUiZXNGtAS4mCbJ0Lv4rq6iEtfBSjOYdcbOtAIFtM114t0vdpViDDetjVTSd8Vw==} + /lint-staged@13.2.1: + resolution: {integrity: sha512-8gfzinVXoPfga5Dz/ZOn8I2GOhf81Wvs+KwbEXQn/oWZAvCVS2PivrXfVbFJc93zD16uC0neS47RXHIjXKYZQw==} engines: {node: ^14.13.1 || >=16.0.0} hasBin: true dependencies: @@ -5451,8 +5464,8 @@ packages: wrap-ansi: 7.0.0 dev: true - /local-pkg@0.4.2: - resolution: {integrity: sha512-mlERgSPrbxU3BP4qBqAvvwlgW4MTg78iwJdGGnv7kibKjWcJksrG3t6LB5lXI93wXRDvG4NpUgJFmTG4T6rdrg==} + /local-pkg@0.4.3: + resolution: {integrity: sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==} engines: {node: '>=14'} dev: true @@ -5584,6 +5597,13 @@ packages: '@jridgewell/sourcemap-codec': 1.4.14 dev: true + /magic-string@0.30.0: + resolution: {integrity: sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ==} + engines: {node: '>=12'} + dependencies: + '@jridgewell/sourcemap-codec': 1.4.14 + dev: true + /make-error@1.3.6: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} dev: true @@ -5617,6 +5637,13 @@ packages: hasBin: true dev: false + /md5-hex@3.0.1: + resolution: {integrity: sha512-BUiRtTtV39LIJwinWBjqVsU9xhdnz7/i889V859IBFpuqGAj6LuOvHv5XLbgZ2R7ptJoJaEcxkv88/h25T7Ciw==} + engines: {node: '>=8'} + dependencies: + blueimp-md5: 2.19.0 + dev: true + /mdast-heading-id@1.0.0: resolution: {integrity: sha512-KM/X3f7Yqr8P4UJI63URPFIn5tjfLREkh30ni8fC+R942md275R/VCJ2XXG7Lonu2f1mNUm5tBRhHPTScR4L1g==} dev: false @@ -6246,13 +6273,13 @@ packages: resolution: {integrity: sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==} dev: true - /mlly@1.1.0: - resolution: {integrity: sha512-cwzBrBfwGC1gYJyfcy8TcZU1f+dbH/T+TuOhtYP2wLv/Fb51/uV7HJQfBPtEupZ2ORLRU1EKFS/QfS3eo9+kBQ==} + /mlly@1.2.0: + resolution: {integrity: sha512-+c7A3CV0KGdKcylsI6khWyts/CYrGTrRVo4R/I7u/cUsy0Conxa6LUhiEzVKIw14lc2L5aiO4+SeVe4TeGRKww==} dependencies: acorn: 8.8.2 pathe: 1.1.0 - pkg-types: 1.0.1 - ufo: 1.0.1 + pkg-types: 1.0.2 + ufo: 1.1.1 dev: true /mri@1.2.0: @@ -6289,12 +6316,12 @@ packages: - supports-color dev: false - /next@13.2.4(@babel/core@7.20.12)(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-g1I30317cThkEpvzfXujf0O4wtaQHtDCLhlivwlTJ885Ld+eOgcz7r3TGQzeU+cSRoNHtD8tsJgzxVdYojFssw==} + /next@13.3.0(@babel/core@7.20.12)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-OVTw8MpIPa12+DCUkPqRGPS3thlJPcwae2ZL4xti3iBff27goH024xy4q2lhlsdoYiKOi8Kz6uJoLW/GXwgfOA==} engines: {node: '>=14.6.0'} hasBin: true peerDependencies: - '@opentelemetry/api': ^1.4.0 + '@opentelemetry/api': ^1.1.0 fibers: '>= 3.1.0' node-sass: ^6.0.0 || ^7.0.0 react: ^18.2.0 @@ -6310,27 +6337,24 @@ packages: sass: optional: true dependencies: - '@next/env': 13.2.4 + '@next/env': 13.3.0 '@swc/helpers': 0.4.14 + busboy: 1.6.0 caniuse-lite: 1.0.30001414 postcss: 8.4.14 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) styled-jsx: 5.1.1(@babel/core@7.20.12)(react@18.2.0) optionalDependencies: - '@next/swc-android-arm-eabi': 13.2.4 - '@next/swc-android-arm64': 13.2.4 - '@next/swc-darwin-arm64': 13.2.4 - '@next/swc-darwin-x64': 13.2.4 - '@next/swc-freebsd-x64': 13.2.4 - '@next/swc-linux-arm-gnueabihf': 13.2.4 - '@next/swc-linux-arm64-gnu': 13.2.4 - '@next/swc-linux-arm64-musl': 13.2.4 - '@next/swc-linux-x64-gnu': 13.2.4 - '@next/swc-linux-x64-musl': 13.2.4 - '@next/swc-win32-arm64-msvc': 13.2.4 - '@next/swc-win32-ia32-msvc': 13.2.4 - '@next/swc-win32-x64-msvc': 13.2.4 + '@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 transitivePeerDependencies: - '@babel/core' - babel-plugin-macros @@ -6689,11 +6713,11 @@ packages: find-up: 6.3.0 dev: true - /pkg-types@1.0.1: - resolution: {integrity: sha512-jHv9HB+Ho7dj6ItwppRDDl0iZRYBD0jsakHXtFgoLr+cHSF6xC+QL54sJmWxyGxOLYSHm0afhXhXcQDQqH9z8g==} + /pkg-types@1.0.2: + resolution: {integrity: sha512-hM58GKXOcj8WTqUXnsQyJYXdeAPbythQgEF3nTcEo+nkD49chjQ9IKm/QJy9xf6JakXptz86h7ecP2024rrLaQ==} dependencies: jsonc-parser: 3.2.0 - mlly: 1.1.0 + mlly: 1.2.0 pathe: 1.1.0 dev: true @@ -7550,6 +7574,11 @@ packages: resolution: {integrity: sha512-uUZI65yrV2Qva5gqE0+A7uVAvO40iPo6jGhs7s8keRfHCmtg+uB2X6EiLGCI9IgL1J17xGhvoOqSz79lzICPTA==} dev: true + /streamsearch@1.1.0: + resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} + engines: {node: '>=10.0.0'} + dev: true + /string-argv@0.3.1: resolution: {integrity: sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==} engines: {node: '>=0.6.19'} @@ -7662,8 +7691,8 @@ packages: engines: {node: '>=8'} dev: true - /strip-literal@1.0.0: - resolution: {integrity: sha512-5o4LsH1lzBzO9UFH63AJ2ad2/S2AVx6NtjOcaz+VTT2h1RiRvbipW72z8M/lxEhcPHDBQwpDrnTF7sXy/7OwCQ==} + /strip-literal@1.0.1: + resolution: {integrity: sha512-QZTsipNpa2Ppr6v1AmJHESqJ3Uz247MUS0OjrnnZjFAvEoWqxuyFuXn2xLgMtRnijJShAa1HL0gtJyUs7u7n3Q==} dependencies: acorn: 8.8.2 dev: true @@ -7747,6 +7776,11 @@ packages: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} dev: true + /time-zone@1.0.0: + resolution: {integrity: sha512-TIsDdtKo6+XrPtiTm1ssmMngN1sAhyKnTO2kunQWqNPWIVvCm15Wmw4SWInwTVgJ5u/Tr04+8Ei9TNcw4x4ONA==} + engines: {node: '>=4'} + dev: true + /tiny-glob@0.2.9: resolution: {integrity: sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==} dependencies: @@ -7754,8 +7788,8 @@ packages: globrex: 0.1.2 dev: true - /tinybench@2.3.1: - resolution: {integrity: sha512-hGYWYBMPr7p4g5IarQE7XhlyWveh1EKhy4wUBS1LrHXCKYgvz+4/jCqgmJqZxxldesn05vccrtME2RLLZNW7iA==} + /tinybench@2.4.0: + resolution: {integrity: sha512-iyziEiyFxX4kyxSp+MtY1oCH/lvjH3PxFN8PGCDeqcZWAJ/i+9y+nL85w99PxVzrIvew/GSkSbDYtiGVa85Afg==} dev: true /tinypool@0.4.0: @@ -7763,8 +7797,8 @@ packages: engines: {node: '>=14.0.0'} dev: true - /tinyspy@1.0.2: - resolution: {integrity: sha512-bSGlgwLBYf7PnUsQ6WOc6SJ3pGOcd+d8AA6EUnLDDM0kWEstC1JIlSZA3UNliDXhd9ABoS7hiRBDCu+XP/sf1Q==} + /tinyspy@2.1.0: + resolution: {integrity: sha512-7eORpyqImoOvkQJCSkL0d0mB4NHHIFAy4b1u8PHdDa7SjGS2njzl6/lyGoZLm+eyYEtlUmFGE0rFj66SWxZgQQ==} engines: {node: '>=14.0.0'} dev: true @@ -7910,8 +7944,8 @@ packages: hasBin: true dev: true - /ufo@1.0.1: - resolution: {integrity: sha512-boAm74ubXHY7KJQZLlXrtMz52qFvpsbOxDcZOnw/Wf+LS4Mmyu7JxmzD4tDLtUQtmZECypJ0FrCz4QIe6dvKRA==} + /ufo@1.1.1: + resolution: {integrity: sha512-MvlCc4GHrmZdAllBc0iUDowff36Q9Ndw/UzqmEKyrfSzokTd9ZCy1i+IIk5hrYKkjoYVQyNbrw7/F8XJ2rEwTg==} dev: true /unbox-primitive@1.0.2: @@ -8192,14 +8226,14 @@ packages: unist-util-stringify-position: 3.0.2 vfile-message: 3.1.2 - /vite-node@0.29.8(@types/node@18.0.6): - resolution: {integrity: sha512-b6OtCXfk65L6SElVM20q5G546yu10/kNrhg08afEoWlFRJXFq9/6glsvSVY+aI6YeC1tu2TtAqI2jHEQmOmsFw==} - engines: {node: '>=v14.16.0'} + /vite-node@0.30.1(@types/node@18.0.6): + resolution: {integrity: sha512-vTikpU/J7e6LU/8iM3dzBo8ZhEiKZEKRznEMm+mJh95XhWaPrJQraT/QsT2NWmuEf+zgAoMe64PKT7hfZ1Njmg==} + engines: {node: '>=v14.18.0'} hasBin: true dependencies: cac: 6.7.14 debug: 4.3.4 - mlly: 1.1.0 + mlly: 1.2.0 pathe: 1.1.0 picocolors: 1.0.0 vite: 4.1.1(@types/node@18.0.6) @@ -8247,9 +8281,9 @@ packages: fsevents: 2.3.2 dev: true - /vitest@0.29.8(jsdom@21.1.1): - resolution: {integrity: sha512-JIAVi2GK5cvA6awGpH0HvH/gEG9PZ0a/WoxdiV3PmqK+3CjQMf8c+J/Vhv4mdZ2nRyXFw66sAg6qz7VNkaHfDQ==} - engines: {node: '>=v14.16.0'} + /vitest@0.30.1(jsdom@21.1.1): + resolution: {integrity: sha512-y35WTrSTlTxfMLttgQk4rHcaDkbHQwDP++SNwPb+7H8yb13Q3cu2EixrtHzF27iZ8v0XCciSsLg00RkPAzB/aA==} + engines: {node: '>=v14.18.0'} hasBin: true peerDependencies: '@edge-runtime/vm': '*' @@ -8281,27 +8315,29 @@ packages: '@types/chai': 4.3.4 '@types/chai-subset': 1.3.3 '@types/node': 18.0.6 - '@vitest/expect': 0.29.8 - '@vitest/runner': 0.29.8 - '@vitest/spy': 0.29.8 - '@vitest/utils': 0.29.8 + '@vitest/expect': 0.30.1 + '@vitest/runner': 0.30.1 + '@vitest/snapshot': 0.30.1 + '@vitest/spy': 0.30.1 + '@vitest/utils': 0.30.1 acorn: 8.8.2 acorn-walk: 8.2.0 cac: 6.7.14 chai: 4.3.7 + concordance: 5.0.4 debug: 4.3.4 jsdom: 21.1.1 - local-pkg: 0.4.2 + local-pkg: 0.4.3 + magic-string: 0.30.0 pathe: 1.1.0 picocolors: 1.0.0 source-map: 0.6.1 std-env: 3.3.2 - strip-literal: 1.0.0 - tinybench: 2.3.1 + strip-literal: 1.0.1 + tinybench: 2.4.0 tinypool: 0.4.0 - tinyspy: 1.0.2 vite: 4.1.1(@types/node@18.0.6) - vite-node: 0.29.8(@types/node@18.0.6) + vite-node: 0.30.1(@types/node@18.0.6) why-is-node-running: 2.2.2 transitivePeerDependencies: - less @@ -8337,6 +8373,11 @@ packages: engines: {node: '>=12'} dev: true + /well-known-symbols@2.0.0: + resolution: {integrity: sha512-ZMjC3ho+KXo0BfJb7JgtQ5IBuvnShdlACNkKkdsqBmYw3bPAaJfPeYUo6tLUaT5tG/Gkh7xkpBhKRQ9e7pyg9Q==} + engines: {node: '>=6'} + dev: true + /whatwg-encoding@2.0.0: resolution: {integrity: sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==} engines: {node: '>=12'} diff --git a/src/lib/docs.js b/src/lib/docs.js index 3f6b7dc..7b83104 100644 --- a/src/lib/docs.js +++ b/src/lib/docs.js @@ -50,11 +50,6 @@ export function findRouteByPath(path, routes, options) { removeFromLast(route.path, extension).replace(`/${DOCS_FALLBACK}`, '') ] - if (options.debug === true) { - console.log(matches) - console.log(matchPath) - } - if (matches.includes(matchPath)) { return route } diff --git a/src/lib/remark-plugins/links/index.js b/src/lib/remark-plugins/links/index.js index 61d4a3e..b326d65 100644 --- a/src/lib/remark-plugins/links/index.js +++ b/src/lib/remark-plugins/links/index.js @@ -1,109 +1,80 @@ import { visit } from 'unist-util-visit' +import { resolve, sep } from 'node:path' export default function relativeLinks(options) { - let pathParts = [] let extensions = ['.mdx', '.md'] - const slug = options.slug - + let rootPath = options.rootPath + const prefix = options.prefix if (options.extensions) { extensions = options.extensions } - // Note: this has gotten incredibly complex over time and could use some refactoring + /** + * This function takes an internal url and converts it into a web url. + * It handles relative and absolute paths. + * + * @param {*} node + * @returns node + */ function visitor(node) { - let nodePrefix = options.prefix - if (node && node.url && !node.url.startsWith('http')) { - if (process.env.DEBUG === 'true') { - // helps to identify "special cases" and add those to the tests - console.log(node.url, options) - } - - // ignore mailto: links - if (node.url.startsWith('mailto:')) { - return - } - - // handle relative paths - if (node.url.startsWith('#')) { - if (slug[0] === nodePrefix) { - pathParts = slug.slice(1) - } else { - pathParts = slug - } - } else if (slug && Array.isArray(slug)) { - if (slug[0] === nodePrefix) { - slug.shift() - } - const depth = (node.url.match(/\.\.\//g) || []).length - if (slug.length <= 1) { - pathParts = slug - } else if (depth >= slug.length) { - nodePrefix = '' - pathParts = [] - } else { - // Special case for links that do not have a path prefix and end with a slash to direct into a README - if ( - node.url.match(/^[a-zA-Z]/) && - node.url.endsWith('/') && - options.trailingSlash === true - ) { - pathParts = slug - } else { - const removeLast = slug.length - depth - 1 - pathParts = slug.slice(0, removeLast) - } - } + if ( + node && + node.url && + !node.url.startsWith('http') && + !node.url.startsWith('mailto:') + ) { + // keep a copy of the original node url for comparison + const originalUrl = node.url + + if (options.debug) { + console.log(rootPath, node.url, options) } - if (node.url.startsWith('/')) { - node.url = node.url.replace('/', '') + // remove the filename from the rootPath if it's an anchor link + if (!node.url.startsWith('#')) { + rootPath = rootPath.split('/').slice(0, -1).join('/') } - if (node.url.startsWith('./')) { - node.url = node.url.replace('./', '') + // drop all extensions from root and node url + for (const ext of extensions) { + rootPath = rootPath.replace(ext, '') + node.url = node.url.replace(ext, '') } - if (node.url.startsWith('../')) { - node.url = node.url.replace(/\.\.\//g, '') + // drop README from root and node url + rootPath = rootPath.replace('/README', '') + node.url = node.url.replace('/README', '') + + // check if the depth of the node.url goes beyond the rootPath + const rootPathParts = rootPath.split(sep).slice(1) + const depth = (originalUrl.match(/\.\.\//g) || []).length + const skipPrefix = depth > 0 && rootPathParts.length === depth + + const relative = resolve(rootPath, node.url) + if ( + !skipPrefix && + !relative.startsWith(`/${prefix}`) && + !originalUrl.startsWith('/') + ) { + node.url = `/${prefix}${relative}` + } else { + node.url = relative } - let path = '' - if (pathParts) { - if (pathParts.length >= 1) { - if (pathParts[0] !== nodePrefix) { - path = nodePrefix + '/' + pathParts.join('/') - } - path += '/' - } else { - if (nodePrefix) { - path = nodePrefix + '/' - } - } + if (options.debug) { + console.log(`rootPath: ${rootPath}`) + console.log(`nodeUrl: ${originalUrl}`) + console.log(`calculated URL: ${relative}`) } - node.url = `/${path}${node.url}` - - if (options.trailingSlash && node.url.includes('#')) { + // add trailing slash and handle anchor link if needed + if (options.trailingSlash && originalUrl.includes('#')) { if (!node.url.includes('/#')) { node.url = node.url.replace('#', '/#') } } else if (options.trailingSlash === true && !node.url.endsWith('/')) { node.url += '/' } - - for (const ext of extensions) { - if (node.url.includes(ext)) { - node.url = node.url.replace(ext, '') - } - } - - if (node.url.includes('README')) { - node.url = node.url.replace('README', '') - } - - if (node.url.endsWith('//')) { - node.url = node.url.slice(0, -1) - } } } diff --git a/src/serialize.js b/src/serialize.js index 2b2f658..c84fa2d 100644 --- a/src/serialize.js +++ b/src/serialize.js @@ -63,10 +63,7 @@ export async function pageProps(context, args) { return { notFound: true } - const inlineLinkSlugHelper = - params.slug?.length > 0 && route.path.endsWith('README.md') - ? params.slug?.concat(['README']) - : params.slug + const manifestRoutes = cloneDeep(manifest.routes) replaceDefaultPath(manifestRoutes, options) @@ -143,9 +140,10 @@ export async function pageProps(context, args) { remarkInternalLinks, { prefix: docsFolder, - slug: inlineLinkSlugHelper, extensions: ['.mdx', '.md'], - trailingSlash: trailingSlash + trailingSlash: trailingSlash, + rootPath: route.path, + debug: options.debug } ] ] diff --git a/test/remark-plugins/links.test.js b/test/remark-plugins/links.test.js index 5806f43..c235ee1 100644 --- a/test/remark-plugins/links.test.js +++ b/test/remark-plugins/links.test.js @@ -3,9 +3,9 @@ import relativeLinks from '../../src/lib/remark-plugins/links/index' const cases = [ { + rootPath: '/docs/guides/README.md', url: './test-remote.txt', prefix: 'docs', - slug: ['guides'], expected: '/docs/guides/test-remote/', options: { trailingSlash: true, @@ -14,158 +14,167 @@ const cases = [ }, { url: './test-remote', + rootPath: '/docs/guides/contributor/workflows.md', prefix: 'docs', - slug: ['guides', 'contributor', 'workflows'], expected: '/docs/guides/contributor/test-remote' }, { url: 'mailto:hello@wor.ld', + rootPath: '/docs/guides/README.md', prefix: 'docs', - slug: ['guides', 'contributor', 'workflows'], expected: 'mailto:hello@wor.ld' }, { url: '../usage/kube-csr.md', + rootPath: '/docs/faq/README.md', prefix: 'docs', - slug: ['faq', 'README'], expected: '/docs/usage/kube-csr' }, { url: './kubectl.md', + rootPath: '/docs/installation/README.md', prefix: 'docs', - slug: ['installation'], expected: '/docs/installation/kubectl' }, { url: './references/concepts.md', + rootPath: '/docs/README.md', prefix: 'docs', - slug: [], expected: '/docs/references/concepts' }, { url: '../../references/cli.md', + rootPath: '/docs/guides/administrator/gcp-setup.md', prefix: 'docs', - slug: ['guides', 'administrator', 'gcp-setup'], expected: '/docs/references/cli' }, { url: './writing-docs.md#get-on-your-marks', + rootPath: '/docs/guides/contributor/workflows.md', prefix: 'docs', - slug: ['guides', 'contributor', 'workflows'], expected: '/docs/guides/contributor/writing-docs#get-on-your-marks' }, { url: '../guides/user/sending-metrics-with-prometheus.md#remote_write-configuration-block-the-basics', + rootPath: '/docs/references/faq.md', prefix: 'docs', - slug: ['references', 'faq'], expected: '/docs/guides/user/sending-metrics-with-prometheus#remote_write-configuration-block-the-basics' }, { url: '../faq/README.md', + rootPath: '/docs/installation/verify.md', prefix: 'docs', - slug: ['installation', 'verify'], - expected: '/docs/faq/' + expected: '/docs/faq' }, { url: '#managed-identity-using-aad-pod-identities', + rootPath: '/docs/configuration/acme/dns01/azuredns.md', prefix: 'docs', - slug: ['docs', 'configuration', 'acme', 'dns01', 'azuredns'], expected: '/docs/configuration/acme/dns01/azuredns/#managed-identity-using-aad-pod-identities' }, { url: '#redhat', + rootPath: '/docs/step-cli/installation.md', prefix: 'docs', - slug: ['docs', 'step-cli', 'installation'], expected: '/docs/step-cli/installation/#redhat', options: { skipPathPrefix: true, useMDX: true, trailingSlash: true } }, { url: '#challenge-scheduling', + rootPath: '/docs/concepts/acme-orders-challenges.md', prefix: 'docs', - slug: ['concepts', 'acme-orders-challenges'], expected: '/docs/concepts/acme-orders-challenges/#challenge-scheduling' }, - { - url: '/release-notes-1.7.md', - prefix: 'docs', - slug: ['release-notes', 'README'], - expected: '/docs/release-notes/release-notes-1.7' - }, { url: './acme-dns.md', + rootPath: '/docs/configuration/acme/dns01/README.md', prefix: 'docs', - slug: ['configuration', 'acme', 'dns01', 'README'], expected: '/docs/configuration/acme/dns01/acme-dns' }, { url: '#reinstalling-cert-manager', + rootPath: '/docs/installation/upgrading.md', prefix: 'docs', - slug: ['installation', 'upgrading'], expected: '/docs/installation/upgrading/#reinstalling-cert-manager' }, { url: '../faq/README.md#kubernetes-has-a-builtin-certificatesigningrequest-api-why-not-use-that', + rootPath: '/docs/contributing/policy.md', prefix: 'docs', - slug: ['contributing', 'policy'], + options: { trailingSlash: true }, expected: '/docs/faq/#kubernetes-has-a-builtin-certificatesigningrequest-api-why-not-use-that' }, { url: '../../docs/installation/supported-releases.md', + rootPath: '/docs/installation/supported-releases.md', prefix: 'docs', - slug: ['installation', 'supported-releases'], expected: '/docs/installation/supported-releases' }, { url: '../../v1.8-docs/cli/controller.md', + rootPath: '/docs/release-notes/release-notes-1.8.md', prefix: 'docs', - slug: ['release-notes', 'release-notes-1.8'], expected: '/v1.8-docs/cli/controller' }, { url: '../../docs/installation/supported-releases.md', + rootPath: '/v1.8-docs/installation/helm.md', prefix: 'v1.8-docs', - slug: ['v1.8-docs', 'installation', 'helm'], expected: '/docs/installation/supported-releases/', options: { trailingSlash: true } }, { url: './compatibility.md', + rootPath: '/v1.8-docs/installation/helm.md', prefix: 'v1.8-docs', - slug: ['installation', 'helm'], expected: '/v1.8-docs/installation/compatibility' }, { url: 'ingress.md#supported-annotation', + rootPath: '/docs/usage/gateway.md', prefix: 'docs', - slug: ['usage', 'gateway'], options: { trailingSlash: true }, expected: '/docs/usage/ingress/#supported-annotation' }, { url: './ingress.md#supported-annotation', + rootPath: '/docs/usage/gateway.md', prefix: 'docs', - slug: ['usage', 'gateway'], options: { trailingSlash: true }, expected: '/docs/usage/ingress/#supported-annotation' }, { url: 'base64/', + rootPath: '/docs/step-cli/reference/README.md', prefix: 'docs', - slug: ['step-cli', 'reference'], options: { trailingSlash: true, useMDX: true }, expected: '/docs/step-cli/reference/base64/' + }, + { + url: '../certificate-manager/', + rootPath: '/docs/step-cli/README.mdx', + prefix: 'docs', + options: { trailingSlash: true, useMDX: true }, + expected: '/docs/certificate-manager/' + }, + { + url: '../certificate-manager/', + rootPath: '/step-cli/README.mdx', + prefix: '', + options: { trailingSlash: true, useMDX: true }, + expected: '/certificate-manager/' } ] test.each(cases)( 'transform $url', - ({ url, prefix, slug, expected, options = {} }) => { + ({ url, prefix, rootPath, expected, options = {} }) => { const transform = relativeLinks({ prefix: prefix, - slug: slug, + rootPath: rootPath, ...options }) const tree = {