fix(tests): Update test runner and imports, refresh README and package metadata, add project tooling/config files
This commit is contained in:
35
.serena/memories/code_style_conventions.md
Normal file
35
.serena/memories/code_style_conventions.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# Code Style and Conventions for TaskBuffer
|
||||
|
||||
## File Structure
|
||||
- Source code in `ts/` directory
|
||||
- Tests in `test/` directory
|
||||
- Compiled output in `dist_ts/`
|
||||
- All filenames must be lowercase
|
||||
|
||||
## Naming Conventions
|
||||
- **Interfaces**: Prefix with `I` (e.g., `ITaskFunction`)
|
||||
- **Types**: Prefix with `T` (e.g., `TPreOrAfterTaskFunction`)
|
||||
- **Classes**: PascalCase (e.g., `TaskManager`)
|
||||
- **Files**: `taskbuffer.classes.{classname}.ts` pattern
|
||||
- **Test files**: `test.{number}.{feature}.ts` pattern
|
||||
|
||||
## TypeScript Conventions
|
||||
- Use ES modules (import/export)
|
||||
- Avoid ENums when possible
|
||||
- Import dependencies through `plugins.ts`
|
||||
- Reference with full path: `plugins.myModule.myClass()`
|
||||
- Use async/await patterns consistently
|
||||
- Strong typing throughout
|
||||
|
||||
## Testing Conventions
|
||||
- Import expect from `@git.zone/tstest/tapbundle`
|
||||
- Test files end with `export default tap.start()`
|
||||
- Use descriptive test names with tap.test()
|
||||
- Test both browser and node when applicable
|
||||
|
||||
## Code Quality
|
||||
- Make focused, goal-oriented changes
|
||||
- Preserve necessary complexity
|
||||
- Keep code elegant and maintainable
|
||||
- No inline documentation unless requested
|
||||
- Complete implementations only (no partial work)
|
27
.serena/memories/project_overview.md
Normal file
27
.serena/memories/project_overview.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# TaskBuffer Project Overview
|
||||
|
||||
## Purpose
|
||||
@push.rocks/taskbuffer is a powerful TypeScript-first task management library for orchestrating asynchronous operations. It provides flexible task execution patterns including buffered execution, task chains, parallel execution, scheduling, debouncing, and one-time execution.
|
||||
|
||||
## Tech Stack
|
||||
- **Language**: TypeScript (ES modules)
|
||||
- **Runtime**: Node.js
|
||||
- **Build Tool**: tsbuild, tsbundle
|
||||
- **Test Framework**: @git.zone/tstest (tapbundle)
|
||||
- **Package Manager**: pnpm
|
||||
- **Module System**: ES modules (type: "module")
|
||||
|
||||
## Key Features
|
||||
- Task: Basic unit of work with async function wrapping
|
||||
- Taskchain: Sequential task execution with result passing
|
||||
- Taskparallel: Parallel task execution
|
||||
- TaskManager: Cron-based task scheduling
|
||||
- TaskDebounced: Debounced execution pattern
|
||||
- TaskOnce: Singleton execution pattern
|
||||
- TaskRunner: Distributed task execution
|
||||
- BufferRunner: Smart concurrent execution control
|
||||
|
||||
## Main Entry Points
|
||||
- Main export: `ts/index.ts`
|
||||
- Compiled output: `dist_ts/index.js`
|
||||
- All classes exported from index for clean API
|
67
.serena/memories/suggested_commands.md
Normal file
67
.serena/memories/suggested_commands.md
Normal file
@@ -0,0 +1,67 @@
|
||||
# Suggested Commands for TaskBuffer Development
|
||||
|
||||
## Build and Test Commands
|
||||
```bash
|
||||
# Build the project
|
||||
pnpm run build
|
||||
|
||||
# Run tests
|
||||
pnpm test
|
||||
|
||||
# Type checking
|
||||
tsbuild check test/**/* --skiplibcheck
|
||||
|
||||
# Build documentation
|
||||
pnpm run buildDocs
|
||||
```
|
||||
|
||||
## Development Workflow
|
||||
```bash
|
||||
# Install dependencies
|
||||
pnpm install
|
||||
|
||||
# Add development dependency
|
||||
pnpm install --save-dev <package>
|
||||
|
||||
# Add production dependency
|
||||
pnpm add <package>
|
||||
|
||||
# Run specific test
|
||||
tstest test/test.some.ts --verbose
|
||||
|
||||
# Run tests with logging
|
||||
tstest test/test.some.ts --logfile
|
||||
```
|
||||
|
||||
## Git Commands
|
||||
```bash
|
||||
# View status
|
||||
git status
|
||||
|
||||
# Stage changes
|
||||
git add .
|
||||
|
||||
# Commit with message
|
||||
git commit -m "message"
|
||||
|
||||
# Use git mv for file operations to preserve history
|
||||
git mv oldfile newfile
|
||||
```
|
||||
|
||||
## System Commands (Linux)
|
||||
```bash
|
||||
# List files
|
||||
ls -la
|
||||
|
||||
# Find files
|
||||
find . -name "*.ts"
|
||||
|
||||
# Search in files
|
||||
rg "pattern" # Use ripgrep instead of grep
|
||||
|
||||
# View file
|
||||
cat filename
|
||||
|
||||
# Create directory
|
||||
mkdir -p path/to/dir
|
||||
```
|
37
.serena/memories/task_completion_checklist.md
Normal file
37
.serena/memories/task_completion_checklist.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# Task Completion Checklist for TaskBuffer
|
||||
|
||||
## Before Marking Any Task Complete
|
||||
|
||||
### 1. Code Quality Checks
|
||||
- [ ] Run build to ensure TypeScript compiles: `pnpm run build`
|
||||
- [ ] Run tests to ensure nothing breaks: `pnpm test`
|
||||
- [ ] Type check test files: `tsbuild check test/**/* --skiplibcheck`
|
||||
|
||||
### 2. Code Review
|
||||
- [ ] All changes are focused and purposeful
|
||||
- [ ] No unnecessary modifications made
|
||||
- [ ] Code follows project naming conventions
|
||||
- [ ] Imports use the plugins.ts pattern where applicable
|
||||
- [ ] All async operations use proper async/await
|
||||
|
||||
### 3. Testing
|
||||
- [ ] New features have corresponding tests
|
||||
- [ ] Existing tests still pass
|
||||
- [ ] Test files end with `export default tap.start()`
|
||||
- [ ] Tests use proper expect from tapbundle
|
||||
|
||||
### 4. Documentation
|
||||
- [ ] readme.md updated if new features added
|
||||
- [ ] Code is self-explanatory (no comments unless requested)
|
||||
- [ ] API changes documented
|
||||
|
||||
### 5. Git Hygiene
|
||||
- [ ] Changes are staged appropriately
|
||||
- [ ] Commit message is clear and focused
|
||||
- [ ] NO commits made without explicit user approval
|
||||
|
||||
## Common Issues to Check
|
||||
- No uppercase filenames
|
||||
- No direct npm usage (use pnpm)
|
||||
- No guessing APIs (always check documentation)
|
||||
- No partial implementations
|
Reference in New Issue
Block a user