@repokit/core 5.0.0 → 5.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -281,7 +281,7 @@ export const Kit = new RepoKitConfig({
281
281
  });
282
282
  ```
283
283
 
284
- All properties on the `RepoKitTheme.colors` are optional overrides for `RepoKit`'s default styling. A color can be any CSS-valid `rgb()` string.
284
+ All properties on the `RepoKitTheme.colors` are optional overrides for `RepoKit`'s default styling. A color can be any valid `rgb()` string.
285
285
 
286
286
  <img src="media/seeing-red.webp" width="100%" alt="seeing red theme" />
287
287
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@repokit/core",
3
- "version": "5.0.0",
3
+ "version": "5.0.2",
4
4
  "description": "A knowledgebase for your repository - wrapped in a CLI",
5
5
  "keywords": [
6
6
  "cli",
@@ -43,7 +43,6 @@
43
43
  "watch:ts": "tsx devserver/run.ts -w"
44
44
  },
45
45
  "dependencies": {
46
- "@figliolia/event-emitter": "^1.2.0",
47
46
  "@swc/core": "^1.15.18",
48
47
  "ts-node": "^10.9.2"
49
48
  },
@@ -1,24 +0,0 @@
1
- import { AutoIncrementingID } from "@figliolia/event-emitter";
2
-
3
- import type { AsyncTask } from "./types";
4
-
5
- export class ConcurrencyPool<T> {
6
- private readonly IDs = new AutoIncrementingID();
7
- private readonly activeTasks = new Map<string, Promise<T>>();
8
- constructor(public readonly maxConcurrency = 10) {}
9
-
10
- public async enqueue(task: AsyncTask<T>) {
11
- if (this.activeTasks.size === this.maxConcurrency) {
12
- await Promise.race(Array.from(this.activeTasks.values()));
13
- }
14
- return this.executeTask(task);
15
- }
16
-
17
- private executeTask(task: AsyncTask<T>) {
18
- const ID = this.IDs.get();
19
- const promise = task();
20
- this.activeTasks.set(ID, promise);
21
- void promise.finally(() => this.activeTasks.delete(ID));
22
- return promise;
23
- }
24
- }