Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,16 @@ jobs:
with:
node-version: '22.9.0'

- name: Setup Yarn Corepack
run: corepack enable
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: '1.2.20'

- name: Install dependencies
run: yarn install
run: bun install --frozen-lockfile

- name: Build Storybook
run: yarn build-storybook
run: bun run build-storybook

- name: Setup Pages
uses: actions/configure-pages@v5
Expand All @@ -59,3 +61,4 @@ jobs:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

13 changes: 8 additions & 5 deletions .github/workflows/pr-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,16 @@ jobs:
with:
node-version: '22.9.0'

- name: Setup Yarn Corepack
run: corepack enable
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: '1.2.20'

- name: Install dependencies
run: yarn install
run: bun install --frozen-lockfile

- name: Build Storybook
run: yarn build-storybook
run: bun run build-storybook

# Verify the build output
- name: Verify build output
Expand Down Expand Up @@ -164,4 +166,5 @@ jobs:
git push
else
echo "PR preview directory not found"
fi
fi

14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,21 @@ jobs:
with:
node-version: 20.x

- name: Enable Corepack
run: corepack enable

- name: Install Correct Yarn Version
run: corepack prepare yarn@4.4.1 --activate
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: '1.2.20'

- name: Install Dependencies
run: yarn
run: bun install --frozen-lockfile

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: yarn release
publish: bun run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

13 changes: 8 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,21 @@ jobs:
with:
node-version: '22.9.0'

- name: Setup Yarn Corepack
run: corepack enable
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: '1.2.20'

- name: Install dependencies
run: yarn install
run: bun install --frozen-lockfile

- uses: dtinth/setup-github-actions-caching-for-turbo@v1

- name: Install Playwright Chromium
run: npx playwright install chromium
run: bun x playwright install chromium

- name: Run tests
run: yarn test
run: bun test

Comment on lines 39 to 41
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Double-check test runner compatibility.

bun test runs Bun’s built-in test runner. If the repo previously used Jest/Vitest, ensure tests are compatible or that you’ve migrated configs.

Run this script to see what test tooling is present and how tests are invoked:

Expected:

  • If using Bun’s test runner: no Jest/Vitest configs, and package.json may have "test": "bun test" or rely on CLI.
  • If Jest/Vitest configs are found, verify they still run under Bun (or adjust to bunx vitest/jest as needed).

---

🏁 Script executed:

