circuit-json-to-spice 0.0.1 → 0.0.2

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.
@@ -0,0 +1,26 @@
1
+ # Created using @tscircuit/plop (npm install -g @tscircuit/plop)
2
+ name: Format Check
3
+
4
+ on:
5
+ push:
6
+ branches: [main]
7
+ pull_request:
8
+ branches: [main]
9
+
10
+ jobs:
11
+ format-check:
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+
17
+ - name: Setup bun
18
+ uses: oven-sh/setup-bun@v2
19
+ with:
20
+ bun-version: latest
21
+
22
+ - name: Install dependencies
23
+ run: bun install
24
+
25
+ - name: Run format check
26
+ run: bun run format:check
@@ -0,0 +1,28 @@
1
+ # Created using @tscircuit/plop (npm install -g @tscircuit/plop)
2
+ name: Publish to npm
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ jobs:
8
+ publish:
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v4
12
+ with:
13
+ token: ${{ secrets.TSCIRCUIT_BOT_GITHUB_TOKEN }}
14
+ - name: Setup bun
15
+ uses: oven-sh/setup-bun@v2
16
+ with:
17
+ bun-version: latest
18
+ - uses: actions/setup-node@v3
19
+ with:
20
+ node-version: 20
21
+ registry-url: https://registry.npmjs.org/
22
+ - run: npm install -g pver
23
+ - run: bun install --frozen-lockfile
24
+ - run: bun run build
25
+ - run: pver release
26
+ env:
27
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
28
+ GITHUB_TOKEN: ${{ secrets.TSCIRCUIT_BOT_GITHUB_TOKEN }}
@@ -0,0 +1,28 @@
1
+ # Created using @tscircuit/plop (npm install -g @tscircuit/plop)
2
+ name: Bun Test
3
+
4
+ on:
5
+ pull_request:
6
+ push:
7
+ branches:
8
+ - main
9
+
10
+ jobs:
11
+ test:
12
+ runs-on: ubuntu-latest
13
+ timeout-minutes: 5
14
+
15
+ steps:
16
+ - name: Checkout code
17
+ uses: actions/checkout@v4
18
+
19
+ - name: Setup bun
20
+ uses: oven-sh/setup-bun@v2
21
+ with:
22
+ bun-version: latest
23
+
24
+ - name: Install dependencies
25
+ run: bun install
26
+
27
+ - name: Run tests
28
+ run: bun test
@@ -0,0 +1,26 @@
1
+ # Created using @tscircuit/plop (npm install -g @tscircuit/plop)
2
+ name: Type Check
3
+
4
+ on:
5
+ push:
6
+ branches: [main]
7
+ pull_request:
8
+ branches: [main]
9
+
10
+ jobs:
11
+ type-check:
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+
17
+ - name: Setup bun
18
+ uses: oven-sh/setup-bun@v2
19
+ with:
20
+ bun-version: latest
21
+
22
+ - name: Install dependencies
23
+ run: bun i
24
+
25
+ - name: Run type check
26
+ run: bunx tsc --noEmit
@@ -0,0 +1,63 @@
1
+ name: Format PR
2
+
3
+ on:
4
+ pull_request:
5
+ types: [opened, synchronize, reopened, ready_for_review]
6
+
7
+ jobs:
8
+ format:
9
+ name: Format code
10
+ runs-on: ubuntu-latest
11
+ if: github.event.pull_request.draft == false
12
+
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
+
23
+ - name: Checkout code
24
+ uses: actions/checkout@v4
25
+ with:
26
+ token: ${{ steps.check_fork.outputs.is_fork == 'true' && secrets.GITHUB_TOKEN || secrets.TSCIRCUIT_BOT_GITHUB_TOKEN }}
27
+
28
+ - name: Setup Node.js
29
+ uses: actions/setup-node@v3
30
+ with:
31
+ node-version: '20'
32
+
33
+ - name: Get @biomejs/biome version
34
+ id: get-biome-version
35
+ run: echo "BIOME_VERSION=$(node -p "require('./package.json').devDependencies['@biomejs/biome']")" >> $GITHUB_OUTPUT
36
+
37
+ - name: Install @biomejs/biome
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 .
47
+
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
54
+
55
+ - name: Commit changes
56
+ if: steps.check_fork.outputs.is_fork == 'false'
57
+ uses: stefanzweifel/git-auto-commit-action@v4
58
+ with:
59
+ commit_message: "formatbot: Automatically format code"
60
+ branch: ${{ github.head_ref }}
61
+ commit_user_name: tscircuitbot
62
+ commit_user_email: tscircuitbot@users.noreply.github.com
63
+ commit_author: tscircuitbot <tscircuitbot@users.noreply.github.com>
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  // lib/index.ts
2
2
  console.log("Hello via Bun!");
3
- //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vbGliL2luZGV4LnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyJjb25zb2xlLmxvZyhcIkhlbGxvIHZpYSBCdW4hXCIpOyJdLAogICJtYXBwaW5ncyI6ICI7QUFBQSxRQUFRLElBQUksZ0JBQWdCOyIsCiAgIm5hbWVzIjogW10KfQo=
3
+ //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vbGliL2luZGV4LnRzIl0sCiAgInNvdXJjZXNDb250ZW50IjogWyJjb25zb2xlLmxvZyhcIkhlbGxvIHZpYSBCdW4hXCIpXG4iXSwKICAibWFwcGluZ3MiOiAiO0FBQUEsUUFBUSxJQUFJLGdCQUFnQjsiLAogICJuYW1lcyI6IFtdCn0K
package/lib/index.ts CHANGED
@@ -1 +1 @@
1
- console.log("Hello via Bun!");
1
+ console.log("Hello via Bun!")
package/package.json CHANGED
@@ -1,10 +1,13 @@
1
1
  {
2
2
  "name": "circuit-json-to-spice",
3
3
  "main": "dist/index.js",
4
- "version": "0.0.1",
4
+ "version": "0.0.2",
5
5
  "type": "module",
6
6
  "scripts": {
7
- "build": "tsup-node ./lib/index.ts --dts --format esm --sourcemap inline -d dist"
7
+ "build": "tsup-node ./lib/index.ts --dts --format esm --sourcemap inline -d dist",
8
+ "format": "biome format --write .",
9
+ "format:check": "biome format .",
10
+ "typecheck": "tsc --noEmit"
8
11
  },
9
12
  "devDependencies": {
10
13
  "@biomejs/biome": "^1.9.4",