fix(tests): Update test runner and imports, refresh README and package metadata, add project tooling/config files
This commit is contained in:
BIN
.serena/cache/typescript/document_symbols_cache_v23-06-25.pkl
vendored
Normal file
BIN
.serena/cache/typescript/document_symbols_cache_v23-06-25.pkl
vendored
Normal file
Binary file not shown.
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
|
68
.serena/project.yml
Normal file
68
.serena/project.yml
Normal file
@@ -0,0 +1,68 @@
|
||||
# language of the project (csharp, python, rust, java, typescript, go, cpp, or ruby)
|
||||
# * For C, use cpp
|
||||
# * For JavaScript, use typescript
|
||||
# Special requirements:
|
||||
# * csharp: Requires the presence of a .sln file in the project folder.
|
||||
language: typescript
|
||||
|
||||
# whether to use the project's gitignore file to ignore files
|
||||
# Added on 2025-04-07
|
||||
ignore_all_files_in_gitignore: true
|
||||
# list of additional paths to ignore
|
||||
# same syntax as gitignore, so you can use * and **
|
||||
# Was previously called `ignored_dirs`, please update your config if you are using that.
|
||||
# Added (renamed) on 2025-04-07
|
||||
ignored_paths: []
|
||||
|
||||
# whether the project is in read-only mode
|
||||
# If set to true, all editing tools will be disabled and attempts to use them will result in an error
|
||||
# Added on 2025-04-18
|
||||
read_only: false
|
||||
|
||||
|
||||
# list of tool names to exclude. We recommend not excluding any tools, see the readme for more details.
|
||||
# Below is the complete list of tools for convenience.
|
||||
# To make sure you have the latest list of tools, and to view their descriptions,
|
||||
# execute `uv run scripts/print_tool_overview.py`.
|
||||
#
|
||||
# * `activate_project`: Activates a project by name.
|
||||
# * `check_onboarding_performed`: Checks whether project onboarding was already performed.
|
||||
# * `create_text_file`: Creates/overwrites a file in the project directory.
|
||||
# * `delete_lines`: Deletes a range of lines within a file.
|
||||
# * `delete_memory`: Deletes a memory from Serena's project-specific memory store.
|
||||
# * `execute_shell_command`: Executes a shell command.
|
||||
# * `find_referencing_code_snippets`: Finds code snippets in which the symbol at the given location is referenced.
|
||||
# * `find_referencing_symbols`: Finds symbols that reference the symbol at the given location (optionally filtered by type).
|
||||
# * `find_symbol`: Performs a global (or local) search for symbols with/containing a given name/substring (optionally filtered by type).
|
||||
# * `get_current_config`: Prints the current configuration of the agent, including the active and available projects, tools, contexts, and modes.
|
||||
# * `get_symbols_overview`: Gets an overview of the top-level symbols defined in a given file.
|
||||
# * `initial_instructions`: Gets the initial instructions for the current project.
|
||||
# Should only be used in settings where the system prompt cannot be set,
|
||||
# e.g. in clients you have no control over, like Claude Desktop.
|
||||
# * `insert_after_symbol`: Inserts content after the end of the definition of a given symbol.
|
||||
# * `insert_at_line`: Inserts content at a given line in a file.
|
||||
# * `insert_before_symbol`: Inserts content before the beginning of the definition of a given symbol.
|
||||
# * `list_dir`: Lists files and directories in the given directory (optionally with recursion).
|
||||
# * `list_memories`: Lists memories in Serena's project-specific memory store.
|
||||
# * `onboarding`: Performs onboarding (identifying the project structure and essential tasks, e.g. for testing or building).
|
||||
# * `prepare_for_new_conversation`: Provides instructions for preparing for a new conversation (in order to continue with the necessary context).
|
||||
# * `read_file`: Reads a file within the project directory.
|
||||
# * `read_memory`: Reads the memory with the given name from Serena's project-specific memory store.
|
||||
# * `remove_project`: Removes a project from the Serena configuration.
|
||||
# * `replace_lines`: Replaces a range of lines within a file with new content.
|
||||
# * `replace_symbol_body`: Replaces the full definition of a symbol.
|
||||
# * `restart_language_server`: Restarts the language server, may be necessary when edits not through Serena happen.
|
||||
# * `search_for_pattern`: Performs a search for a pattern in the project.
|
||||
# * `summarize_changes`: Provides instructions for summarizing the changes made to the codebase.
|
||||
# * `switch_modes`: Activates modes by providing a list of their names
|
||||
# * `think_about_collected_information`: Thinking tool for pondering the completeness of collected information.
|
||||
# * `think_about_task_adherence`: Thinking tool for determining whether the agent is still on track with the current task.
|
||||
# * `think_about_whether_you_are_done`: Thinking tool for determining whether the task is truly completed.
|
||||
# * `write_memory`: Writes a named memory (for future reference) to Serena's project-specific memory store.
|
||||
excluded_tools: []
|
||||
|
||||
# initial prompt for the project. It will always be given to the LLM upon activating the project
|
||||
# (contrary to the memories, which are loaded on demand).
|
||||
initial_prompt: ""
|
||||
|
||||
project_name: "taskbuffer"
|
Reference in New Issue
Block a user