diff --git a/.github/workflows/update-design-system-dependency.yml b/.github/workflows/update-design-system-dependency.yml index c508943f4..d7cbd518f 100644 --- a/.github/workflows/update-design-system-dependency.yml +++ b/.github/workflows/update-design-system-dependency.yml @@ -41,6 +41,10 @@ jobs: echo "has_changes=false" >> "$GITHUB_OUTPUT" fi + - name: Run design-system compatibility tests + if: steps.check-changes.outputs.has_changes == 'true' + run: pnpm vitest run toolkit-docs-generator/tests/scripts/sync-toolkit-sidebar.test.ts toolkit-docs-generator/tests/sources/oauth-provider-resolver.test.ts + - name: Create pull request if: steps.check-changes.outputs.has_changes == 'true' uses: peter-evans/create-pull-request@v7 @@ -54,6 +58,9 @@ jobs: body: | This PR updates `@arcadeai/design-system` to the latest published version. + It runs a design-system compatibility test gate before opening this PR. + If that gate fails, the workflow stops and no PR is created. + - Trigger: `${{ github.event_name }}` - Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} add-paths: | diff --git a/package.json b/package.json index 3751f359b..a25ecb7ac 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ }, "homepage": "https://arcade.dev/", "dependencies": { - "@arcadeai/design-system": "^3.26.1", + "@arcadeai/design-system": "^3.28.0", "@mdx-js/mdx": "^3.1.1", "@mdx-js/react": "^3.1.1", "@next/third-parties": "16.0.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 51d389698..ccb421e09 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,8 +12,8 @@ importers: .: dependencies: '@arcadeai/design-system': - specifier: ^3.26.1 - version: 3.27.5(@hookform/resolvers@5.2.2(react-hook-form@7.65.0(react@19.2.3)))(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(lucide-react@0.548.0(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react-hook-form@7.65.0(react@19.2.3))(react@19.2.3)(recharts@3.6.0(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react-is@16.13.1)(react@19.2.3)(redux@5.0.1))(tailwindcss@4.1.16) + specifier: ^3.28.0 + version: 3.28.0(@hookform/resolvers@5.2.2(react-hook-form@7.65.0(react@19.2.3)))(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(lucide-react@0.548.0(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react-hook-form@7.65.0(react@19.2.3))(react@19.2.3)(recharts@3.6.0(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react-is@16.13.1)(react@19.2.3)(redux@5.0.1))(tailwindcss@4.1.16) '@mdx-js/mdx': specifier: ^3.1.1 version: 3.1.1 @@ -217,9 +217,9 @@ packages: '@arcadeai/arcadejs@1.11.1': resolution: {integrity: sha512-6AKMTO/cT/bj3GGMF4F76R2oC/FXIfkkXr6k/5/55NmUdpyzdqb5HhPN1M1txLoKIUc0/BGP8anM9lPFxwRW5g==} - '@arcadeai/design-system@3.27.5': - resolution: {integrity: sha512-uLK5ZWGdtHDp6T68i/MSRKcXt33tZSW4ViCdOJTiTcMFi0t5e+nWz70kD9ZpTK20FNGuWVEGnGHJPyTjLQJcVg==} - engines: {node: '>=20.17.0'} + '@arcadeai/design-system@3.28.0': + resolution: {integrity: sha512-e9TzrTBxSb8jpLbGT6BeQfe4xxPrvhwtu3t37X0oAUVy9D6BN7IWsYbykVjSKpe6agvhSsbVVTEFomRzpir10w==} + engines: {bun: '>=1.3.5'} peerDependencies: '@hookform/resolvers': 5.2.1 lucide-react: 0.544.0 @@ -4842,7 +4842,7 @@ snapshots: transitivePeerDependencies: - encoding - '@arcadeai/design-system@3.27.5(@hookform/resolvers@5.2.2(react-hook-form@7.65.0(react@19.2.3)))(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(lucide-react@0.548.0(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react-hook-form@7.65.0(react@19.2.3))(react@19.2.3)(recharts@3.6.0(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react-is@16.13.1)(react@19.2.3)(redux@5.0.1))(tailwindcss@4.1.16)': + '@arcadeai/design-system@3.28.0(@hookform/resolvers@5.2.2(react-hook-form@7.65.0(react@19.2.3)))(@types/react-dom@19.2.3(@types/react@19.2.7))(@types/react@19.2.7)(lucide-react@0.548.0(react@19.2.3))(react-dom@19.2.3(react@19.2.3))(react-hook-form@7.65.0(react@19.2.3))(react@19.2.3)(recharts@3.6.0(@types/react@19.2.7)(react-dom@19.2.3(react@19.2.3))(react-is@16.13.1)(react@19.2.3)(redux@5.0.1))(tailwindcss@4.1.16)': dependencies: '@arcadeai/arcadejs': 1.11.1 '@hookform/resolvers': 5.2.2(react-hook-form@7.65.0(react@19.2.3)) diff --git a/toolkit-docs-generator/vitest.config.ts b/toolkit-docs-generator/vitest.config.ts index f7e5aeeda..06efcd802 100644 --- a/toolkit-docs-generator/vitest.config.ts +++ b/toolkit-docs-generator/vitest.config.ts @@ -1,6 +1,17 @@ +import { createRequire } from "node:module"; import { defineConfig } from "vitest/config"; +const require = createRequire(import.meta.url); +const designSystemEntry = require.resolve("@arcadeai/design-system"); + export default defineConfig({ + resolve: { + alias: { + // Use the Node-resolved entry to avoid broken "development" export paths + // in some published design-system versions during Vitest transform. + "@arcadeai/design-system": designSystemEntry, + }, + }, test: { // Enable globals like describe, it, expect without imports globals: true, diff --git a/vitest.config.ts b/vitest.config.ts new file mode 100644 index 000000000..ce69e8ffe --- /dev/null +++ b/vitest.config.ts @@ -0,0 +1,16 @@ +import { createRequire } from "node:module"; +import { defineConfig } from "vitest/config"; + +const require = createRequire(import.meta.url); +const designSystemEntry = require.resolve("@arcadeai/design-system"); + +export default defineConfig({ + resolve: { + alias: { + // Force Vitest to use the Node-resolved entrypoint instead of the + // package "development" condition, which some published versions point + // to non-shipped source files. + "@arcadeai/design-system": designSystemEntry, + }, + }, +});