Skip to content

Commit 0c89017

Browse files
committed
Merge upstream develop into fork develop
Made-with: Cursor
2 parents 4103cb1 + 47c8baa commit 0c89017

72 files changed

Lines changed: 144092 additions & 27955 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 17 deletions
This file was deleted.
File renamed without changes.

.github/workflows/ci.yml

Lines changed: 23 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: CI
2-
32
on:
43
push:
54
branches:
@@ -17,55 +16,42 @@ jobs:
1716
runs-on: ubuntu-latest
1817
steps:
1918
- name: Checkout code
20-
uses: actions/checkout@v6.0.2
21-
22-
- name: Detect package manager
23-
id: detect
24-
run: |
25-
if [ -f "yarn.lock" ]; then
26-
echo "manager=yarn" >> $GITHUB_OUTPUT
27-
elif [ -f "pnpm-lock.yaml" ]; then
28-
echo "manager=pnpm" >> $GITHUB_OUTPUT
29-
elif [ -f "package-lock.json" ]; then
30-
echo "manager=npm" >> $GITHUB_OUTPUT
31-
else
32-
echo "manager=none" >> $GITHUB_OUTPUT
33-
fi
34-
19+
uses: actions/checkout@v4
3520
- name: Validate package manager
3621
run: |
37-
if [ "${{ steps.detect.outputs.manager }}" != "pnpm" ]; then
38-
echo "Expected pnpm but found: ${{ steps.detect.outputs.manager }}"
39-
echo "Please use pnpm for this project (pnpm-lock.yaml not found)"
22+
if [ ! -f "yarn.lock" ]; then
23+
echo "Expected yarn.lock but it was not found."
24+
echo "Please use Yarn v4 (Berry) for this project."
4025
exit 1
4126
fi
27+
echo "yarn.lock found — package manager check passed."
4228
4329
test-and-build:
4430
runs-on: ubuntu-latest
45-
4631
steps:
4732
- name: Checkout repository
48-
uses: actions/checkout@v6.0.2
49-
50-
- name: Setup pnpm
51-
uses: pnpm/action-setup@v4.2.0
52-
with:
53-
version: 9
54-
33+
uses: actions/checkout@v4
5534
- name: Setup Node.js
56-
uses: actions/setup-node@v6.2.0
35+
uses: actions/setup-node@v4
5736
with:
5837
node-version: 24
59-
cache: 'pnpm'
60-
38+
- name: Enable Corepack
39+
run: corepack enable
40+
- name: Get Yarn cache directory
41+
id: yarn-cache-dir
42+
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
43+
- name: Cache Yarn dependencies
44+
uses: actions/cache@v4
45+
with:
46+
path: ${{ steps.yarn-cache-dir.outputs.dir }}
47+
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
48+
restore-keys: |
49+
${{ runner.os }}-yarn-
6150
- name: Install dependencies
62-
run: pnpm install --frozen-lockfile
63-
51+
run: yarn install --immutable
6452
- name: Lint
65-
run: pnpm lint
66-
53+
run: yarn lint
6754
- name: Build
68-
run: pnpm build
69-
55+
run: yarn build
7056
- name: Test
71-
run: pnpm test
57+
run: yarn test
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Detect Package Managers
2+
3+
on:
4+
pull_request:
5+
branches: [develop, staging, main]
6+
push:
7+
branches: [develop, staging, main]
8+
9+
jobs:
10+
detect-unwanted-locks:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Detect unwanted lock files
17+
id: detect
18+
run: |
19+
FOUND_LOCKS=""
20+
21+
if [ -f "package-lock.json" ]; then
22+
FOUND_LOCKS="${FOUND_LOCKS}package-lock.json "
23+
fi
24+
25+
if [ -f "pnpm-lock.yaml" ]; then
26+
FOUND_LOCKS="${FOUND_LOCKS}pnpm-lock.yaml "
27+
fi
28+
29+
if [ -f "bun.lockb" ]; then
30+
FOUND_LOCKS="${FOUND_LOCKS}bun.lockb "
31+
fi
32+
33+
if [ -n "${FOUND_LOCKS}" ]; then
34+
echo "found=true" >> $GITHUB_OUTPUT
35+
echo "files=${FOUND_LOCKS}" >> $GITHUB_OUTPUT
36+
echo "::warning::Found unwanted lock files: ${FOUND_LOCKS} Please use yarn.lock only"
37+
exit 1
38+
else
39+
echo "found=false" >> $GITHUB_OUTPUT
40+
echo "files=none" >> $GITHUB_OUTPUT
41+
echo "No unwanted lock files found"
42+
fi
43+
44+
- name: Report result
45+
if: steps.detect.outputs.found == 'true'
46+
run: |
47+
echo "## ❌ Unwanted Package Lock Files Detected" >> $GITHUB_STEP_SUMMARY
48+
echo "" >> $GITHUB_STEP_SUMMARY
49+
echo "The following lock files were found and should be removed:" >> $GITHUB_STEP_SUMMARY
50+
echo "- ${steps.detect.outputs.files}" >> $GITHUB_STEP_SUMMARY
51+
echo "" >> $GITHUB_STEP_SUMMARY
52+
echo "This project uses **yarn**. Please remove the above files and use yarn.lock instead." >> $GITHUB_STEP_SUMMARY
53+
exit 1
54+
55+
- name: Success
56+
if: steps.detect.outputs.found == 'false'
57+
run: |
58+
echo "## ✅ Only yarn.lock detected" >> $GITHUB_STEP_SUMMARY
59+
echo "This project correctly uses yarn as the package manager." >> $GITHUB_STEP_SUMMARY

.github/workflows/gitleaks.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Gitleaks
2+
3+
on:
4+
pull_request:
5+
push:
6+
workflow_dispatch:
7+
schedule:
8+
- cron: '0 4 * * *'
9+
10+
jobs:
11+
scan:
12+
name: gitleaks
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0
18+
- uses: gitleaks/gitleaks-action@v2
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/size.-limit.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: size-limit
2+
on:
3+
push:
4+
branches: [main, staging, develop]
5+
pull_request:
6+
branches: [main, staging, develop]
7+
8+
jobs:
9+
size-limit:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Enable Corepack
14+
run: corepack enable
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: '24'
19+
cache: 'yarn'
20+
- name: Install dependencies
21+
run: yarn install --immutable
22+
- name: Build
23+
run: yarn build
24+
- name: Check bundle size
25+
run: yarn size-limit

.github/workflows/size.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

.gitignore

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
# Dependencies
22
node_modules
3-
.pnp
3+
.pnp.*
44
.pnp.js
5-
package-lock.json
5+
.pnp.cjs
6+
7+
# Yarn Berry
8+
.yarn
9+
.yarn/cache
10+
.yarn/unplugged
11+
.yarn/build-state.yml
12+
.yarn/install-state.gz
613

714
# Testing
815
coverage
@@ -23,4 +30,6 @@ dist
2330
*.log
2431
npm-debug.log*
2532
yarn-debug.log*
26-
yarn-error.log*
33+
yarn-error.log*
34+
35+
.eslintcache

.husky/commit-msg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
npx --no -- commitlint --edit "${1}"
1+
yarn -- commitlint --edit "${1}"

0 commit comments

Comments
 (0)