diff --git a/.changeset/ten-snails-bet.md b/.changeset/ten-snails-bet.md new file mode 100644 index 000000000..6388d15dd --- /dev/null +++ b/.changeset/ten-snails-bet.md @@ -0,0 +1,5 @@ +--- +"@gitbook/icons": patch +--- + +Simplify installation by using public fontawesome mirror. diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2113ef367..b92d860ca 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -5,8 +5,6 @@ on: branches: - main - changeset-release/main -env: - BUN_NPM_TOKEN: ${{ secrets.NPM_TOKEN_READONLY }} jobs: format: runs-on: ubuntu-latest @@ -36,13 +34,10 @@ jobs: env: PUPPETEER_SKIP_DOWNLOAD: 1 - run: bun unit - build-oss: - # CI to check that the repository builds correctly on a machine without the credentials + build: runs-on: ubuntu-latest - name: Build (Open Source) + name: Build timeout-minutes: 6 - env: - BUN_NPM_TOKEN: '' steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/deploy-preview.yaml b/.github/workflows/deploy-preview.yaml index 5eafb3bcd..b4d4be819 100644 --- a/.github/workflows/deploy-preview.yaml +++ b/.github/workflows/deploy-preview.yaml @@ -4,8 +4,6 @@ on: push: branches: - main -env: - BUN_NPM_TOKEN: ${{ secrets.NPM_TOKEN_READONLY }} jobs: deploy-v2-vercel: name: Deploy v2 to Vercel (preview) diff --git a/.github/workflows/deploy-production.yaml b/.github/workflows/deploy-production.yaml index 98a91fd40..fee8519ab 100644 --- a/.github/workflows/deploy-production.yaml +++ b/.github/workflows/deploy-production.yaml @@ -3,8 +3,6 @@ on: push: branches: - main -env: - BUN_NPM_TOKEN: ${{ secrets.NPM_TOKEN_READONLY }} jobs: deploy-v2-vercel: name: Deploy v2 to Vercel (production) diff --git a/.github/workflows/deploy-staging.yaml b/.github/workflows/deploy-staging.yaml index a5660d249..c7766a903 100644 --- a/.github/workflows/deploy-staging.yaml +++ b/.github/workflows/deploy-staging.yaml @@ -3,8 +3,6 @@ on: push: branches: - main -env: - BUN_NPM_TOKEN: ${{ secrets.NPM_TOKEN_READONLY }} jobs: deploy-v2-vercel: name: Deploy v2 to Vercel (staging) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 16de2a9e3..59b2d0240 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -4,9 +4,6 @@ on: push: branches: - main - -env: - BUN_NPM_TOKEN: ${{ secrets.NPM_TOKEN_READONLY }} concurrency: ${{ github.workflow }}-${{ github.ref }} diff --git a/README.md b/README.md index c4a85b76c..767bd1cb1 100644 --- a/README.md +++ b/README.md @@ -77,23 +77,7 @@ All pull-requests will be tested against both visual and performances testing to ## Fonts and Icons -GitBook Open uses fontawesome. During development, your local environment will use the free version. However, only the pro version will be accepted by CI. If you see the following error: - -``` -The GitBook icon is missing. It indicates that the dependencies were installed without the correct font-awesome package. These changes have probably been persisted in the Bun lockfile. Read the README for more information. -``` - -It means that you've changed the GBO dependencies and bundled in the free version. Only GitBook staff can help with this - if you're not on the GitBook team, please ping us in the PR and we'll help get things moving. - -If you are GitBook staff, you'll need our NPM token in your local environment. - -``` -.env.local - -BUN_NPM_TOKEN=xxx -``` - -and then reinstall dependencies. +GitBook Open uses fontawesome. For self-hosting and local development, for licensing reasons, only the icons from the free version should be used. ## Contributing diff --git a/bun.lock b/bun.lock index fc93f06d6..29b5253d1 100644 --- a/bun.lock +++ b/bun.lock @@ -7,7 +7,7 @@ "devDependencies": { "@biomejs/biome": "^1.9.4", "@changesets/cli": "^2.29.8", - "turbo": "^2.7.4", + "turbo": "^2.7.6", "vercel": "^39.4.2", }, }, @@ -225,8 +225,8 @@ "gitbook-icons": "./bin/gitbook-icons.js", }, "dependencies": { - "@fortawesome/fontawesome-free": "^7.1.0", "@fortawesome/fontawesome-svg-core": "^7.1.0", + "@gitbook/fontawesome-pro": "1.0.16", }, "devDependencies": { "@types/react": "catalog:", @@ -235,9 +235,6 @@ "tsdown": "catalog:", "typescript": "catalog:", }, - "optionalDependencies": { - "@gitbook/fontawesome-pro": "1.0.16", - }, "peerDependencies": { "react": "*", }, @@ -725,8 +722,6 @@ "@fortawesome/fontawesome-common-types": ["@fortawesome/fontawesome-common-types@7.1.0", "", {}, "sha512-l/BQM7fYntsCI//du+6sEnHOP6a74UixFyOYUyz2DLMXKx+6DEhfR3F2NYGE45XH1JJuIamacb4IZs9S0ZOWLA=="], - "@fortawesome/fontawesome-free": ["@fortawesome/fontawesome-free@7.1.0", "", {}, "sha512-+WxNld5ZCJHvPQCr/GnzCTVREyStrAJjisUPtUxG5ngDA8TMlPnKp6dddlTpai4+1GNmltAeuk1hJEkBohwZYA=="], - "@fortawesome/fontawesome-svg-core": ["@fortawesome/fontawesome-svg-core@7.1.0", "", { "dependencies": { "@fortawesome/fontawesome-common-types": "7.1.0" } }, "sha512-fNxRUk1KhjSbnbuBxlWSnBLKLBNun52ZBTcs22H/xEEzM6Ap81ZFTQ4bZBxVQGQgVY0xugKGoRcCbaKjLQ3XZA=="], "@gitbook/api": ["@gitbook/api@0.158.0", "", { "dependencies": { "event-iterator": "^2.0.0", "eventsource-parser": "^3.0.0" } }, "sha512-oWrUY0gQ4rVKyNciHaXQrvi+EoiLCWHhAD0QyAhsHJp9+ndaLRMV6WfK2KbiGQmH8kiWwwBmwmQfMkZFmm1eyQ=="], @@ -2913,19 +2908,19 @@ "tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], - "turbo": ["turbo@2.7.4", "", { "optionalDependencies": { "turbo-darwin-64": "2.7.4", "turbo-darwin-arm64": "2.7.4", "turbo-linux-64": "2.7.4", "turbo-linux-arm64": "2.7.4", "turbo-windows-64": "2.7.4", "turbo-windows-arm64": "2.7.4" }, "bin": { "turbo": "bin/turbo" } }, "sha512-bkO4AddmDishzJB2ze7aYYPaejMoJVfS0XnaR6RCdXFOY8JGJfQE+l9fKiV7uDPa5Ut44gmOWJL3894CIMeH9g=="], + "turbo": ["turbo@2.7.6", "", { "optionalDependencies": { "turbo-darwin-64": "2.7.6", "turbo-darwin-arm64": "2.7.6", "turbo-linux-64": "2.7.6", "turbo-linux-arm64": "2.7.6", "turbo-windows-64": "2.7.6", "turbo-windows-arm64": "2.7.6" }, "bin": { "turbo": "bin/turbo" } }, "sha512-PO9AvJLEsNLO+EYhF4zB+v10hOjsJe5kJW+S6tTbRv+TW7gf1Qer4mfjP9h3/y9h8ZiPvOrenxnEgDtFgaM5zw=="], - "turbo-darwin-64": ["turbo-darwin-64@2.7.4", "", { "os": "darwin", "cpu": "x64" }, "sha512-xDR30ltfkSsRfGzABBckvl1nz1cZ3ssTujvdj+TPwOweeDRvZ0e06t5DS0rmRBvyKpgGs42K/EK6Mn2qLlFY9A=="], + "turbo-darwin-64": ["turbo-darwin-64@2.7.6", "", { "os": "darwin", "cpu": "x64" }, "sha512-bYu0qnWju2Ha3EbIkPCk1SMLT3sltKh1P/Jy5FER6BmH++H5z+T5MHh3W1Xoers9rk4N1VdKvog9FO1pxQyjhw=="], - "turbo-darwin-arm64": ["turbo-darwin-arm64@2.7.4", "", { "os": "darwin", "cpu": "arm64" }, "sha512-P7sjqXtOL/+nYWPvcDGWhi8wf8M8mZHHB8XEzw2VX7VJrS8IGHyJHGD1AYfDvhAEcr7pnk3gGifz3/xyhI655w=="], + "turbo-darwin-arm64": ["turbo-darwin-arm64@2.7.6", "", { "os": "darwin", "cpu": "arm64" }, "sha512-KCxTf3Y1hgNLYIWRLw8bwH8Zie9RyCGoxAlXYsCBI/YNqBSR+ZZK9KYzFxAqDaVaNvTwLFv3rJRGsXOFWg4+Uw=="], - "turbo-linux-64": ["turbo-linux-64@2.7.4", "", { "os": "linux", "cpu": "x64" }, "sha512-GofFOxRO/IhG8BcPyMSSB3Y2+oKQotsaYbHxL9yD6JPb20/o35eo+zUSyazOtilAwDHnak5dorAJFoFU8MIg2A=="], + "turbo-linux-64": ["turbo-linux-64@2.7.6", "", { "os": "linux", "cpu": "x64" }, "sha512-vjoU8zIfNgvJR3cMitgw7inEoi6bmuVuFawDl5yKtxjAEhDktFdRBpGS3WojD4l3BklBbIK689ssXcGf21LxRA=="], - "turbo-linux-arm64": ["turbo-linux-arm64@2.7.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-+RQKgNjksVPxYAyAgmDV7w/1qj++qca+nSNTAOKGOfJiDtSvRKoci89oftJ6anGs00uamLKVEQ712TI/tfNAIw=="], + "turbo-linux-arm64": ["turbo-linux-arm64@2.7.6", "", { "os": "linux", "cpu": "arm64" }, "sha512-TcMpBvTqZf+1DptrVYLbZls7WY1UVNDTGaf0bo7/GCgWYv5eZHCVo4Td7kCJeDU4glbXg67REX0md0S0V6ghMg=="], - "turbo-windows-64": ["turbo-windows-64@2.7.4", "", { "os": "win32", "cpu": "x64" }, "sha512-rfak1+g+ON3czs1mDYsCS4X74ZmK6gOgRQTXjDICtzvR4o61paqtgAYtNPofcVsMWeF4wvCajSeoAkkeAnQ1kg=="], + "turbo-windows-64": ["turbo-windows-64@2.7.6", "", { "os": "win32", "cpu": "x64" }, "sha512-1/MhkYldiihjneY8QnnDMbAkHXn/udTWSVYS94EMlkE9AShozsLTTOT1gDOpX06EfEW5njP09suhMvxbvwuwpQ=="], - "turbo-windows-arm64": ["turbo-windows-arm64@2.7.4", "", { "os": "win32", "cpu": "arm64" }, "sha512-1ZgBNjNRbDu/fPeqXuX9i26x3CJ/Y1gcwUpQ+Vp7kN9Un6RZ9kzs164f/knrjcu5E+szCRexVjRSJay1k5jApA=="], + "turbo-windows-arm64": ["turbo-windows-arm64@2.7.6", "", { "os": "win32", "cpu": "arm64" }, "sha512-0wDVnUJLFAWm4ZzOQFDkbyyUqaszorTGf3Rdc22IRIyJTTLd6ajqdb+cWD89UZ1RKr953+PZR1gqgWQY4PDuhA=="], "type": ["type@2.7.3", "", {}, "sha512-8j+1QmAbPvLZow5Qpi6NCaN8FB60p/6x8/vfNqOk/hC+HuvFZhL4+WfekuhQLiqFZXOgQdrs3B+XxEmCc6b3FQ=="], diff --git a/bunfig.toml b/bunfig.toml deleted file mode 100644 index 28931d639..000000000 --- a/bunfig.toml +++ /dev/null @@ -1,2 +0,0 @@ -[install.scopes] -"gitbook" = { token = "$BUN_NPM_TOKEN", url = "https://registry.npmjs.org" } diff --git a/package.json b/package.json index db5eaf5c8..64bf2377f 100644 --- a/package.json +++ b/package.json @@ -7,10 +7,10 @@ "devDependencies": { "@biomejs/biome": "^1.9.4", "@changesets/cli": "^2.29.8", - "turbo": "^2.7.4", + "turbo": "^2.7.6", "vercel": "^39.4.2" }, - "packageManager": "bun@1.3.2", + "packageManager": "bun@1.3.7", "overrides": { "@codemirror/state": "6.4.1", "@types/react": "catalog:", diff --git a/packages/icons/bin/kit.js b/packages/icons/bin/kit.js index 3f82bac43..a7b24d27c 100644 --- a/packages/icons/bin/kit.js +++ b/packages/icons/bin/kit.js @@ -5,17 +5,10 @@ import url from 'node:url'; * Get the path to the kit, depending on the Pro or Free version. */ export function getKitPath() { - let source = path.dirname( - url.fileURLToPath(import.meta.resolve('@fortawesome/fontawesome-free/package.json')) + return path.resolve( + path.dirname( + url.fileURLToPath(import.meta.resolve('@gitbook/fontawesome-pro/package.json')) + ), + 'icons' ); - try { - source = path.resolve( - path.dirname( - url.fileURLToPath(import.meta.resolve('@gitbook/fontawesome-pro/package.json')) - ), - 'icons' - ); - } catch (_error) {} - - return source; } diff --git a/packages/icons/package.json b/packages/icons/package.json index a3d006f25..66565588d 100644 --- a/packages/icons/package.json +++ b/packages/icons/package.json @@ -17,9 +17,6 @@ "version": "0.4.2", "dependencies": { "@fortawesome/fontawesome-svg-core": "^7.1.0", - "@fortawesome/fontawesome-free": "^7.1.0" - }, - "optionalDependencies": { "@gitbook/fontawesome-pro": "1.0.16" }, "devDependencies": {