Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 5
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 5
27 changes: 17 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,23 @@ on:
push:
branches: [main]
pull_request:
branches: [main]
branches: ["**"]

permissions:
contents: read

jobs:
test:
name: test (node ${{ matrix.node }})
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node: ["20.11", "20", "22"]
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- node: "24"
os: ubuntu-latest
steps:
- uses: actions/checkout@v4

Expand All @@ -25,14 +29,20 @@ jobs:
with:
node-version: ${{ matrix.node }}

- name: Install dependencies
run: npm ci

- name: Unit tests
run: node --test
run: npm test

- name: TypeScript check
run: npx tsc --noEmit

- name: Demo smoke test (deterministic)
run: node tools/demo.mjs --ci

- name: Pack check
run: npm pack --dry-run
run: npm run pack:check

verify-plugin:
name: verify plugin under @opentui/solid (bun)
Expand All @@ -43,11 +53,8 @@ jobs:
- name: Setup Bun
uses: oven-sh/setup-bun@v2

# solid-js / @opentui/solid are *optional* peerDependencies, which npm won't
# install even when asked directly; install-peers.mjs works around that by
# installing them in a clean project and copying them into node_modules.
- name: Install peer runtime
run: node tools/install-peers.mjs
- name: Install Node dependencies
run: npm ci

- name: Verify plugin module loads + wires correctly
run: bun tools/verify-plugin.mjs
run: npm run verify:plugin
18 changes: 16 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ jobs:
node-version: "20"
registry-url: "https://registry.npmjs.org" # writes .npmrc using NODE_AUTH_TOKEN

- name: Install dependencies
run: npm ci

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

- name: Verify version matches the tag
run: |
set -euo pipefail
Expand All @@ -46,7 +52,10 @@ jobs:
fi

- name: Unit tests
run: node --test
run: npm test

- name: Verify plugin runtime
run: npm run verify:plugin

- name: Demo smoke test (deterministic)
run: node tools/demo.mjs --ci
Expand All @@ -55,7 +64,12 @@ jobs:
run: npm pack --dry-run

- name: Publish to npm
run: npm publish --provenance --access public
run: |
if [[ "$GITHUB_REF_NAME" == *-* ]]; then
npm publish --provenance --access public --tag next
else
npm publish --provenance --access public
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

Expand Down
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ node_modules/
.pnp
.pnp.js

# Lockfiles are intentionally not committed (library convention; CI/tests run
# without an install). Generated locally by `npm install`.
package-lock.json
# npm-shrinkwrap is for published application locks; this package commits
# package-lock.json for reproducible development and CI installs.
npm-shrinkwrap.json

# Build / cache
Expand All @@ -32,3 +31,6 @@ yarn-error.log*
# Test / coverage artifacts
coverage/
.nyc_output/
*.tgz
*.bak
*.bak.*
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Add it to your OpenCode config dir (e.g. `~/.config/opencode`):

```jsonc
// tui.json
{ "$schema": "https://opencode.ai/tui.json", "plugin": ["@devinoldenburg/opencode-tps-meter"] }
{ "$schema": "https://opencode.ai/tui.json", "plugin": ["@devinoldenburg/opencode-tps-meter/tui"] }
```

```jsonc
Expand All @@ -112,7 +112,7 @@ Pass options via the OpenCode plugin tuple in `tui.json`:
{
"$schema": "https://opencode.ai/tui.json",
"plugin": [
["@devinoldenburg/opencode-tps-meter", { "metric": "output", "gapMs": 1000, "detail": "compact" }]
["@devinoldenburg/opencode-tps-meter/tui", { "metric": "output", "gapMs": 1000, "detail": "compact" }]
]
}
```
Expand Down
Loading
Loading