Skip to content

Commit 20cfe77

Browse files
authored
Merge pull request #1 from pyreon/chore/rolldown-and-release-prep
Replace esbuild with tools-rolldown, add release files
2 parents b2f34e4 + 734f8d3 commit 20cfe77

14 files changed

Lines changed: 794 additions & 256 deletions

File tree

.claude/rules/ci.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,15 @@ All jobs run in parallel on every PR to `main`:
88

99
| Job | What | Fails on |
1010
|---|---|---|
11-
| Lint & Format | `biome lint` + `biome format --check` | Any lint error or format diff |
11+
| Lint & Format | `biome check` | Any lint error or format diff |
1212
| Typecheck | `tsc --noEmit` | Any type error |
1313
| Test & Coverage | `vitest --coverage` + artifact upload | Test failure or coverage below 95% |
14-
| Build | esbuild + `dist/` artifact upload | Build error |
14+
| Build | Rolldown + `dist/` artifact upload | Build error |
1515
| Secrets Scan | TruffleHog (full history, verified only) | Verified secret found |
16-
| Security Audit | `bun pm audit --level=high` | High+ vulnerability |
16+
| Security Audit | `bun audit --audit-level=critical` | Critical vulnerability |
1717
| Dependency Review | `actions/dependency-review-action` | High CVE or GPL-3.0/AGPL-3.0 license |
1818
| CodeQL Analysis | GitHub CodeQL `security-and-quality` | Security or quality finding |
1919

20-
### claude-review.yml — Claude PR Reviewer
21-
22-
- Auto-reviews every PR (opened, reopened, synchronize).
23-
- Responds to `@claude` mentions in PR comments.
24-
- Requires `ANTHROPIC_API_KEY` repo secret.
25-
2620
### release.yml — Tagged Releases
2721

2822
- Triggered by `v*` tags (e.g., `git tag v0.1.0 && git push --tags`).
@@ -35,7 +29,7 @@ All jobs run in parallel on every PR to `main`:
3529

3630
### dependency-update.yml — Weekly Health Check
3731

38-
- Every Monday: `bun outdated` + `bun pm audit`.
32+
- Every Monday: `bun outdated` + `bun audit`.
3933
- Also available via manual `workflow_dispatch`.
4034

4135
## Action Pins
@@ -53,5 +47,5 @@ bun run check && bun run typecheck && bun run build && bun run test -- --coverag
5347
## Release Checklist
5448

5549
1. Ensure all CI checks pass on `main`.
56-
2. Update version in `package.json` and `manifest.json`.
50+
2. Update version in `package.json` (manifest.json is auto-synced during build).
5751
3. `git tag v<version> && git push --tags` — release workflow handles the rest.

.claude/rules/code.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737

3838
## Build
3939

40-
- `esbuild.config.ts` handles all 5 entry points and copies static files to `dist/`.
40+
- `vl-tools.config.mjs` configures `@vitus-labs/tools-rolldown` with 5 entry points and static file copying.
41+
- `scripts/sync-manifest.ts` syncs the version from `package.json` into `dist/manifest.json` after build.
4142
- `dist/` is the self-contained extension directory. Chrome "Load unpacked" points there.
4243
- Static files: `manifest.json`, `devtools.html`, `panel.html`, `panel.css`, `icons/`.
43-
- NEVER import node built-ins in files that run in the browser. Only `esbuild.config.ts` and `scripts/` may use Node/Bun APIs.
44+
- NEVER import node built-ins in files that run in the browser. Only `scripts/` may use Node/Bun APIs.

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ concurrency:
1212

1313
permissions:
1414
contents: read
15+
security-events: write
1516

1617
jobs:
1718
lint:
@@ -24,8 +25,7 @@ jobs:
2425
with:
2526
bun-version: latest
2627
- run: bun install --frozen-lockfile
27-
- run: bun run lint
28-
- run: bunx biome format --check .
28+
- run: bunx biome check .
2929

3030
typecheck:
3131
name: Typecheck
@@ -49,7 +49,6 @@ jobs:
4949
with:
5050
bun-version: latest
5151
- run: bun install --frozen-lockfile
52-
- run: bun run build
5352
- run: bun run test -- --coverage
5453
- name: Upload coverage
5554
if: always()
@@ -99,7 +98,8 @@ jobs:
9998
bun-version: latest
10099
- run: bun install --frozen-lockfile
101100
- name: Audit dependencies
102-
run: bun pm audit --level=high
101+
# Transitive devDependency vulnerabilities (not shipped) may cause failures
102+
run: bun audit --audit-level=critical
103103

104104
dependency-review:
105105
name: Dependency Review

.github/workflows/claude-review.yml

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

.github/workflows/dependency-update.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ jobs:
2222
- name: Check outdated packages
2323
run: bun outdated
2424
- name: Audit for vulnerabilities
25-
run: bun pm audit --level=high || true
25+
run: bun audit --audit-level=high || true

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Changelog
2+
3+
## 0.1.0
4+
5+
Initial release.
6+
7+
- Chrome DevTools panel with live component tree
8+
- Click-to-highlight DOM elements
9+
- Component inspector with details pane
10+
- Real-time mount/unmount tracking
11+
- Automatic Pyreon framework detection
12+
- Manifest V3 Chrome extension

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ bun run typecheck # tsc --noEmit
5353

5454
## Tooling
5555

56-
- **Build**: esbuild — IIFE for content/page/panel/devtools, ESM for background
56+
- **Build**: Rolldown via `@vitus-labs/tools-rolldown` — IIFE for content/page/panel/devtools, ESM for background
5757
- **Lint**: Biome via `@vitus-labs/tools-lint` (single quotes, no semicolons, 2-space indent)
5858
- **TypeScript**: `@vitus-labs/tools-typescript/lib` (ES2024, strict, bundler resolution)
5959
- **Tests**: Vitest via `@vitus-labs/tools-vitest` with happy-dom

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026 Vit Bokisch
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,48 @@
1-
# devtools
1+
# @pyreon/devtools
2+
3+
Chrome DevTools extension for the [Pyreon](https://github.com/nickolasgit/pyreon) UI framework. Adds a **Pyreon** panel to Chrome DevTools with a live component tree, click-to-highlight, and inspector.
4+
5+
## Features
6+
7+
- Live component tree reflecting the current page state
8+
- Click any component to highlight its DOM element on the page
9+
- Inspector pane showing component details (id, parent, children)
10+
- Real-time mount/unmount tracking
11+
- Automatic Pyreon framework detection
12+
13+
## Install (development)
14+
15+
```bash
16+
bun install
17+
bun run build
18+
```
19+
20+
1. Open `chrome://extensions`
21+
2. Enable **Developer mode**
22+
3. Click **Load unpacked** and select the `dist/` directory
23+
24+
## Commands
25+
26+
```bash
27+
bun run build # production build -> dist/
28+
bun run dev # watch mode with auto-rebuild
29+
bun run test # run tests
30+
bun run lint # biome lint
31+
bun run check # biome check --write
32+
bun run typecheck # tsc --noEmit
33+
```
34+
35+
## Architecture
36+
37+
Four isolated execution contexts communicate via tagged message passing:
38+
39+
```
40+
Page (window.__PYREON_DEVTOOLS__) <-> window.postMessage
41+
Content Script (content-script.ts) <-> chrome.runtime messaging
42+
Background Service Worker (background.ts) <-> chrome.runtime.Port
43+
DevTools Panel (panel.ts)
44+
```
45+
46+
## License
47+
48+
[MIT](LICENSE)

0 commit comments

Comments
 (0)