feat(ts_web): support TC39 accessor decorators for web components; bump dependencies and devDependencies; rename browser tests to .chromium.ts; move LICENSE to license.md and update readme

This commit is contained in:
2026-01-29 15:13:34 +00:00
parent 1dd7ca46ff
commit a0abcdda90
12 changed files with 2012 additions and 2755 deletions

View File

@@ -1,5 +1,14 @@
# Changelog # Changelog
## 2026-01-29 - 4.2.0 - feat(ts_web)
support TC39 'accessor' decorators for web components; bump dependencies and devDependencies; rename browser tests to .chromium.ts; move LICENSE to license.md and update readme
- Convert web component class fields to use the TC39 'accessor' keyword in ts_web/taskbuffer-dashboard.ts to be compatible with @design.estate/dees-element v2.1.6
- Bump @design.estate/dees-element to ^2.1.6 and update devDependencies (@git.zone/tsbuild, @git.zone/tsbundle, @git.zone/tsrun, @git.zone/tstest, @types/node) to newer versions
- Replace test/test.10.webcomponent.browser.ts with test/test.10.webcomponent.chromium.ts and update testing guidance in readme.hints.md to prefer .chromium.ts
- Move LICENSE file content to license.md and update readme.md to reference the new license file
- Small test cleanups: remove obsolete tslint:disable comments
## 2026-01-26 - 4.1.1 - fix(ts_web) ## 2026-01-26 - 4.1.1 - fix(ts_web)
fix web dashboard typings and update generated commit info fix web dashboard typings and update generated commit info

View File

View File

@@ -27,14 +27,14 @@
"debounced tasks", "debounced tasks",
"distributed coordination" "distributed coordination"
], ],
"author": "Lossless GmbH", "author": "Task Venture Capital GmbH <hello@task.vc>",
"license": "MIT", "license": "MIT",
"bugs": { "bugs": {
"url": "https://code.foss.global/push.rocks/taskbuffer/issues" "url": "https://code.foss.global/push.rocks/taskbuffer/issues"
}, },
"homepage": "https://code.foss.global/push.rocks/taskbuffer#readme", "homepage": "https://code.foss.global/push.rocks/taskbuffer#readme",
"dependencies": { "dependencies": {
"@design.estate/dees-element": "^2.1.3", "@design.estate/dees-element": "^2.1.6",
"@push.rocks/lik": "^6.2.2", "@push.rocks/lik": "^6.2.2",
"@push.rocks/smartdelay": "^3.0.5", "@push.rocks/smartdelay": "^3.0.5",
"@push.rocks/smartlog": "^3.1.10", "@push.rocks/smartlog": "^3.1.10",
@@ -44,11 +44,11 @@
"@push.rocks/smartunique": "^3.0.9" "@push.rocks/smartunique": "^3.0.9"
}, },
"devDependencies": { "devDependencies": {
"@git.zone/tsbuild": "^3.1.2", "@git.zone/tsbuild": "^4.1.2",
"@git.zone/tsbundle": "^2.6.3", "@git.zone/tsbundle": "^2.8.3",
"@git.zone/tsrun": "^2.0.0", "@git.zone/tsrun": "^2.0.1",
"@git.zone/tstest": "^3.1.3", "@git.zone/tstest": "^3.1.8",
"@types/node": "^24.10.1" "@types/node": "^25.1.0"
}, },
"files": [ "files": [
"ts/**/*", "ts/**/*",

4695
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -36,7 +36,34 @@
## Project Structure ## Project Structure
- Source in `ts/`, web components in `ts_web/` - Source in `ts/`, web components in `ts_web/`
- Tests in `test/` - naming: `*.node.ts`, `*.browser.ts`, `*.both.ts` - Tests in `test/` - naming: `*.node.ts`, `*.chromium.ts` (preferred), `*.both.ts`
- Note: `*.browser.ts` is deprecated, use `*.chromium.ts` for browser tests
- Logger: `ts/taskbuffer.logging.ts` exports `logger` (ConsoleLog from smartlog) - Logger: `ts/taskbuffer.logging.ts` exports `logger` (ConsoleLog from smartlog)
- Build: `pnpm build` (tsbuild tsfolders) - Build: `pnpm build` (tsbuild tsfolders)
- Test: `pnpm test` or `tstest test/test.XX.name.ts --verbose` - Test: `pnpm test` or `tstest test/test.XX.name.ts --verbose`
## Web Components (ts_web/)
- Uses `@design.estate/dees-element` with TC39 decorators
- Decorators require the `accessor` keyword:
```typescript
@property({ type: String })
accessor myProp = 'default';
@state()
accessor count = 0;
```
## Dependencies (as of v4.1.1)
- `@design.estate/dees-element` ^2.1.6 - TC39 decorators with `accessor` keyword
- `@push.rocks/lik` ^6.2.2 - Data structures
- `@push.rocks/smartdelay` ^3.0.5 - Delay utilities
- `@push.rocks/smartlog` ^3.1.10 - Logging
- `@push.rocks/smartpromise` ^4.2.3 - Promise utilities
- `@push.rocks/smartrx` ^3.0.10 - RxJS wrapper
- `@push.rocks/smarttime` ^4.1.1 - Time/cron utilities
- `@push.rocks/smartunique` ^3.0.9 - Unique ID generation
- `@git.zone/tsbuild` ^4.1.2 - Build tool
- `@git.zone/tsbundle` ^2.8.3 - Bundler (for browser tests)
- `@git.zone/tsrun` ^2.0.1 - TypeScript runner
- `@git.zone/tstest` ^3.1.8 - Test runner (supports `.chromium.ts` files)
- `@types/node` ^25.1.0 - Node.js type definitions

View File

@@ -737,7 +737,7 @@ import type {
## License and Legal Information ## License and Legal Information
This repository contains open-source code licensed under the MIT License. A copy of the license can be found in the [LICENSE](./LICENSE) file. This repository contains open-source code licensed under the MIT License. A copy of the license can be found in the [license.md](./license.md) file.
**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file. **Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.

View File

@@ -36,12 +36,9 @@ tap.test('expect run tasks in sequence', async () => {
}); });
const testPromise = testTaskchain.trigger(); const testPromise = testTaskchain.trigger();
await smartdelay.delayFor(2100); await smartdelay.delayFor(2100);
// tslint:disable-next-line:no-unused-expression
expect(task1Executed).toBeTrue(); expect(task1Executed).toBeTrue();
// tslint:disable-next-line:no-unused-expression
expect(task2Executed).toBeFalse(); expect(task2Executed).toBeFalse();
await smartdelay.delayFor(2100); await smartdelay.delayFor(2100);
// tslint:disable-next-line:no-unused-expression
expect(task2Executed).toBeTrue(); expect(task2Executed).toBeTrue();
await testPromise; await testPromise;
}); });

