Skip to content
Open
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
c294635
Add coverage workflow for web and react packages
kasumi-1 Oct 8, 2025
62d6698
Add comprehensive testing infrastructure and TypeScript improvements
kasumi-1 Oct 8, 2025
50caf62
Add comprehensive test suite for React package
kasumi-1 Oct 8, 2025
5b6e957
Increase web package test coverage with additional test suites
kasumi-1 Oct 8, 2025
f1652c7
Add ESLint configuration for code quality
kasumi-1 Oct 8, 2025
9bc8eb3
Fix coverage workflow to work with both packages
kasumi-1 Oct 8, 2025
27c7637
Remove dead code and console.logs from React package
kasumi-1 Oct 8, 2025
6779304
Add comprehensive CONTRIBUTING.md guide
kasumi-1 Oct 8, 2025
42404b7
Add CHANGELOG.md for tracking project changes
kasumi-1 Oct 8, 2025
eea71a4
Add Dependabot configuration for automated dependency updates
kasumi-1 Oct 8, 2025
b664dae
Add comprehensive test suite for React package (49 tests, 98.67% cove…
kasumi-1 Oct 9, 2025
4b2775e
Add comprehensive model tests (100% coverage for models/)
kasumi-1 Oct 9, 2025
877234d
Rewrite README for TypeScript fork
kasumi-1 Oct 9, 2025
6b6c967
Increase web package test coverage to 71.34%
kasumi-1 Oct 9, 2025
d100257
Add Playwright for browser integration testing
kasumi-1 Oct 9, 2025
e41ed09
Fix build script for macOS and update e2e test configuration
kasumi-1 Oct 9, 2025
314e104
Add COOP/COEP headers and fix bundle serving for e2e tests
kasumi-1 Oct 9, 2025
f762f75
E2E test infrastructure complete - 16/28 tests passing
kasumi-1 Oct 9, 2025
79ce1f1
Fix e2e tests by adding baseAssetPath to all VAD instantiations
kasumi-1 Oct 9, 2025
44e33dd
Rename packages from @ricky0123 to @semperai scope
kasumi-1 Oct 9, 2025
11d8a00
Update README with new @semperai package names
kasumi-1 Oct 9, 2025
8a79ec1
Update examples to use @semperai packages
kasumi-1 Oct 9, 2025
f26590a
Update test-site to use @semperai packages
kasumi-1 Oct 9, 2025
efd4625
Update documentation to use @semperai packages
kasumi-1 Oct 9, 2025
c267b1a
Update CONTRIBUTING.md and README with npm badges
kasumi-1 Oct 9, 2025
50377bb
Update source imports to use @semperai packages
kasumi-1 Oct 9, 2025
7f6bdec
Fix React package imports to use @semperai scope
kasumi-1 Oct 9, 2025
f35d703
Update package-lock.json with new @semperai package names
kasumi-1 Oct 9, 2025
e8ae84f
Fix CI coverage workflow to build packages before testing
kasumi-1 Oct 9, 2025
c7135dc
Remove workspace package-lock.json files and ignore them
kasumi-1 Oct 9, 2025
e4ad838
Address CodeRabbit PR review feedback
kasumi-1 Oct 9, 2025
71816df
Fix formatting and TypeScript type errors
kasumi-1 Oct 9, 2025
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
9 changes: 9 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
node_modules
dist
coverage
*.min.js
*.config.js
webpack.config.js
jest.config.js
test-site/dist
examples/**/dist
54 changes: 54 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": ["@typescript-eslint"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"rules": {
"@typescript-eslint/no-unused-vars": [
"error",
{
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}
],
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-misused-promises": "error",
"no-console": ["warn", { "allow": ["warn", "error"] }],
"prefer-const": "error",
"no-var": "error"
},
"ignorePatterns": [
"dist",
"node_modules",
"*.js",
"*.config.js",
"webpack.config.js",
"jest.config.js",
"coverage",
"*.min.js"
],
"overrides": [
{
"files": ["**/*.spec.ts", "**/*.test.ts", "**/tests/**/*.ts"],
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-return": "off",
"no-console": "off"
}
}
]
}
106 changes: 106 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
version: 2
updates:
# Enable version updates for npm
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
open-pull-requests-limit: 5
reviewers:
- "ricky0123"
labels:
- "dependencies"
- "automated"
commit-message:
prefix: "chore(deps)"
include: "scope"
# Group all non-major updates together
groups:
development-dependencies:
dependency-type: "development"
update-types:
- "minor"
- "patch"
production-dependencies:
dependency-type: "production"
update-types:
- "minor"
- "patch"

# Enable version updates for npm in packages/web
- package-ecosystem: "npm"
directory: "/packages/web"
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
open-pull-requests-limit: 5
reviewers:
- "ricky0123"
labels:
- "dependencies"
- "vad-web"
- "automated"
commit-message:
prefix: "chore(deps)"
include: "scope"
groups:
development-dependencies:
dependency-type: "development"
update-types:
- "minor"
- "patch"
production-dependencies:
dependency-type: "production"
update-types:
- "minor"
- "patch"

