@tscircuit/cli 0.0.188 → 0.0.190

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,34 +11,53 @@ jobs:
11
11
  if: github.event.pull_request.draft == false
12
12
 
13
13
  steps:
14
+ - name: Determine if fork
15
+ id: check_fork
16
+ run: |
17
+ if [ "${{ github.event.pull_request.head.repo.full_name }}" = "${{ github.repository }}" ]; then
18
+ echo "is_fork=false" >> $GITHUB_OUTPUT
19
+ else
20
+ echo "is_fork=true" >> $GITHUB_OUTPUT
21
+ fi
22
+
14
23
  - name: Checkout code
15
24
  uses: actions/checkout@v3
16
25
  with:
17
- token: ${{ secrets.TSCIRCUIT_BOT_GITHUB_TOKEN }}
26
+ token: ${{ steps.check_fork.outputs.is_fork == 'true' && secrets.GITHUB_TOKEN || secrets.TSCIRCUIT_BOT_GITHUB_TOKEN }}
18
27
 
19
- - name: Setup Bun
20
- uses: oven-sh/setup-bun@v1
28
+ - name: Setup Node.js
29
+ uses: actions/setup-node@v3
21
30
  with:
22
- bun-version: latest
23
-
24
- - name: Install dependencies
25
- run: bun install --frozen-lockfile
31
+ node-version: '20'
26
32
 
27
33
  - name: Get @biomejs/biome version
28
34
  id: get-biome-version
29
- run: echo "BIOME_VERSION=$(bunx jq -r '.devDependencies["@biomejs/biome"]' package.json)" >> $GITHUB_OUTPUT
35
+ run: echo "BIOME_VERSION=$(node -p "require('./package.json').devDependencies['@biomejs/biome']")" >> $GITHUB_OUTPUT
30
36
 
31
37
  - name: Install @biomejs/biome
32
- run: bun add -d @biomejs/biome@${{ steps.get-biome-version.outputs.BIOME_VERSION }}
38
+ run: npm install @biomejs/biome@${{ steps.get-biome-version.outputs.BIOME_VERSION }}
39
+
40
+ - name: Run Formatter and autofix
41
+ if: steps.check_fork.outputs.is_fork == 'false'
42
+ run: npx @biomejs/biome format . --write
43
+
44
+ - name: Format Check (cannot autofix against forks)
45
+ if: steps.check_fork.outputs.is_fork == 'true'
46
+ run: npx @biomejs/biome format .
33
47
 
34
- - name: Run formatter
35
- run: bunx @biomejs/biome format . --write
48
+ - name: Restore lock files
49
+ if: steps.check_fork.outputs.is_fork == 'false'
50
+ run: |
51
+ git checkout -- *lock.json || true
52
+ git checkout -- *.lock || true
53
+ git checkout -- *.lockb || true
36
54
 
37
55
  - name: Commit changes
56
+ if: steps.check_fork.outputs.is_fork == 'false'
38
57
  uses: stefanzweifel/git-auto-commit-action@v4
39
58
  with:
40
59
  commit_message: "formatbot: Automatically format code"
41
60
  branch: ${{ github.head_ref }}
42
61
  commit_user_name: tscircuitbot
43
62
  commit_user_email: tscircuitbot@users.noreply.github.com
44
- commit_author: tscircuitbot <tscircuitbot@users.noreply.github.com>
63
+ commit_author: tscircuitbot <tscircuitbot@users.noreply.github.com>
package/bun.lockb CHANGED
Binary file