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
4 changes: 0 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,5 @@ jobs:
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
4 changes: 3 additions & 1 deletion .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@ jobs:

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version-file: .tool-versions

- name: Install monorepo dependencies
run: bun install --frozen-lockfile

- name: Build monorepo packages
run: make
run: bun run build

- name: Install site dependencies
run: cd tko.io && bun install --frozen-lockfile
Expand Down
31 changes: 0 additions & 31 deletions .github/workflows/electron.yaml

This file was deleted.

8 changes: 5 additions & 3 deletions .github/workflows/lint-and-typecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,20 @@ jobs:

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version-file: .tool-versions

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Check Prettier
run: make format
run: bun run format

- name: Check ESLint
run: make eslint
run: bun run lint

- name: Build (required for tsc)
run: make
run: bun run build

- name: Typecheck
run: bunx tsc
8 changes: 5 additions & 3 deletions .github/workflows/main-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,19 @@ jobs:
- name: Checkout code
uses: actions/checkout@v6

- name: Install system dependencies
run: apt-get update && apt-get install -y unzip make
- name: Install unzip (needed by setup-bun)
run: apt-get update && apt-get install -y unzip

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version-file: .tool-versions

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Run Build
run: make
run: bun run build

- name: Run tests
run: bunx vitest run
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/publish-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version-file: .tool-versions

- name: Setup Node.js
uses: actions/setup-node@v6
Expand All @@ -26,7 +28,7 @@ jobs:
run: bun install --frozen-lockfile

- name: Build all packages
run: make
run: bun run build

- name: Check package contents
run: |
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ jobs:

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version-file: .tool-versions

- name: Setup Node.js
uses: actions/setup-node@v6
Expand Down Expand Up @@ -79,6 +81,8 @@ jobs:

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version-file: .tool-versions

- name: Setup Node.js
uses: actions/setup-node@v6
Expand Down Expand Up @@ -109,10 +113,7 @@ jobs:
fi

- name: Build all packages
run: make

- name: Run tests
run: make test-headless
run: bun run build

- name: Publish packages
# npm generates provenance attestations automatically during trusted
Expand Down
36 changes: 0 additions & 36 deletions .github/workflows/saucelabs.yaml

This file was deleted.

8 changes: 5 additions & 3 deletions .github/workflows/test-headless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,19 @@ jobs:
- name: Checkout code
uses: actions/checkout@v6

- name: Install system dependencies
run: apt-get update && apt-get install -y unzip make
- name: Install unzip (needed by setup-bun)
run: apt-get update && apt-get install -y unzip

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version-file: .tool-versions

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Run Build
run: make
run: bun run build

- name: Run Tests
run: bunx vitest run
Expand Down
39 changes: 17 additions & 22 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@ License: MIT

## Project Structure

Lerna monorepo with npm workspaces. Current version: see `lerna.json`.
Monorepo with Bun workspaces.

```
```text
packages/ # 26 modular @tko/* packages (all TypeScript)
builds/ # 2 bundled distributions (knockout, reference)
tools/ # Shared build config (build.mk, repackage.mjs)
tools/ # Shared build script (build.ts)
tko.io/ # Documentation site (Astro + Starlight, deployed to GitHub Pages)
Makefile # Top-level build orchestrator
```

Key packages: `@tko/observable`, `@tko/computed`, `@tko/bind`,
Expand All @@ -33,25 +32,22 @@ Builds: `@tko/build.knockout` (backwards-compatible) and

## Build Commands

All builds use Make + esbuild. Run from the repo root:
All commands use Bun. Run from the repo root:

```bash
bun install # Install all dependencies (uses Bun workspaces)
make # Build all packages (ESM, CommonJS, MJS)
make test # Run all tests (Vitest, headless Chromium via Playwright)
bunx vitest run # Same as make test, directly
make eslint # Run ESLint
make eslint-fix # Run ESLint with auto-fix
make format # Check Prettier formatting
make format-fix # Fix Prettier formatting
make tsc # TypeScript type-check (no emit)
make dts # Generate TypeScript declaration files
make sweep # Clean dist/ and coverage/ dirs
make clean # Full clean (node_modules, lockfiles, dist)
bun run build # Build all packages (ESM, CommonJS, MJS, browser)
bun run test # Run all tests (Vitest, headless Chromium via Playwright)
bun run lint # Run ESLint
bun run lint:fix # Run ESLint with auto-fix
bun run format # Check Prettier formatting
bun run format:fix # Fix Prettier formatting
bun run tsc # TypeScript type-check (no emit)
bun run dts # Generate TypeScript declaration files
bun run clean # Clean dist/ and coverage/ dirs
```

Individual packages can be built/tested from their directory with the same
Make targets (they include `tools/build.mk`).
Individual packages can be built from their directory with `bun run build`.

## Testing

Expand All @@ -68,10 +64,10 @@ because TKO does low-level DOM manipulation, MutationObserver, and event handlin

- **Formatter**: Prettier — no semicolons, single quotes, trailing commas: none, 120 char width
- **Linter**: ESLint with typescript-eslint (flat config)
- **Editor**: 2-space indentation for JS/TS, tabs for Makefiles, LF line endings
- **Editor**: 2-space indentation for JS/TS, LF line endings
- See `.prettierrc` and `eslint.config.js` for full config

Run `make format-fix && make eslint-fix` before committing.
Run `bun run format:fix && bun run lint:fix` before committing.

## TypeScript

Expand All @@ -93,7 +89,6 @@ packages/example/
helpers/ # Test helpers (if any)
index.ts # Entry point
package.json # Package metadata
Makefile # Includes ../../tools/build.mk
```

Inter-package dependencies use `@tko/package-name` and are resolved via
Expand Down Expand Up @@ -176,7 +171,7 @@ When validating `tko.io` documentation changes with the local docs site:

## Important Guidelines

- Do not modify `tools/build.mk` or `vitest.config.ts` without understanding
- Do not modify `tools/build.ts` or `vitest.config.ts` without understanding
the full impact — they are shared across all 25+ packages.
- Do not add runtime dependencies to core packages. TKO is zero-dependency.
- The `builds/` packages bundle everything into a single distributable.
Expand Down
87 changes: 0 additions & 87 deletions Makefile

This file was deleted.

8 changes: 0 additions & 8 deletions builds/knockout/Makefile

This file was deleted.

Loading
Loading