From 55029dda07b0510bd13c0b3f9e7a331149fb91e0 Mon Sep 17 00:00:00 2001 From: Catherine Deskur <46695336+chdeskur@users.noreply.github.com> Date: Thu, 26 Dec 2024 10:12:36 -0500 Subject: [PATCH] chore(deps): upgrade fontawesome (#1944) --- .../components/src/FontAwesomeIcon.tsx | 23 ++- packages/fern-docs/icons-cdn/package.json | 22 +-- pnpm-lock.yaml | 140 +++++++++--------- 3 files changed, 98 insertions(+), 87 deletions(-) diff --git a/packages/fern-docs/components/src/FontAwesomeIcon.tsx b/packages/fern-docs/components/src/FontAwesomeIcon.tsx index 128d9c4e18..197b2d1a71 100644 --- a/packages/fern-docs/components/src/FontAwesomeIcon.tsx +++ b/packages/fern-docs/components/src/FontAwesomeIcon.tsx @@ -66,13 +66,24 @@ function getCdnHost() { ); } +// parse any font awesome icon into two parts: style and icon name function parseFontAwesomeIcon(icon: string): [string, string] | undefined { - const [left, right] = icon.split(" "); - if (left && right) { - return [left.replace("fa-", ""), right.replace("fa-", "")]; + const parts = icon.replaceAll("fa-", "").split(" "); + if (parts.length === 0) { + return; } - if (left) { - return ["solid", left.replace("fa-", "")]; + + // if no style is specified, default to solid style + if (parts.length === 1 && parts[0] != null) { + return ["solid", parts[0]]; + } + + const iconName = parts.pop(); + if (iconName == null) { + return; } - return; + + // if multiple styles are specified, join them with a dash + const style = parts.join("-"); + return [style, iconName]; } diff --git a/packages/fern-docs/icons-cdn/package.json b/packages/fern-docs/icons-cdn/package.json index 79f1c3eb30..d999bb13f6 100644 --- a/packages/fern-docs/icons-cdn/package.json +++ b/packages/fern-docs/icons-cdn/package.json @@ -23,17 +23,17 @@ "test": "vitest --run --passWithNoTests --globals" }, "dependencies": { - "@fortawesome/fontawesome-svg-core": "^6.5.1", - "@fortawesome/free-brands-svg-icons": "^6.5.2", - "@fortawesome/pro-duotone-svg-icons": "^6.5.2", - "@fortawesome/pro-light-svg-icons": "^6.5.2", - "@fortawesome/pro-regular-svg-icons": "^6.5.2", - "@fortawesome/pro-solid-svg-icons": "^6.5.2", - "@fortawesome/pro-thin-svg-icons": "^6.5.2", - "@fortawesome/sharp-light-svg-icons": "^6.5.2", - "@fortawesome/sharp-regular-svg-icons": "^6.5.2", - "@fortawesome/sharp-solid-svg-icons": "^6.5.2", - "@fortawesome/sharp-thin-svg-icons": "^6.5.2", + "@fortawesome/fontawesome-svg-core": "^6.7.2", + "@fortawesome/free-brands-svg-icons": "^6.7.2", + "@fortawesome/pro-duotone-svg-icons": "^6.7.2", + "@fortawesome/pro-light-svg-icons": "^6.7.2", + "@fortawesome/pro-regular-svg-icons": "^6.7.2", + "@fortawesome/pro-solid-svg-icons": "^6.7.2", + "@fortawesome/pro-thin-svg-icons": "^6.7.2", + "@fortawesome/sharp-light-svg-icons": "^6.7.2", + "@fortawesome/sharp-regular-svg-icons": "^6.7.2", + "@fortawesome/sharp-solid-svg-icons": "^6.7.2", + "@fortawesome/sharp-thin-svg-icons": "^6.7.2", "react": "^18", "react-dom": "^18" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index acfe32c0b8..7a3915c000 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1206,38 +1206,38 @@ importers: packages/fern-docs/icons-cdn: dependencies: '@fortawesome/fontawesome-svg-core': - specifier: ^6.5.1 - version: 6.5.2 + specifier: ^6.7.2 + version: 6.7.2 '@fortawesome/free-brands-svg-icons': - specifier: ^6.5.2 - version: 6.5.2 + specifier: ^6.7.2 + version: 6.7.2 '@fortawesome/pro-duotone-svg-icons': - specifier: ^6.5.2 - version: 6.5.2 + specifier: ^6.7.2 + version: 6.7.2 '@fortawesome/pro-light-svg-icons': - specifier: ^6.5.2 - version: 6.5.2 + specifier: ^6.7.2 + version: 6.7.2 '@fortawesome/pro-regular-svg-icons': - specifier: ^6.5.2 - version: 6.5.2 + specifier: ^6.7.2 + version: 6.7.2 '@fortawesome/pro-solid-svg-icons': - specifier: ^6.5.2 - version: 6.5.2 + specifier: ^6.7.2 + version: 6.7.2 '@fortawesome/pro-thin-svg-icons': - specifier: ^6.5.2 - version: 6.5.2 + specifier: ^6.7.2 + version: 6.7.2 '@fortawesome/sharp-light-svg-icons': - specifier: ^6.5.2 - version: 6.5.2 + specifier: ^6.7.2 + version: 6.7.2 '@fortawesome/sharp-regular-svg-icons': - specifier: ^6.5.2 - version: 6.5.2 + specifier: ^6.7.2 + version: 6.7.2 '@fortawesome/sharp-solid-svg-icons': - specifier: ^6.5.2 - version: 6.5.2 + specifier: ^6.7.2 + version: 6.7.2 '@fortawesome/sharp-thin-svg-icons': - specifier: ^6.5.2 - version: 6.5.2 + specifier: ^6.7.2 + version: 6.7.2 react: specifier: 18.3.1 version: 18.3.1 @@ -4472,52 +4472,52 @@ packages: '@floating-ui/utils@0.2.8': resolution: {integrity: sha512-kym7SodPp8/wloecOpcmSnWJsK7M0E5Wg8UcFA+uO4B9s5d0ywXOEro/8HM9x0rW+TljRzul/14UYz3TleT3ig==} - '@fortawesome/fontawesome-common-types@6.5.2': - resolution: {integrity: sha512-gBxPg3aVO6J0kpfHNILc+NMhXnqHumFxOmjYCFfOiLZfwhnnfhtsdA2hfJlDnj+8PjAs6kKQPenOTKj3Rf7zHw==, tarball: https://npm.fontawesome.com/@fortawesome/fontawesome-common-types/-/6.5.2/fontawesome-common-types-6.5.2.tgz} + '@fortawesome/fontawesome-common-types@6.7.2': + resolution: {integrity: sha512-Zs+YeHUC5fkt7Mg1l6XTniei3k4bwG/yo3iFUtZWd/pMx9g3fdvkSK9E0FOC+++phXOka78uJcYb8JaFkW52Xg==, tarball: https://npm.fontawesome.com/@fortawesome/fontawesome-common-types/-/6.7.2/fontawesome-common-types-6.7.2.tgz} engines: {node: '>=6'} - '@fortawesome/fontawesome-svg-core@6.5.2': - resolution: {integrity: sha512-5CdaCBGl8Rh9ohNdxeeTMxIj8oc3KNBgIeLMvJosBMdslK/UnEB8rzyDRrbKdL1kDweqBPo4GT9wvnakHWucZw==, tarball: https://npm.fontawesome.com/@fortawesome/fontawesome-svg-core/-/6.5.2/fontawesome-svg-core-6.5.2.tgz} + '@fortawesome/fontawesome-svg-core@6.7.2': + resolution: {integrity: sha512-yxtOBWDrdi5DD5o1pmVdq3WMCvnobT0LU6R8RyyVXPvFRd2o79/0NCuQoCjNTeZz9EzA9xS3JxNWfv54RIHFEA==, tarball: https://npm.fontawesome.com/@fortawesome/fontawesome-svg-core/-/6.7.2/fontawesome-svg-core-6.7.2.tgz} engines: {node: '>=6'} - '@fortawesome/free-brands-svg-icons@6.5.2': - resolution: {integrity: sha512-zi5FNYdmKLnEc0jc0uuHH17kz/hfYTg4Uei0wMGzcoCL/4d3WM3u1VMc0iGGa31HuhV5i7ZK8ZlTCQrHqRHSGQ==, tarball: https://npm.fontawesome.com/@fortawesome/free-brands-svg-icons/-/6.5.2/free-brands-svg-icons-6.5.2.tgz} + '@fortawesome/free-brands-svg-icons@6.7.2': + resolution: {integrity: sha512-zu0evbcRTgjKfrr77/2XX+bU+kuGfjm0LbajJHVIgBWNIDzrhpRxiCPNT8DW5AdmSsq7Mcf9D1bH0aSeSUSM+Q==, tarball: https://npm.fontawesome.com/@fortawesome/free-brands-svg-icons/-/6.7.2/free-brands-svg-icons-6.7.2.tgz} engines: {node: '>=6'} - '@fortawesome/pro-duotone-svg-icons@6.5.2': - resolution: {integrity: sha512-U8dWrpPxajix1ijJQI8dWkSRpDPnXS/3/XJnCzQ6RlPLaGtAY7LelsYHM/byKUeHDpqpySfIGN1lLh63PDU9ag==, tarball: https://npm.fontawesome.com/@fortawesome/pro-duotone-svg-icons/-/6.5.2/pro-duotone-svg-icons-6.5.2.tgz} + '@fortawesome/pro-duotone-svg-icons@6.7.2': + resolution: {integrity: sha512-XEQ95M7PLz2QbOGgAxRnxPr5wrkDEJI6+KCF6l/dOtZte27m1biZJadDCP4k7mBXn8/YznZTY4ujMiqy865dng==, tarball: https://npm.fontawesome.com/@fortawesome/pro-duotone-svg-icons/-/6.7.2/pro-duotone-svg-icons-6.7.2.tgz} engines: {node: '>=6'} - '@fortawesome/pro-light-svg-icons@6.5.2': - resolution: {integrity: sha512-+wxp/kujkIIPprC8E1B4bbQkuh6m8/XU7EcNEbmK3LFp7wSIH3j40Y9LEWXMWS6vFYUOSCMtVTZP6phu2n/heA==, tarball: https://npm.fontawesome.com/@fortawesome/pro-light-svg-icons/-/6.5.2/pro-light-svg-icons-6.5.2.tgz} + '@fortawesome/pro-light-svg-icons@6.7.2': + resolution: {integrity: sha512-LeUnJCKlVG0oQwTW3oADJq3rkmnSDTg95RWdP46dCQ8pXOaw/8wzhN0XzZ2s/MqE48FNAX7E/XEqs0qMnrTZDA==, tarball: https://npm.fontawesome.com/@fortawesome/pro-light-svg-icons/-/6.7.2/pro-light-svg-icons-6.7.2.tgz} engines: {node: '>=6'} - '@fortawesome/pro-regular-svg-icons@6.5.2': - resolution: {integrity: sha512-S+XTfbq6CUmEVZzlBhyNEDqFg1wv7jJYoJZVqOpPOLHWjeN5pIpkVcZ3NVHVbhMuhGVtER1lt/h5NTZYsJWmYQ==, tarball: https://npm.fontawesome.com/@fortawesome/pro-regular-svg-icons/-/6.5.2/pro-regular-svg-icons-6.5.2.tgz} + '@fortawesome/pro-regular-svg-icons@6.7.2': + resolution: {integrity: sha512-cJolK4K/s56mHAqOyno24SmjviHqSqG9ZfckBKCpWjJlgDexi61EfET5wWbmmEot6/BqasFjw9S6tudFQUL/PQ==, tarball: https://npm.fontawesome.com/@fortawesome/pro-regular-svg-icons/-/6.7.2/pro-regular-svg-icons-6.7.2.tgz} engines: {node: '>=6'} - '@fortawesome/pro-solid-svg-icons@6.5.2': - resolution: {integrity: sha512-yhKyRyLDJoTSUN8h+oBl+yspfE6ARPRRbLWbWN4qEiOEcULKTtCTqsqovrnLsCB7qbllRwC50ai+RZ7bC1OPaA==, tarball: https://npm.fontawesome.com/@fortawesome/pro-solid-svg-icons/-/6.5.2/pro-solid-svg-icons-6.5.2.tgz} + '@fortawesome/pro-solid-svg-icons@6.7.2': + resolution: {integrity: sha512-SY2aP8d7uBlg1rNYznA9w9SVnnQhu3x/C7CCKQYcOGOC1YtPPHgIJhxKGbSzm6RkeJs1HVEfAkORX3J0XB5K9Q==, tarball: https://npm.fontawesome.com/@fortawesome/pro-solid-svg-icons/-/6.7.2/pro-solid-svg-icons-6.7.2.tgz} engines: {node: '>=6'} - '@fortawesome/pro-thin-svg-icons@6.5.2': - resolution: {integrity: sha512-aKs9VnIQUpVq7WKXG7iGYf6jNdobj3kD3eeJpwRfAlMPlIieHjxbNrGDrXUBzXsclHd66n18+TjpGMTPRvEnkA==, tarball: https://npm.fontawesome.com/@fortawesome/pro-thin-svg-icons/-/6.5.2/pro-thin-svg-icons-6.5.2.tgz} + '@fortawesome/pro-thin-svg-icons@6.7.2': + resolution: {integrity: sha512-2MmuchdNCBuNA0/h9Zo75RTw2+U7OimPNRuShW/J509ql0eRowuDHDjFrQhmTdaeTk+lI1FwF63zKYAofsoUMA==, tarball: https://npm.fontawesome.com/@fortawesome/pro-thin-svg-icons/-/6.7.2/pro-thin-svg-icons-6.7.2.tgz} engines: {node: '>=6'} - '@fortawesome/sharp-light-svg-icons@6.5.2': - resolution: {integrity: sha512-xQnf7Tlo/HsugwyQHR5qqj/3epgyzbFqE7jh6oPx8yQI5bRtmnYbzIx2u0dS7FMgaDCCXiTPnujr28X7NG9h1g==, tarball: https://npm.fontawesome.com/@fortawesome/sharp-light-svg-icons/-/6.5.2/sharp-light-svg-icons-6.5.2.tgz} + '@fortawesome/sharp-light-svg-icons@6.7.2': + resolution: {integrity: sha512-E4Q+zZbMOPyiZs79kXILJcbaWMz4ydLHQSIIld9DGRSU9tqvmo2o0iFInpHbVxswbYRN4v4sPbqLavq0F8MEyA==, tarball: https://npm.fontawesome.com/@fortawesome/sharp-light-svg-icons/-/6.7.2/sharp-light-svg-icons-6.7.2.tgz} engines: {node: '>=6'} - '@fortawesome/sharp-regular-svg-icons@6.5.2': - resolution: {integrity: sha512-wGg2mhWJp4eT+efIPp22YASXpzjDPcJoPwuicRWxi2UmKe11/n111f4HviSPxRtJjp2EGSAgVtRe1bbnJf3vEw==, tarball: https://npm.fontawesome.com/@fortawesome/sharp-regular-svg-icons/-/6.5.2/sharp-regular-svg-icons-6.5.2.tgz} + '@fortawesome/sharp-regular-svg-icons@6.7.2': + resolution: {integrity: sha512-WczljTfGbnyH0pIXeavRUryBWrO6phm+5FnBIW2hZ9EU6BPzMPs2bxqmWRzwWROyh7cEfX0jDFjOrSTKdfs2xA==, tarball: https://npm.fontawesome.com/@fortawesome/sharp-regular-svg-icons/-/6.7.2/sharp-regular-svg-icons-6.7.2.tgz} engines: {node: '>=6'} - '@fortawesome/sharp-solid-svg-icons@6.5.2': - resolution: {integrity: sha512-MKa9pkyiTjNl7RNnvAEogZgSJKpxgkhQ//5r0qOV2vi9mZGiANV185I/ddAzpLq552YqW1YJWz+9GUHw2GW6pQ==, tarball: https://npm.fontawesome.com/@fortawesome/sharp-solid-svg-icons/-/6.5.2/sharp-solid-svg-icons-6.5.2.tgz} + '@fortawesome/sharp-solid-svg-icons@6.7.2': + resolution: {integrity: sha512-RQGnMRGpVUAT6HtELU57ZxIBsbYFC60+qfwlyOBjnK/wwQLy0KiYo+GdBYHmnpefMXjotTk5Lp9zPXb2Lnhd4Q==, tarball: https://npm.fontawesome.com/@fortawesome/sharp-solid-svg-icons/-/6.7.2/sharp-solid-svg-icons-6.7.2.tgz} engines: {node: '>=6'} - '@fortawesome/sharp-thin-svg-icons@6.5.2': - resolution: {integrity: sha512-cpSTY52ycffnWsKTtd79+yyrsLYahU1njqSV5C3bAbEPWK+h3XWtzfDB4rjDpQGhX3n1wCMeLZ8Ak6uE5zFTyw==, tarball: https://npm.fontawesome.com/@fortawesome/sharp-thin-svg-icons/-/6.5.2/sharp-thin-svg-icons-6.5.2.tgz} + '@fortawesome/sharp-thin-svg-icons@6.7.2': + resolution: {integrity: sha512-lsPOZHfYhlU/tVwNLtlcMVXJZRu5XA8jhhIAa4LCjv4UVq1Xqz9vpOvixne1R+rP/ZfBGUyZXSKHU9ysZhyfxw==, tarball: https://npm.fontawesome.com/@fortawesome/sharp-thin-svg-icons/-/6.7.2/sharp-thin-svg-icons-6.7.2.tgz} engines: {node: '>=6'} '@graphql-typed-document-node/core@3.2.0': @@ -6727,7 +6727,7 @@ packages: resolution: {integrity: sha512-GWrNeElMYHO8FVETjW205u2s9IXFs46fmVKY8T1dHgksCm3JV8w4k14gM2eaZbOUOH/tGcOuz5YbqJl8iKkA8w==} engines: {node: '>=18.0.0'} peerDependencies: - next: npm:@fern-api/next@14.2.9-fork.2 + next: ^13.5.0 || ^14.0.0 || ^15.0.0 react: 18.3.1 react-dom: 18.3.1 storybook: ^8.4.4 @@ -18505,51 +18505,51 @@ snapshots: '@floating-ui/utils@0.2.8': {} - '@fortawesome/fontawesome-common-types@6.5.2': {} + '@fortawesome/fontawesome-common-types@6.7.2': {} - '@fortawesome/fontawesome-svg-core@6.5.2': + '@fortawesome/fontawesome-svg-core@6.7.2': dependencies: - '@fortawesome/fontawesome-common-types': 6.5.2 + '@fortawesome/fontawesome-common-types': 6.7.2 - '@fortawesome/free-brands-svg-icons@6.5.2': + '@fortawesome/free-brands-svg-icons@6.7.2': dependencies: - '@fortawesome/fontawesome-common-types': 6.5.2 + '@fortawesome/fontawesome-common-types': 6.7.2 - '@fortawesome/pro-duotone-svg-icons@6.5.2': + '@fortawesome/pro-duotone-svg-icons@6.7.2': dependencies: - '@fortawesome/fontawesome-common-types': 6.5.2 + '@fortawesome/fontawesome-common-types': 6.7.2 - '@fortawesome/pro-light-svg-icons@6.5.2': + '@fortawesome/pro-light-svg-icons@6.7.2': dependencies: - '@fortawesome/fontawesome-common-types': 6.5.2 + '@fortawesome/fontawesome-common-types': 6.7.2 - '@fortawesome/pro-regular-svg-icons@6.5.2': + '@fortawesome/pro-regular-svg-icons@6.7.2': dependencies: - '@fortawesome/fontawesome-common-types': 6.5.2 + '@fortawesome/fontawesome-common-types': 6.7.2 - '@fortawesome/pro-solid-svg-icons@6.5.2': + '@fortawesome/pro-solid-svg-icons@6.7.2': dependencies: - '@fortawesome/fontawesome-common-types': 6.5.2 + '@fortawesome/fontawesome-common-types': 6.7.2 - '@fortawesome/pro-thin-svg-icons@6.5.2': + '@fortawesome/pro-thin-svg-icons@6.7.2': dependencies: - '@fortawesome/fontawesome-common-types': 6.5.2 + '@fortawesome/fontawesome-common-types': 6.7.2 - '@fortawesome/sharp-light-svg-icons@6.5.2': + '@fortawesome/sharp-light-svg-icons@6.7.2': dependencies: - '@fortawesome/fontawesome-common-types': 6.5.2 + '@fortawesome/fontawesome-common-types': 6.7.2 - '@fortawesome/sharp-regular-svg-icons@6.5.2': + '@fortawesome/sharp-regular-svg-icons@6.7.2': dependencies: - '@fortawesome/fontawesome-common-types': 6.5.2 + '@fortawesome/fontawesome-common-types': 6.7.2 - '@fortawesome/sharp-solid-svg-icons@6.5.2': + '@fortawesome/sharp-solid-svg-icons@6.7.2': dependencies: - '@fortawesome/fontawesome-common-types': 6.5.2 + '@fortawesome/fontawesome-common-types': 6.7.2 - '@fortawesome/sharp-thin-svg-icons@6.5.2': + '@fortawesome/sharp-thin-svg-icons@6.7.2': dependencies: - '@fortawesome/fontawesome-common-types': 6.5.2 + '@fortawesome/fontawesome-common-types': 6.7.2 '@graphql-typed-document-node/core@3.2.0(graphql@16.9.0)': dependencies: