@guanghechen/task 1.0.5 → 2.0.0

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 ADDED
@@ -0,0 +1,71 @@
1
+ <header>
2
+ <h1 align="center">
3
+ <a href="https://github.com/guanghechen/sora/tree/@guanghechen/task@2.0.0/packages/task#readme">@guanghechen/task</a>
4
+ </h1>
5
+ <div align="center">
6
+ <a href="https://www.npmjs.com/package/@guanghechen/task">
7
+ <img
8
+ alt="Npm Version"
9
+ src="https://img.shields.io/npm/v/@guanghechen/task.svg"
10
+ />
11
+ </a>
12
+ <a href="https://www.npmjs.com/package/@guanghechen/task">
13
+ <img
14
+ alt="Npm Download"
15
+ src="https://img.shields.io/npm/dm/@guanghechen/task.svg"
16
+ />
17
+ </a>
18
+ <a href="https://www.npmjs.com/package/@guanghechen/task">
19
+ <img
20
+ alt="Npm License"
21
+ src="https://img.shields.io/npm/l/@guanghechen/task.svg"
22
+ />
23
+ </a>
24
+ <a href="#install">
25
+ <img
26
+ alt="Module Formats: cjs, esm"
27
+ src="https://img.shields.io/badge/module_formats-cjs%2C%20esm-green.svg"
28
+ />
29
+ </a>
30
+ <a href="https://github.com/nodejs/node">
31
+ <img
32
+ alt="Node.js Version"
33
+ src="https://img.shields.io/node/v/@guanghechen/task"
34
+ />
35
+ </a>
36
+ <a href="https://github.com/facebook/jest">
37
+ <img
38
+ alt="Tested with Jest"
39
+ src="https://img.shields.io/badge/tested_with-jest-9c465e.svg"
40
+ />
41
+ </a>
42
+ <a href="https://github.com/prettier/prettier">
43
+ <img
44
+ alt="Code Style: prettier"
45
+ src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square"
46
+ />
47
+ </a>
48
+ </div>
49
+ </header>
50
+ <br/>
51
+
52
+ Atomic and resumable tasks implementation with observable status tracking.
53
+
54
+ ## Install
55
+
56
+ - npm
57
+
58
+ ```bash
59
+ npm install --save @guanghechen/task
60
+ ```
61
+
62
+ - yarn
63
+
64
+ ```bash
65
+ yarn add @guanghechen/task
66
+ ```
67
+
68
+ ## Usage
69
+
70
+ [homepage]:
71
+ https://github.com/guanghechen/sora/tree/@guanghechen/task@2.0.0/packages/task#readme
@@ -117,4 +117,5 @@ declare abstract class ResumableTask implements ITask {
117
117
  private _queueStep;
118
118
  }
119
119
 
120
- export { AtomicTask, type ITask, type ITaskStatus, ResumableTask, TaskStatus, TaskStatusEnum, TaskStrategyEnum };
120
+ export { AtomicTask, ResumableTask, TaskStatus, TaskStatusEnum, TaskStrategyEnum };
121
+ export type { ITask, ITaskStatus };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guanghechen/task",
3
- "version": "1.0.5",
3
+ "version": "2.0.0",
4
4
  "description": "Atomic and resumable tasks",
5
5
  "author": {
6
6
  "name": "guanghechen",
@@ -8,10 +8,10 @@
8
8
  },
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": "https://github.com/guanghechen/sora/tree/@guanghechen/task@1.0.4",
11
+ "url": "https://github.com/guanghechen/sora/tree/@guanghechen/task@1.0.6",
12
12
  "directory": "packages/task"
13
13
  },
14
- "homepage": "https://github.com/guanghechen/sora/tree/@guanghechen/task@1.0.4/packages/task#readme",
14
+ "homepage": "https://github.com/guanghechen/sora/tree/@guanghechen/task@1.0.6/packages/task#readme",
15
15
  "type": "module",
16
16
  "exports": {
17
17
  ".": {
@@ -26,6 +26,13 @@
26
26
  "module": "./lib/esm/index.mjs",
27
27
  "types": "./lib/types/index.d.ts",
28
28
  "license": "MIT",
29
+ "scripts": {
30
+ "build": "rollup -c ../../rollup.config.mjs",
31
+ "clean": "rimraf lib",
32
+ "test": "vitest run --config ../../vitest.config.ts",
33
+ "test:coverage": "vitest run --config ../../vitest.config.ts --coverage",
34
+ "test:update": "vitest run --config ../../vitest.config.ts -u"
35
+ },
29
36
  "files": [
30
37
  "lib/",
31
38
  "!lib/**/*.map",
@@ -35,8 +42,8 @@
35
42
  "README.md"
36
43
  ],
37
44
  "dependencies": {
38
- "@guanghechen/error.types": "^1.0.6",
39
- "@guanghechen/observable": "^6.1.7"
45
+ "@guanghechen/error.types": "^2.0.0",
46
+ "@guanghechen/observable": "^7.0.0"
40
47
  },
41
- "gitHead": "a959e42dd03f0972be0df657ecb8bc7211ab7774"
48
+ "gitHead": "12990a720b31d50d217e2e17a6191256dc94eda6"
42
49
  }