```shell
#!/bin/bash
# Look for test configs and scripts that indicate Jest/Vitest/etc.
rg -n -C2 -g '!**/node_modules/**' -e '"test"\s*:\s*".*"' package.json
rg -n -C2 -e '\bdescribe\(|\bit\(|\btest\(' --type=ts --type=tsx --type=js --type=jsx
fd -HI -t f --regex '(jest\.config(\.|$)|vitest\.config(\.|$)|vitest\.ts|jest\.ts|jest\.js)'

Length of output: 611


Correct the test command in GitHub Actions

The repo’s root package.json defines

"test": "turbo run test"

so bun test will invoke Bun’s built-in runner (and won’t trigger your Turborepo pipelines). Update the workflow step at .github/workflows/test.yml:39-41 to:

      - name: Run tests
        run: npm test

(or npm run test) to ensure your monorepo’s test suites actually execute.

🤖 Prompt for AI Agents
In .github/workflows/test.yml around lines 39 to 41, the workflow step currently
runs "bun test" which invokes Bun's runner instead of the repo's npm script;
change the step to run the project's test script by replacing the command with
"npm test" (or "npm run test") so Turborepo's "test" task defined in
package.json is executed.

- name: Upload artifacts on failure
if: failure()
Expand All @@ -44,3 +46,4 @@ jobs:
name: test-failure
path: packages/components/storybook-static
retention-days: 2

15 changes: 8 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

logs
_.log
npm-debug.log_
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
Expand All @@ -16,7 +16,7 @@ lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)

report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data

Expand Down Expand Up @@ -71,7 +71,7 @@ web_modules/

.npm

# npm package-lock.json (we use yarn)
# npm package-lock.json (we use bun)
package-lock.json

# Optional eslint cache
Expand All @@ -97,10 +97,6 @@ package-lock.json

*.tgz

# Yarn Integrity file

.yarn-integrity

# dotenv environment variable files

.env
Expand Down Expand Up @@ -186,3 +182,8 @@ storybook-static

# React Router v7
.react-router/

# Bun
# Keep bun.lockb in version control
# bun.lockb

948 changes: 0 additions & 948 deletions .yarn/releases/yarn-4.9.1.cjs

This file was deleted.

3 changes: 0 additions & 3 deletions .yarnrc.yml

This file was deleted.

Binary file added bun.lockb
Binary file not shown.
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
"packages/*"
],
"scripts": {
"start": "yarn dev",
"start": "bun run dev",
"dev": "turbo run dev",
"build": "turbo run build",
"serve": "turbo run serve",
"test": "turbo run test",
"clean": "find . -name '.turbo' -type d -prune -exec rm -rf {} + && find . -name 'node_modules' -type d -prune -exec rm -rf {} + && find . -name 'yarn.lock' -type f -delete",
"clean": "find . -name '.turbo' -type d -prune -exec rm -rf {} + && find . -name 'node_modules' -type d -prune -exec rm -rf {} + && find . -name 'bun.lockb' -type f -delete",
"format-and-lint": "biome check .",
"format-and-lint:fix": "biome check . --write",
"prerelease": "turbo run build",
Expand All @@ -25,8 +25,9 @@
},
"dependencies": {
"@changesets/cli": "^2.27.11",
"ajv": "^8.17.1",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Confirm ajv is used and keep its version consistent across workspace

  • New runtime dep looks fine for JSON Schema validation. Ensure it’s actually used and that all packages use a consistent version range.

Run this script to:

  1. List all declared ajv versions in every package.json
  2. Find all import/require usages for ajv

If you want, I can open a follow-up to align versions or remove ajv if unused.


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== AJV versions across workspace =="
fd -t f -a package.json | while read -r f; do
  ver_dep=$(jq -r '.dependencies.ajv // empty' "$f")
  ver_dev=$(jq -r '.devDependencies.ajv // empty' "$f")
  if [[ -n "${ver_dep}${ver_dev}" ]]; then
    echo "$f -> dependencies: ${ver_dep:--} | devDependencies: ${ver_dev:--}"
  fi
done

echo
echo "== AJV usage (imports/requires) =="
rg -n -C2 -g '!**/node_modules/**' -g '!**/dist/**' -g '!**/build/**' -g '!**/.turbo/**' -P "(from\s+['\"]ajv['\"]|require\(['\"]ajv['\"]\))" || echo "No direct uses found"

Length of output: 1240


Remove or justify the ajv dependency in package.json

No direct imports or requires of ajv were detected in the codebase, and only the root package.json declares it. To address this:

  • Remove the "ajv": "^8.17.1" entry from the root package.json if it’s not actually used.
  • If you do need ajv at runtime, add explicit import/require statements (e.g.
    import Ajv from 'ajv' or const Ajv = require('ajv')) in the modules that consume it.
  • Should you plan to use ajv across multiple packages, declare it in each package’s package.json and keep the version (^8.17.1) aligned.
🤖 Prompt for AI Agents
In package.json around line 28, the root dependency "ajv": "^8.17.1" appears
unused; either remove this entry from the root package.json if no code
imports/uses Ajv, or add explicit imports where Ajv is consumed (e.g., import
Ajv from 'ajv' or require('ajv')) so the dependency is justified; if Ajv will be
used across multiple packages, declare it in each package's package.json and
keep the version aligned.

"react-phone-number-input": "^3.4.12",
"react-router-dom": "^7.6.2"
},
"packageManager": "yarn@4.9.1"
"packageManager": "bun@1.2.20"
}
2 changes: 1 addition & 1 deletion packages/components/src/ui/phone-input-field.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const PhoneInputField = function PhoneInputField({
{...field}
{...props}
ref={ref}
className={cn('w-full', props.className)}
className={cn('w-full', inputClassName)}
inputClassName={cn('focus-visible:ring-0 focus-visible:ring-offset-0 border-input', inputClassName)}
/>
</FormControl>
Expand Down
Loading