@guanghechen/observable 6.1.0 → 6.1.1
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 +12 -0
- package/lib/cjs/index.cjs +4 -2
- package/lib/esm/index.mjs +4 -2
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,18 @@
|
|
|
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.1.1](https://github.com/guanghechen/sora/compare/@guanghechen/observable@6.1.0...@guanghechen/observable@6.1.1) (2024-03-10)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- 🐛 cannot access 'unsubscribable' before initialization
|
|
11
|
+
([78ba9ed](https://github.com/guanghechen/sora/commit/78ba9ed20e47cb0a5f107c3c34783c8b2da9263c))
|
|
12
|
+
|
|
13
|
+
# Change Log
|
|
14
|
+
|
|
15
|
+
All notable changes to this project will be documented in this file. See
|
|
16
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
17
|
+
|
|
6
18
|
# [6.1.0](https://github.com/guanghechen/sora/compare/@guanghechen/observable@6.0.3...@guanghechen/observable@6.1.0) (2024-03-10)
|
|
7
19
|
|
|
8
20
|
### Features
|
package/lib/cjs/index.cjs
CHANGED
|
@@ -135,8 +135,10 @@ class Ticker extends Observable {
|
|
|
135
135
|
return noopUnobservable;
|
|
136
136
|
const subscriber$1 = new subscriber.Subscriber({ onNext: () => this.tick() });
|
|
137
137
|
const unsubscribable = observable.subscribe(subscriber$1);
|
|
138
|
-
const disposable$1 = new disposable.Disposable(() =>
|
|
139
|
-
|
|
138
|
+
const disposable$1 = new disposable.Disposable(() => {
|
|
139
|
+
subscriber$1.dispose();
|
|
140
|
+
unsubscribable.unsubscribe();
|
|
141
|
+
});
|
|
140
142
|
this.registerDisposable(disposable$1);
|
|
141
143
|
return { unobserve: () => disposable$1.dispose() };
|
|
142
144
|
}
|
package/lib/esm/index.mjs
CHANGED
|
@@ -133,8 +133,10 @@ class Ticker extends Observable {
|
|
|
133
133
|
return noopUnobservable;
|
|
134
134
|
const subscriber = new Subscriber({ onNext: () => this.tick() });
|
|
135
135
|
const unsubscribable = observable.subscribe(subscriber);
|
|
136
|
-
const disposable = new Disposable(() =>
|
|
137
|
-
|
|
136
|
+
const disposable = new Disposable(() => {
|
|
137
|
+
subscriber.dispose();
|
|
138
|
+
unsubscribable.unsubscribe();
|
|
139
|
+
});
|
|
138
140
|
this.registerDisposable(disposable);
|
|
139
141
|
return { unobserve: () => disposable.dispose() };
|
|
140
142
|
}
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@guanghechen/observable",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.1",
|
|
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
|
|
10
|
+
"url": "https://github.com/guanghechen/sora/tree/@guanghechen/observable@6.1.0",
|
|
11
11
|
"directory": "packages/observable"
|
|
12
12
|
},
|
|
13
|
-
"homepage": "https://github.com/guanghechen/sora/tree/@guanghechen/observable@6.0
|
|
13
|
+
"homepage": "https://github.com/guanghechen/sora/tree/@guanghechen/observable@6.1.0/packages/observable#readme",
|
|
14
14
|
"keywords": [
|
|
15
15
|
"observable"
|
|
16
16
|
],
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"@guanghechen/disposable": "^1.0.0-alpha.4",
|
|
38
38
|
"@guanghechen/subscriber": "^1.0.0-alpha.1"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "27fe762fadd81c1d1358194216264a3929dc3b47"
|
|
41
41
|
}
|