# Enable version updates for npm in packages/react
- package-ecosystem: "npm"
directory: "/packages/react"
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
open-pull-requests-limit: 5
reviewers:
- "ricky0123"
labels:
- "dependencies"
- "vad-react"
- "automated"
commit-message:
prefix: "chore(deps)"
include: "scope"
groups:
development-dependencies:
dependency-type: "development"
update-types:
- "minor"
- "patch"
production-dependencies:
dependency-type: "production"
update-types:
- "minor"
- "patch"

# Enable version updates for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "09:00"
open-pull-requests-limit: 3
reviewers:
- "ricky0123"
labels:
- "dependencies"
- "github-actions"
- "automated"
commit-message:
prefix: "chore(ci)"
include: "scope"
71 changes: 71 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Coverage

on:
push:
pull_request:
workflow_dispatch:

jobs:
coverage:
runs-on: ubuntu-latest
strategy:
matrix:
package: [packages/web, packages/react]

steps:
- name: Checkout code
uses: actions/checkout@v5

- name: Setup Node.js
uses: actions/setup-node@v5
with:
node-version: '22'

- name: Install dependencies
run: npm ci

- name: Run coverage
run: cd ${{ matrix.package }} && npm run test:coverage
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Quote shell variables to prevent word splitting.

The ${{ matrix.package }} variable should be quoted in shell commands to prevent potential word splitting and globbing issues.

Apply this diff:

       - name: Run coverage
-        run: cd ${{ matrix.package }} && npm run test:coverage
+        run: cd "${{ matrix.package }}" && npm run test:coverage

As per static analysis hints (actionlint/shellcheck).

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
run: cd ${{ matrix.package }} && npm run test:coverage
- name: Run coverage
run: cd "${{ matrix.package }}" && npm run test:coverage
🤖 Prompt for AI Agents
In .github/workflows/coverage.yml around line 28, the shell command uses an
unquoted matrix variable which can lead to word splitting or globbing; update
the run step to quote the variable (use "${{ matrix.package }}" in the cd
command) so the path is treated as a single argument and any special characters
are not expanded by the shell.


- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: (!cancelled())
with:
files: |
${{ matrix.package }}/test-results/**/*.xml
${{ matrix.package }}/test-results/**/*.trx
${{ matrix.package }}/test-results/**/*.json
check_name: Test Results (${{ matrix.package }})
continue-on-error: true

- name: Determine lcov path
id: lcov-path
run: |
if [ -f "${{ matrix.package }}/lcov.info" ]; then
echo "path=${{ matrix.package }}/lcov.info" >> $GITHUB_OUTPUT
elif [ -f "${{ matrix.package }}/coverage/lcov.info" ]; then
echo "path=${{ matrix.package }}/coverage/lcov.info" >> $GITHUB_OUTPUT
else
echo "path=${{ matrix.package }}/lcov.info" >> $GITHUB_OUTPUT
fi

- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: ${{ matrix.package }}
parallel: true
file: ${{ steps.lcov-path.outputs.path }}
continue-on-error: true

finish:
needs: coverage
if: always()
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
carryforward: true
58 changes: 58 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added
- Comprehensive test suite for React package with 14 tests covering useMicVAD hook
- Additional test coverage for web package (messages, asset-path, model fetcher, real-time VAD)
- ESLint configuration with TypeScript support for code quality enforcement
- CONTRIBUTING.md with detailed development guidelines
- CHANGELOG.md for tracking project changes
- Coverage workflow for both web and react packages in CI
- Performance tracking utilities (VADPerformanceTracker, PerformanceTimer)
- Validation utilities for browser compatibility and audio constraints
- Configurable logging system with log levels
- Test infrastructure using vitest with coverage reporting

### Changed
- Updated test:coverage script to run for all workspaces
- Improved React hook to properly handle device changes
- Updated ESLint and TypeScript configurations for stricter type checking

### Removed
- Dead code and commented-out functions from React package
- Console.log statements from React package for cleaner production code

### Fixed
- Coverage workflow now properly tests both packages
- React package properly recreates VAD instance when getStream changes

## [0.0.28] - 2024-XX-XX

### Added
- Export new public APIs for validation, logging, and performance tracking
- TypeScript improvements with stricter type checking
- Exported `ort` from real-time-vad for advanced usage

### Fixed
- Start on load mic permissions handling

## [0.0.27] - Earlier

Previous versions tracked in git history. See https://github.com/ricky0123/vad for details.

---

## Types of Changes

- **Added** for new features
- **Changed** for changes in existing functionality
- **Deprecated** for soon-to-be removed features
- **Removed** for now removed features
- **Fixed** for any bug fixes
- **Security** in case of vulnerabilities
Loading
Loading