View File

@@ -33,7 +33,6 @@ tap.test('should run the task as expected', async () => {
); );
myTaskManager.start(); myTaskManager.start();
await myTaskManager.triggerTaskByName('myTask'); await myTaskManager.triggerTaskByName('myTask');
// tslint:disable-next-line:no-unused-expression
expect(referenceBoolean).toBeTrue(); expect(referenceBoolean).toBeTrue();
}); });

View File

@@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@push.rocks/taskbuffer', name: '@push.rocks/taskbuffer',
version: '4.1.1', version: '4.2.0',
description: 'A flexible task management library supporting TypeScript, allowing for task buffering, scheduling, and execution with dependency management.' description: 'A flexible task management library supporting TypeScript, allowing for task buffering, scheduling, and execution with dependency management.'
} }

View File

@@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@push.rocks/taskbuffer', name: '@push.rocks/taskbuffer',
version: '4.1.1', version: '4.2.0',
description: 'A flexible task management library supporting TypeScript, allowing for task buffering, scheduling, and execution with dependency management.' description: 'A flexible task management library supporting TypeScript, allowing for task buffering, scheduling, and execution with dependency management.'
} }

View File

@@ -8,20 +8,20 @@ import type { TaskManager, ITaskMetadata, IScheduledTaskInfo } from '../ts/index
export class TaskbufferDashboard extends DeesElement { export class TaskbufferDashboard extends DeesElement {
// Properties // Properties
@property({ type: Object }) @property({ type: Object })
public taskManager: TaskManager | null = null; accessor taskManager: TaskManager | null = null;
@property({ type: Number }) @property({ type: Number })
public refreshInterval: number = 1000; // milliseconds accessor refreshInterval: number = 1000; // milliseconds
// Internal state // Internal state
@state() @state()
private tasks: ITaskMetadata[] = []; accessor tasks: ITaskMetadata[] = [];
@state() @state()
private scheduledTasks: IScheduledTaskInfo[] = []; accessor scheduledTasks: IScheduledTaskInfo[] = [];
@state() @state()
private isRunning: boolean = false; accessor isRunning: boolean = false;
private refreshTimer: any; private refreshTimer: any;