Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
218 commits
Select commit Hold shift + click to select a range
4def850
docs: add AGENTS.md with coding guidelines and project info
MBanucu Jan 21, 2026
c1e1f70
chore(build): add nix flake devshell with bun2nix
MBanucu Jan 21, 2026
e0ece3f
feat: add browser-based PTY session monitor with real-time output
MBanucu Jan 21, 2026
c64fdb3
test: add comprehensive unit test suite for web server
MBanucu Jan 21, 2026
401ac0a
fix: correct WebSocket upgrade call to match Bun.serve API
MBanucu Jan 21, 2026
aa1d6a5
docs: add local installation guides and setup script
MBanucu Jan 21, 2026
d60785c
fix: correct OpenCode configuration format and permissions
MBanucu Jan 21, 2026
e8fa25e
feat: update example config to use Grok Code Fast 1 from OpenCode Zen
MBanucu Jan 21, 2026
e5864fa
fix: correct OpenCode plugin loading to use local directory approach
MBanucu Jan 21, 2026
b97add2
feat: add web UI for PTY session management
MBanucu Jan 21, 2026
8edc8b9
feat: add session management APIs and enhance test infrastructure
MBanucu Jan 21, 2026
04fe562
fix: resolve circular reference bug and add unit tests
MBanucu Jan 21, 2026
e2f00c8
refactor(test): convert test suite to use real WebSocket connections
MBanucu Jan 21, 2026
416650e
test: improve test suite reliability and logging
MBanucu Jan 21, 2026
768df2e
perf(test): optimize live streaming test timing
MBanucu Jan 21, 2026
954b562
test: enable real server integration for e2e tests
MBanucu Jan 22, 2026
5e981f0
feat(test): unify test framework with Playwright
MBanucu Jan 22, 2026
fb896b4
docs: update workspace cleanup report
MBanucu Jan 22, 2026
16fcb20
ci: migrate release workflow from Node.js to Bun
MBanucu Jan 22, 2026
0b3c0de
docs: mark CI pipeline Bun migration as completed
MBanucu Jan 22, 2026
d5dbf5c
ci: add PR triggers and separate CI workflow
MBanucu Jan 22, 2026
1f53e6f
chore: remove committed test artifacts and update gitignore
MBanucu Jan 22, 2026
665d1e1
docs: mark test artifacts cleanup as completed
MBanucu Jan 22, 2026
8206ced
deps: update core dependencies to latest versions
MBanucu Jan 22, 2026
f631fd2
docs: mark core dependency updates as completed
MBanucu Jan 22, 2026
43a6c12
build: standardize and optimize build scripts
MBanucu Jan 22, 2026
6888290
docs: mark build script standardization as completed
MBanucu Jan 22, 2026
a2b21b1
feat: add code quality tools (ESLint + Prettier)
MBanucu Jan 22, 2026
8ffa0e5
docs: mark code quality tools setup as completed
MBanucu Jan 22, 2026
c304efb
style: format codebase with Prettier
MBanucu Jan 22, 2026
bf475cb
refactor(cleanup): clean up codebase and improve code quality
MBanucu Jan 22, 2026
e738f63
refactor(deps): update major dependencies
MBanucu Jan 22, 2026
6e2c35d
build(deps): update major dependencies and configurations
MBanucu Jan 22, 2026
8759625
docs: update cleanup report with dependency updates completion
MBanucu Jan 22, 2026
f5544bb
fix: resolve integration test failures
MBanucu Jan 22, 2026
7692cb5
docs: update cleanup report with integration test fixes completion
MBanucu Jan 22, 2026
f41e463
test: fix live streaming test to validate functionality via output in…
MBanucu Jan 22, 2026
25fa60c
refactor(logging): integrate Pino logger and reduce test console output
MBanucu Jan 22, 2026
b89f942
test: add unit tests demonstrating WebSocket subscription logic
MBanucu Jan 22, 2026
eac017a
fix: correct WebSocket message counter reset and failing test
MBanucu Jan 22, 2026
e5f6335
refactor: clean up code and optimize configuration
MBanucu Jan 22, 2026
b2c05b5
style: improve code formatting and readability
MBanucu Jan 22, 2026
460be3a
refactor: enhance CI pipeline and code quality
MBanucu Jan 22, 2026
e70d574
security: add regex validation and health monitoring
MBanucu Jan 22, 2026
68c0a38
feat: implement advanced security and monitoring capabilities
MBanucu Jan 22, 2026
af594c0
fix: update E2E test to match actual live streaming output
MBanucu Jan 22, 2026
9228ef8
test: document critical bug where historical data is not loaded for r…
MBanucu Jan 22, 2026
b66e144
fix: resolve test isolation issues and improve reliability
MBanucu Jan 22, 2026
47a551b
fix: correct session output API to return buffered data
MBanucu Jan 22, 2026
217381f
feat(test): implement parallel test execution and reduce verbosity
MBanucu Jan 22, 2026
b89cc53
refactor: consolidate constants and improve logging
MBanucu Jan 22, 2026
0c0f5be
perf(test): increase Playwright workers for faster test execution
MBanucu Jan 22, 2026
37eeac7
feat(logging): enhance Pino logging configuration for production best…
MBanucu Jan 22, 2026
9ec1d2a
feat(logging): implement advanced Pino best practices for production …
MBanucu Jan 22, 2026
6befc3a
refactor: complete workspace cleanup and optimization
MBanucu Jan 22, 2026
150c0a4
refactor: final codebase polish and cleanup
MBanucu Jan 22, 2026
8ea7e1f
feat(ci): enhance GitHub Actions with security scanning and performan…
MBanucu Jan 22, 2026
a738559
fix(ci): resolve CI pipeline failures and remove unused dependencies
MBanucu Jan 22, 2026
4b3bf4e
docs: final documentation polish and minor cleanup
MBanucu Jan 22, 2026
3b29f08
fix(ci): resolve all ESLint errors blocking CI pipeline
MBanucu Jan 22, 2026
f685ca5
fix(ci): resolve Playwright test framework conflicts in CI
MBanucu Jan 22, 2026
941060b
fix(test): resolve Playwright framework conflicts with Bun test disco…
MBanucu Jan 22, 2026
8495dea
refactor(scripts): clean up and optimize package.json scripts
MBanucu Jan 22, 2026
9ce8b29
fix(ci): fix failing CI tests and improve web server test reliability
MBanucu Jan 22, 2026
f2ec607
fix(ci): fix YAML indentation in CI workflow steps
MBanucu Jan 22, 2026
23662fa
fix(ci): disable concurrent test execution to prevent shared state in…
MBanucu Jan 22, 2026
5940430
fix(ci): prevent duplicate CI runs by limiting push triggers to main …
MBanucu Jan 22, 2026
e23f9a0
debug: add logging to investigate CI test failures
MBanucu Jan 22, 2026
60eb8ad
feat: enable debug level verbose logging in CI environment
MBanucu Jan 22, 2026
14891a9
refactor: replace console.log with pino logging for consistency
MBanucu Jan 22, 2026
556cd44
fix: enable Pino logging in CI to show verbose debug output
MBanucu Jan 22, 2026
e6a2918
fix(ci): use serial test execution with --concurrency=1
MBanucu Jan 22, 2026
08fdc0a
fix(ci): enable CI on web-ui-implementation branch pushes
MBanucu Jan 22, 2026
f1e3009
fix(tests): update HTTP endpoint tests to use echo command and remove…
MBanucu Jan 22, 2026
92339b3
fix(tests): add cleanupAll in afterEach to ensure session isolation
MBanucu Jan 22, 2026
7eec807
fix(ci): skip PTY-dependent HTTP tests in CI due to environment issues
MBanucu Jan 22, 2026
047bf34
fix(ci): change runner to ubuntu-20.04 to avoid node-pty io_uring issues
MBanucu Jan 22, 2026
8dcfd3d
fix(ci): change runners to ubuntu-22.04 as ubuntu-20.04 is deprecated
MBanucu Jan 22, 2026
3f83265
fix(tests): unskip PTY-dependent HTTP tests now that ubuntu-22.04 fix…
MBanucu Jan 22, 2026
d37b8bc
fix(tests): add PTY startup waits to stabilize timing in CI
MBanucu Jan 22, 2026
36b66da
fix(ci): switch to ubuntu-24.04 runner
MBanucu Jan 22, 2026
626b052
fix(logging): make Pino logging synchronous to prevent displaced logs…
MBanucu Jan 22, 2026
5aedcf3
fix(logging): use transports with sync:true for proper synchronous lo…
MBanucu Jan 22, 2026
578a857
fix(logging): remove level formatters that conflict with transports
MBanucu Jan 22, 2026
a5d330d
fix(tests): allow operations on exited PTY processes and use random n…
MBanucu Jan 22, 2026
266a028
fix(types): remove type annotation for onExit to resolve TypeScript e…
MBanucu Jan 22, 2026
be26a52
feat(logging): add debug logging to manager and server for CI trouble…
MBanucu Jan 22, 2026
57d6a0f
feat(logging): improve structured logging with formatters and consist…
MBanucu Jan 22, 2026
f55d211
feat(logging): update logger interface for clarity on structured logg…
MBanucu Jan 22, 2026
2a60b17
refactor(logging): use Pino's native API directly
MBanucu Jan 22, 2026
18ec1fe
fix(ci): resolve CI test failures and standardize logging
MBanucu Jan 22, 2026
458ebd3
refactor(websocket): improve connection stability and logging configu…
MBanucu Jan 22, 2026
3e448da
test(logging): add comprehensive unit tests for logging system
MBanucu Jan 22, 2026
34ded5b
test(integration): add logger format integration tests
MBanucu Jan 22, 2026
beee990
test(integration): add integration tests for logger format verification
MBanucu Jan 22, 2026
b87dcda
fix(test): fix logger integration tests
MBanucu Jan 22, 2026
a46f085
fix(test): correct API endpoints and improve UI state assertions in e…
MBanucu Jan 22, 2026
714fb7e
fix(test): stabilize WebSocket message counter e2e tests
MBanucu Jan 22, 2026
49556b8
feat(test): implement per-worker isolated test servers
MBanucu Jan 22, 2026
054afc6
refactor(test): inherit NODE_ENV and LOG_LEVEL from environment in te…
MBanucu Jan 22, 2026
aeb3a37
refactor: change 'No clients subscribed to session' from warn to debu…
MBanucu Jan 22, 2026
aa47609
fix(test): fix parallel e2e test execution failures
MBanucu Jan 22, 2026
e53ec9a
feat(pty): add /server-url slash command for web server URL
MBanucu Jan 22, 2026
f589f54
refactor(plugin): move slash command registration to config function
MBanucu Jan 22, 2026
2ac9363
chore: ignore .opencode/ local development environment
MBanucu Jan 22, 2026
29eac33
build(dev): add installation scripts for local development
MBanucu Jan 22, 2026
8573a1b
feat(web): replace plain text output with xterm.js terminal renderer
MBanucu Jan 22, 2026
e8fdee1
chore: update bun.lock for xterm.js dependencies
MBanucu Jan 22, 2026
76a45cb
feat(web): make terminal interactive with direct input handling
MBanucu Jan 22, 2026
6ac7761
fix(web): fix terminal input handling to prevent double echo and mang…
MBanucu Jan 22, 2026
c83e3bf
debug(web): add logging and temporary local echo for spacebar debugging
MBanucu Jan 22, 2026
2a1452b
test(e2e): add input capture test for PTY terminal
MBanucu Jan 22, 2026
fd859af
debug: add pino logging for terminal input capture
MBanucu Jan 22, 2026
362fa0d
feat(web): add interactive web UI for PTY session management
MBanucu Jan 22, 2026
53787bf
feat(web-ui): implement web UI for PTY sessions with xterm.js terminal
MBanucu Jan 23, 2026
48ec71e
fix(web-ui): clean up debug logging and fix WebSocket counter reset
MBanucu Jan 23, 2026
5d77514
refactor: improve codebase modularity and maintainability
MBanucu Jan 23, 2026
c2e44c2
refactor(logging): remove debugging console.log and log.debug statements
MBanucu Jan 23, 2026
d89eec0
refactor: reduce code duplication and improve maintainability
MBanucu Jan 23, 2026
555667c
refactor(logging): remove debug logging statements
MBanucu Jan 23, 2026
94e2b11
refactor(pty): improve code maintainability and eliminate duplication
MBanucu Jan 23, 2026
878f9bb
refactor: restructure web UI components and improve PTY session manag…
MBanucu Jan 23, 2026
5ea9151
test(e2e): add xterm content extraction capability
MBanucu Jan 23, 2026
4daf9bb
test(e2e): add SerializeAddon-based xterm content extraction test
MBanucu Jan 23, 2026
49d8f49
refactor: remove verbose WebSocket logging to eliminate console spam
MBanucu Jan 23, 2026
ff59dfb
fix: resolve failing e2e tests after WebSocket logging removal
MBanucu Jan 23, 2026
1cfdef8
test(e2e): add SerializeAddon vs server buffer content comparison test
MBanucu Jan 23, 2026
00fc049
feat: add comprehensive xterm content extraction testing suite
MBanucu Jan 23, 2026
f40a157
feat: restructure RingBuffer to preserve newline characters with read…
MBanucu Jan 23, 2026
3b45949
feat: add raw buffer API endpoint with comprehensive testing
MBanucu Jan 23, 2026
e4f74f4
fix: improve RingBuffer reliability and test coverage
MBanucu Jan 23, 2026
1c281d1
feat: switch app to use raw buffer endpoint for historical data
MBanucu Jan 23, 2026
ecb4ab1
feat: implement dual output callbacks for processed and raw PTY data
MBanucu Jan 23, 2026
81b51f9
refactor: separate API calls for raw data and line arrays
MBanucu Jan 23, 2026
7bb3bc2
feat(terminal): add terminal mode switching with raw and processed views
MBanucu Jan 23, 2026
94a99ed
feat(api): add plain text buffer API endpoint
MBanucu Jan 23, 2026
1a22858
test: add SerializeAddon plain text extraction test
MBanucu Jan 23, 2026
0bf913f
test: add interactive input comparison between API and SerializeAddon
MBanucu Jan 23, 2026
44b1917
test: add initial bash state comparison between API and SerializeAddon
MBanucu Jan 23, 2026
e19a688
test: enhance initial bash state test with detailed output previews
MBanucu Jan 23, 2026
98d656b
test: add cat command comparison between API and SerializeAddon
MBanucu Jan 23, 2026
622351d
fix: resolve newline handling issues in terminal data flow
MBanucu Jan 23, 2026
e0d8b4e
test: add comprehensive double-echo detection test
MBanucu Jan 23, 2026
657a399
fix: eliminate double-echo by removing local echo and simplifying to …
MBanucu Jan 23, 2026
9d83a5d
feat: add session switching content clearing test
MBanucu Jan 23, 2026
24cb26c
fix: remove all references to deleted /api/sessions/{id}/output endpoint
MBanucu Jan 23, 2026
15c6465
fix: complete /output endpoint removal and fix double-echo test
MBanucu Jan 23, 2026
748518b
feat: add comprehensive PTY debugging and input handling improvements
MBanucu Jan 24, 2026
b1b5241
refactor: remove debug console.log statements from production code
MBanucu Jan 24, 2026
0ba2698
refactor(pty): DRY up repeated session lookup with withSession() help…
MBanucu Jan 24, 2026
042120c
refactor(pty/permissions): unify and DRY permission denial/toast logic
MBanucu Jan 24, 2026
6bffcb4
refactor(pty/buffer): deduplicate trailing newline strip logic
MBanucu Jan 24, 2026
3bfb081
refactor(web/TerminalRenderer): DRY terminal output reporting and ses…
MBanucu Jan 24, 2026
07c8d5a
refactor(e2e): split xterm content extraction test suite into modular…
MBanucu Jan 24, 2026
32d315b
chore(e2e): enforce ultra-silent Playwright E2E tests (remove logs/de…
MBanucu Jan 24, 2026
921c85b
test(e2e/pty-buffer-readraw): ensure session state isolation for all …
MBanucu Jan 24, 2026
c77be1a
test(e2e/pty-buffer-readraw): fix race condition in session switch test
MBanucu Jan 24, 2026
21b79b3
test(e2e/newline-verification): robustify prompt char test and fix ty…
MBanucu Jan 24, 2026
fa4baf2
test(e2e/newline-verification): accept flexible prompt row in echo ne…
MBanucu Jan 24, 2026
c973b84
test(e2e): make dom-vs-xterm-api robust to prompt/whitespace differences
MBanucu Jan 24, 2026
c4305e5
test(e2e): enforce PTY session isolation for visual verification dom-…
MBanucu Jan 24, 2026
e7b8351
test(e2e): robustify and refactor buffer and extraction tests
MBanucu Jan 24, 2026
b2b94a1
test(e2e/input-capture): clean up tests and remove debug logs
MBanucu Jan 24, 2026
3d36c30
docs(AGENTS.md): rewrite and modernize agent/dev workflow & troublesh…
MBanucu Jan 24, 2026
d423580
test(e2e): robustify and standardize E2E interactive shell sessions
MBanucu Jan 24, 2026
3d0f4b6
test(dev server, pty-echo): update dev server and PTY echo test for i…
MBanucu Jan 24, 2026
6f02f56
test(e2e): remove noisy console.log output from E2E test files
MBanucu Jan 24, 2026
b9c0552
test(e2e): clean up PTY buffer readRaw test debug output
MBanucu Jan 24, 2026
b6631b2
test(e2e): refactor PTY buffer tests for reliability and maintainability
MBanucu Jan 24, 2026
a40b895
docs(agents): modernize and clarify AGENTS.md usage, setup, and testing
MBanucu Jan 24, 2026
e639efa
test(e2e): use Bun.stripANSI for robust ANSI stripping in buffer-readraw
MBanucu Jan 24, 2026
230746f
refactor(e2e): DRY up xterm serialize logic via shared helper
MBanucu Jan 24, 2026
0beb8ca
refactor(test e2e): migrate all E2E tests to robust event-driven waits
MBanucu Jan 25, 2026
707b779
test(e2e): deduplicate terminal helpers and harden flaky input
MBanucu Jan 25, 2026
cba88c1
test(e2e): comment unused debug code in playwright tests
MBanucu Jan 25, 2026
57e6657
refactor(web): improve static file handling security and path resolution
MBanucu Jan 26, 2026
056ca8b
chore: remove temporary documentation and config files
MBanucu Jan 26, 2026
4d0f55c
chore: prepare for npm test release
MBanucu Jan 26, 2026
d64bd87
feat: add automated testing scripts for npm packages and OpenCode plu…
MBanucu Jan 26, 2026
2202836
chore: prepare test release 0.1.4-test.1
MBanucu Jan 26, 2026
6344783
refactor(web): simplify server to always serve built assets
MBanucu Jan 27, 2026
afdabcf
chore: clean up development scripts and enable e2e test session
MBanucu Jan 27, 2026
a458a3a
refactor(test-web-server): simplify test-web-server.ts structure
MBanucu Jan 27, 2026
519b98b
refactor: clean up PTY session configuration and test artifacts
MBanucu Jan 27, 2026
5173b16
refactor: move test-web-server.ts to e2e directory
MBanucu Jan 27, 2026
d74d8f7
chore: remove redundant manual e2e test file
MBanucu Jan 27, 2026
31f96a6
refactor: move start-server.ts to test directory
MBanucu Jan 27, 2026
48be6e8
feat(web/router): add router infrastructure with parameter support an…
MBanucu Jan 27, 2026
a5a1ade
feat(web/router): migrate API routes to unified router system
MBanucu Jan 27, 2026
11fbf60
docs: update routing improvements plan for Phase 2 completion
MBanucu Jan 27, 2026
ded723b
refactor(web): consolidate error handling and add input validation
MBanucu Jan 27, 2026
cf1cb6c
docs(plan): document Phase 3 completion in routing improvements plan
MBanucu Jan 27, 2026
3a444a2
refactor(server): replace custom router with Bun's built-in routing
MBanucu Jan 27, 2026
ee6388f
refactor(web-server): serve static files via dynamic routes
MBanucu Jan 27, 2026
4d16001
fix(test): await startWebServer calls in remaining tests
MBanucu Jan 27, 2026
b5b2172
refactor(websocket): move websocket upgrade to dedicated /ws route
MBanucu Jan 27, 2026
14fbb25
refactor(server): redirect root path to index.html
MBanucu Jan 27, 2026
4e01b86
feat(web/server): implement WebSocket pub/sub and fix session updates
MBanucu Jan 27, 2026
560f1ed
refactor(web): restructure into client, server, and shared subdirecto…
MBanucu Jan 27, 2026
ed3d0e1
refactor: remove Pino logger and console.log statements
MBanucu Jan 27, 2026
bc6be8a
fix(websocket): do not return response on successful upgrade
MBanucu Jan 27, 2026
d6de54e
fix: update version and author in package.json; clean up error handli…
MBanucu Jan 27, 2026
e506a6e
docs: comprehensively update project documentation
MBanucu Jan 27, 2026
55f4ff9
refactor(pty): streamline server URL handling and add port conflict r…
MBanucu Jan 27, 2026
d7926d4
Merge upstream/main to make branch mergeable
MBanucu Jan 27, 2026
6b01be5
docs: remove completed routing simplification plan
MBanucu Jan 27, 2026
255f6de
chore: bump version to 0.1.4-test.4
MBanucu Jan 27, 2026
7795c56
refactor: rename slash command to pty-server-url
MBanucu Jan 27, 2026
512800a
chore: update package metadata to shekohex
MBanucu Jan 27, 2026
66e705d
ci: remove security job from CI workflow
MBanucu Jan 27, 2026
3aa35f5
ci: clean up CI workflow triggers
MBanucu Jan 27, 2026
914582d
fix: update import paths to resolve TypeScript module resolution errors
MBanucu Jan 27, 2026
f525abd
ci: disable lint step and simplify test command
MBanucu Jan 27, 2026
1965607
ci: update build command to build:all:prod
MBanucu Jan 27, 2026
17e9b45
ci: update GitHub Actions to latest versions
MBanucu Jan 27, 2026
f40087e
ci: fix test execution in non-interactive CI environment
MBanucu Jan 27, 2026
4e1093f
ci: use unbuffer to allocate TTY and propagate exit codes
MBanucu Jan 27, 2026
03be5e7
test: add debug logging to failing tests
MBanucu Jan 27, 2026
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
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
name: Bug Report
about: Report a bug with the opencode-pty plugin
title: "[Bug]: "
labels: ["bug"]
assignees: ""
title: '[Bug]: '
labels: ['bug']
assignees: ''
---

## Description
Expand Down
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
name: Feature Request
about: Suggest a new feature or enhancement
title: "[Feature]: "
labels: ["enhancement"]
assignees: ""
title: '[Feature]: '
labels: ['enhancement']
assignees: ''
---

## Problem Statement
Expand Down
64 changes: 64 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

permissions:
contents: read
actions: read

jobs:
test:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Cache Bun dependencies
uses: actions/cache@v5
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-

- name: Install dependencies
run: bun install

- name: Type check
run: bun run typecheck

# big rework needed to fix lint issues
# - name: Lint
# run: bun run lint

- name: Check formatting
run: bun run format:check

- name: Build
run: bun run build:all:prod

- name: Install expect
run: sudo apt-get update && sudo apt-get install -y expect

- name: Run tests
run: unbuffer bun test

dependency-review:
runs-on: ubuntu-24.04
if: github.event_name == 'pull_request'
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Dependency Review
uses: actions/dependency-review-action@v4
35 changes: 19 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

permissions:
Expand All @@ -19,19 +22,19 @@ jobs:
with:
fetch-depth: 0

- name: Use Node.js
uses: actions/setup-node@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
node-version: 20
bun-version: latest

- name: Determine release state
id: determine
run: |
set -euo pipefail
CURRENT_VERSION=$(node -p "require('./package.json').version")
CURRENT_VERSION=$(bun -e 'import pkg from "./package.json"; console.log(pkg.version)')
echo "current_version=$CURRENT_VERSION" >> "$GITHUB_OUTPUT"
if git rev-parse HEAD^ >/dev/null 2>&1; then
PREVIOUS_VERSION=$(node -e "const { execSync } = require('node:child_process'); try { const data = execSync('git show HEAD^:package.json', { stdio: ['ignore', 'pipe', 'ignore'] }); const json = JSON.parse(data.toString()); if (json && typeof json.version === 'string') { process.stdout.write(json.version); } } catch (error) {}")
PREVIOUS_VERSION=$(bun -e "const { execSync } = require('node:child_process'); try { const data = execSync('git show HEAD^:package.json', { stdio: ['ignore', 'pipe', 'ignore'] }); const json = JSON.parse(data.toString()); if (json && typeof json.version === 'string') { process.stdout.write(json.version); } } catch (error) {}")
PREVIOUS_VERSION=${PREVIOUS_VERSION//$'\n'/}
else
PREVIOUS_VERSION=""
Expand All @@ -51,13 +54,15 @@ jobs:

- name: Install dependencies
if: steps.determine.outputs.changed == 'true' && steps.determine.outputs.tag_exists == 'false'
run: |
npm install -g npm@latest
npm install
run: bun install

- name: Type check
if: steps.determine.outputs.changed == 'true' && steps.determine.outputs.tag_exists == 'false'
run: npx tsc --noEmit
run: bun run typecheck

- name: Run tests
if: steps.determine.outputs.changed == 'true' && steps.determine.outputs.tag_exists == 'false'
run: bun run test

- name: Generate release notes
if: steps.determine.outputs.changed == 'true' && steps.determine.outputs.tag_exists == 'false'
Expand Down Expand Up @@ -123,15 +128,13 @@ jobs:

- name: Create GitHub release
if: steps.determine.outputs.changed == 'true' && steps.determine.outputs.tag_exists == 'false'
uses: actions/create-release@v1
run: |
gh release create "v${{ steps.determine.outputs.current_version }}" \
--title "v${{ steps.determine.outputs.current_version }}" \
--notes "${{ steps.release_notes.outputs.body }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.determine.outputs.current_version }}
release_name: v${{ steps.determine.outputs.current_version }}
body: ${{ steps.release_notes.outputs.body }}
generate_release_notes: false

- name: Publish to npm
if: steps.determine.outputs.changed == 'true' && steps.determine.outputs.tag_exists == 'false'
run: npm publish --access public --provenance
run: bunx npm publish --access public --provenance
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,17 @@ out
dist
*.tgz

# local development environment
.opencode/

# code coverage
coverage
*.lcov

# test results and reports
playwright-report/
test-results/

# logs
logs
_.log
Expand Down
30 changes: 30 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Dependencies
node_modules/
bun.lock

# Build outputs
dist/
*.tgz

# Test reports
playwright-report/
test-results/
coverage/

# Logs
*.log
logs/

# OS generated files
.DS_Store
Thumbs.db

# IDE
.vscode/
.idea/

# Git
.git/

# Lock files (Bun handles this)
bun.lock
8 changes: 8 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"semi": false,
"trailingComma": "es5",
"singleQuote": true,
"printWidth": 100,
"tabWidth": 2,
"useTabs": false
}
Loading
Loading