@guanghechen/observable 6.1.0 → 6.1.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/CHANGELOG.md CHANGED
@@ -3,6 +3,29 @@
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
+ ## <small>6.1.2 (2024-09-18)</small>
7
+
8
+ - :rotating_light: improve: fix lint ([3083212](https://github.com/guanghechen/sora/commit/3083212))
9
+ - :wrench: chore: upgrade devDependencies and fix configs
10
+ ([230fb63](https://github.com/guanghechen/sora/commit/230fb63))
11
+
12
+ # Change Log
13
+
14
+ All notable changes to this project will be documented in this file. See
15
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
16
+
17
+ ## [6.1.1](https://github.com/guanghechen/sora/compare/@guanghechen/observable@6.1.0...@guanghechen/observable@6.1.1) (2024-03-10)
18
+
19
+ ### Bug Fixes
20
+
21
+ - 🐛 cannot access 'unsubscribable' before initialization
22
+ ([78ba9ed](https://github.com/guanghechen/sora/commit/78ba9ed20e47cb0a5f107c3c34783c8b2da9263c))
23
+
24
+ # Change Log
25
+
26
+ All notable changes to this project will be documented in this file. See
27
+ [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
28
+
6
29
  # [6.1.0](https://github.com/guanghechen/sora/compare/@guanghechen/observable@6.0.3...@guanghechen/observable@6.1.0) (2024-03-10)
7
30
 
8
31
  ### 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(() => unsubscribable.unsubscribe());
139
- this.registerDisposable(subscriber$1);
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(() => unsubscribable.unsubscribe());
137
- this.registerDisposable(subscriber);
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
  }
@@ -19,7 +19,7 @@ interface IObservableNextOptions {
19
19
  */
20
20
  readonly strict?: boolean;
21
21
  /**
22
- * Force trigger the notification of subscribers even the next value is equals to the current value.
22
+ * Force trigger the notification of subscribers even the next value equals to the current value.
23
23
  * @default false
24
24
  */
25
25
  readonly force?: boolean;
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@guanghechen/observable",
3
- "version": "6.1.0",
3
+ "version": "6.1.2",
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.3",
10
+ "url": "https://github.com/guanghechen/sora/tree/@guanghechen/observable@6.1.1",
11
11
  "directory": "packages/observable"
12
12
  },
13
- "homepage": "https://github.com/guanghechen/sora/tree/@guanghechen/observable@6.0.3/packages/observable#readme",
13
+ "homepage": "https://github.com/guanghechen/sora/tree/@guanghechen/observable@6.1.1/packages/observable#readme",
14
14
  "keywords": [
15
15
  "observable"
16
16
  ],
@@ -34,8 +34,8 @@
34
34
  "README.md"
35
35
  ],
36
36
  "dependencies": {
37
- "@guanghechen/disposable": "^1.0.0-alpha.4",
38
- "@guanghechen/subscriber": "^1.0.0-alpha.1"
37
+ "@guanghechen/disposable": "^1.0.0-alpha.5",
38
+ "@guanghechen/subscriber": "^1.0.0-alpha.2"
39
39
  },
40
- "gitHead": "497dbbfba4b26ad22cdc2e9500ceca625d3ffac3"
40
+ "gitHead": "61841206a2ca8060c0f47a32b9aa177b318f7c2e"
41
41
  }