@guanghechen/observable 6.0.2 → 6.0.3

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/CHANGELOG.md CHANGED
@@ -3,6 +3,20 @@
3
3
  All notable changes to this project will be documented in this file. See
4
4
  [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [6.0.3](https://github.com/guanghechen/sora/compare/@guanghechen/observable@6.0.2...@guanghechen/observable@6.0.3) (2024-03-10)
7
+
8
+ ### Performance Improvements
9
+
10
+ - 🎨 add @guanghechen/monitor back
11
+ ([4c75f05](https://github.com/guanghechen/sora/commit/4c75f05441f57eb2428c086aea20c733f4a730c5))
12
+ - 🎨 format codes
13
+ ([a953c67](https://github.com/guanghechen/sora/commit/a953c67ba19389b6b14bc829361d9ca406c24059))
14
+
15
+ # Change Log
16
+
17
+ All notable changes to this project will be documented in this file. See
18
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
19
+
6
20
  ## [6.0.2](https://github.com/guanghechen/sora/compare/@guanghechen/observable@6.0.1...@guanghechen/observable@6.0.2) (2024-03-09)
7
21
 
8
22
  ### Bug Fixes
package/lib/cjs/index.cjs CHANGED
@@ -52,8 +52,11 @@ class Observable extends disposable.BatchDisposable {
52
52
  continue;
53
53
  batcher.run(() => item.subscriber.dispose());
54
54
  }
55
+ for (const item of this._subscribers)
56
+ item.inactive = true;
55
57
  this._subscribers.length = 0;
56
- batcher.summary();
58
+ batcher.summary('[observable] Encountered errors while disposing.');
59
+ batcher.cleanup();
57
60
  }
58
61
  getSnapshot() {
59
62
  return this._value;
@@ -135,7 +138,8 @@ class Observable extends disposable.BatchDisposable {
135
138
  continue;
136
139
  batcher.run(() => subscriber.subscriber.next(value, prevValue));
137
140
  }
138
- batcher.summary();
141
+ batcher.summary('[observable] Encountered errors while notifying subscribers.');
142
+ batcher.cleanup();
139
143
  }
140
144
  }
141
145
 
package/lib/esm/index.mjs CHANGED
@@ -50,8 +50,11 @@ class Observable extends BatchDisposable {
50
50
  continue;
51
51
  batcher.run(() => item.subscriber.dispose());
52
52
  }
53
+ for (const item of this._subscribers)
54
+ item.inactive = true;
53
55
  this._subscribers.length = 0;
54
- batcher.summary();
56
+ batcher.summary('[observable] Encountered errors while disposing.');
57
+ batcher.cleanup();
55
58
  }
56
59
  getSnapshot() {
57
60
  return this._value;
@@ -133,7 +136,8 @@ class Observable extends BatchDisposable {
133
136
  continue;
134
137
  batcher.run(() => subscriber.subscriber.next(value, prevValue));
135
138
  }
136
- batcher.summary();
139
+ batcher.summary('[observable] Encountered errors while notifying subscribers.');
140
+ batcher.cleanup();
137
141
  }
138
142
  }
139
143
 
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@guanghechen/observable",
3
- "version": "6.0.2",
3
+ "version": "6.0.3",
4
4
  "author": {
5
5
  "name": "guanghechen",
6
6
  "url": "https://github.com/guanghechen/"
7
7
  },
8
8
  "repository": {
9
9
  "type": "git",
10
- "url": "https://github.com/guanghechen/sora/tree/@guanghechen/observable@6.0.1",
10
+ "url": "https://github.com/guanghechen/sora/tree/@guanghechen/observable@6.0.2",
11
11
  "directory": "packages/observable"
12
12
  },
13
- "homepage": "https://github.com/guanghechen/sora/tree/@guanghechen/observable@6.0.1/packages/observable#readme",
13
+ "homepage": "https://github.com/guanghechen/sora/tree/@guanghechen/observable@6.0.2/packages/observable#readme",
14
14
  "keywords": [
15
15
  "observable"
16
16
  ],
@@ -34,9 +34,9 @@
34
34
  "README.md"
35
35
  ],
36
36
  "dependencies": {
37
- "@guanghechen/disposable": "^1.0.0-alpha.3",
37
+ "@guanghechen/disposable": "^1.0.0-alpha.4",
38
38
  "@guanghechen/error.types": "^1.0.1",
39
39
  "@guanghechen/observable.types": "^6.0.1"
40
40
  },
41
- "gitHead": "20a6680c86bec2fe654fb53598d6c913707eccfc"
41
+ "gitHead": "edc5a1b997fac81f96f1ba03200a13b829b3e91d"
42
42
  }