heavy-reactive 1.1.1 → 1.2.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/.github/workflows/release-job.yml +16 -17
- package/CHANGELOG.md +26 -0
- package/CONTRIBUTING.md +52 -8
- package/LICENSE +1 -1
- package/README.md +12 -8
- package/package.json +2 -2
|
@@ -21,8 +21,8 @@ jobs:
|
|
|
21
21
|
with:
|
|
22
22
|
release-type: node
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
# these if statements ensure that a publication only occurs when a new release is created:
|
|
25
|
+
- if: ${{ steps.release.outputs.release_created }}
|
|
26
26
|
uses: actions/checkout@v4
|
|
27
27
|
|
|
28
28
|
- name: Tag Major/Minor Versions
|
|
@@ -31,31 +31,30 @@ jobs:
|
|
|
31
31
|
run: |
|
|
32
32
|
git config user.name github-actions[bot]
|
|
33
33
|
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
git tag -
|
|
37
|
-
git
|
|
38
|
-
git push origin
|
|
39
|
-
git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}"
|
|
40
|
-
git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}"
|
|
41
|
-
git push origin v${{ steps.release.outputs.major }}
|
|
42
|
-
git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}
|
|
34
|
+
MAJOR=v${{ steps.release.outputs.major }}
|
|
35
|
+
MINOR=v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}
|
|
36
|
+
git tag -fa "$MAJOR" -m "Release $MAJOR"
|
|
37
|
+
git tag -fa "$MINOR" -m "Release $MINOR"
|
|
38
|
+
git push -f origin "$MAJOR" "$MINOR"
|
|
43
39
|
|
|
44
|
-
- name:
|
|
40
|
+
- name: Setup Node
|
|
45
41
|
# these if statements ensure that a publication only occurs when a new release is created:
|
|
46
42
|
if: ${{ steps.release.outputs.release_created }}
|
|
47
43
|
uses: actions/setup-node@v4
|
|
48
44
|
with:
|
|
49
|
-
node-version:
|
|
50
|
-
|
|
45
|
+
node-version: 24
|
|
46
|
+
|
|
47
|
+
- name: Update npm
|
|
51
48
|
# these if statements ensure that a publication only occurs when a new release is created:
|
|
52
49
|
if: ${{ steps.release.outputs.release_created }}
|
|
53
|
-
# Ensure npm 11.5.1
|
|
54
|
-
run: npm install -g npm@
|
|
55
|
-
|
|
50
|
+
# Ensure npm 11.5.1 is installed
|
|
51
|
+
run: npm install -g npm@11
|
|
52
|
+
|
|
53
|
+
- name: Install dependencies
|
|
56
54
|
# these if statements ensure that a publication only occurs when a new release is created:
|
|
57
55
|
if: ${{ steps.release.outputs.release_created }}
|
|
58
56
|
run: npm ci
|
|
57
|
+
|
|
59
58
|
- name: Publish To NPM
|
|
60
59
|
# these if statements ensure that a publication only occurs when a new release is created:
|
|
61
60
|
if: ${{ steps.release.outputs.release_created }}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.2.1](https://github.com/Qsppl/heavy-reactive/compare/v1.2.0...v1.2.1) (2026-11-15)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* restore npm publishing in release workflow ([#6](https://github.com/Qsppl/heavy-reactive/issues/6)) ([67eeb91](https://github.com/Qsppl/heavy-reactive/commit/67eeb9170c43c1d25fc01ed77203940f75ced4eb))
|
|
9
|
+
|
|
10
|
+
## [1.2.0](https://github.com/Qsppl/heavy-reactive/compare/v1.1.2...v1.2.0) (2026-11-15)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* development workflow guide ([d6e5f29](https://github.com/Qsppl/heavy-reactive/commit/d6e5f295a99696cbe17aa7236ec5a6e8f6de8e63))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* correct package name and install instructions in README ([7ebd9c2](https://github.com/Qsppl/heavy-reactive/commit/7ebd9c279f135a08edd9d113f6558c3ee6da7ea6))
|
|
21
|
+
|
|
22
|
+
## [1.1.2](https://github.com/Qsppl/heavy-reactive/compare/v1.1.1...v1.1.2) (2025-08-04)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Miscellaneous Chores
|
|
26
|
+
|
|
27
|
+
* update package info ([4e99927](https://github.com/Qsppl/heavy-reactive/commit/4e99927af4653a91727b4214968fe3c72ddee531))
|
|
28
|
+
|
|
3
29
|
## [1.1.1](https://github.com/Qsppl/heavy-reactive/compare/v1.1.0...v1.1.1) (2025-08-04)
|
|
4
30
|
|
|
5
31
|
|
package/CONTRIBUTING.md
CHANGED
|
@@ -2,6 +2,58 @@
|
|
|
2
2
|
|
|
3
3
|
This project uses a modular and declarative approach to reactive state modeling. Contributions should follow the existing architectural principles and naming conventions.
|
|
4
4
|
|
|
5
|
+
## Development workflow
|
|
6
|
+
|
|
7
|
+
### Setup
|
|
8
|
+
|
|
9
|
+
Requirements: Node.js 23.9 or later and npm 11.2 or later.
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
git clone https://github.com/Qsppl/heavy-reactive.git
|
|
13
|
+
cd heavy-reactive
|
|
14
|
+
npm install
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
`npm install` also installs the Git hooks (via Husky): **pre-commit** formats files with Prettier, **commit-msg** checks the message with commitlint and runs the TypeScript check.
|
|
18
|
+
|
|
19
|
+
| Script | What it does |
|
|
20
|
+
| -------------------------- | ----------------------------- |
|
|
21
|
+
| `npm run prettier:write` | Format the code |
|
|
22
|
+
| `npm run prettier:check` | Check formatting (as CI does) |
|
|
23
|
+
| `npm run typescript:check` | Type-check the project |
|
|
24
|
+
|
|
25
|
+
### Commits
|
|
26
|
+
|
|
27
|
+
Messages follow [Conventional Commits](https://www.conventionalcommits.org/). The type decides whether a release happens:
|
|
28
|
+
|
|
29
|
+
| Type | Example | Release |
|
|
30
|
+
| ---------------------------------------------- | ---------------------------------------- | --------------------- |
|
|
31
|
+
| `fix:` | `fix: keep $Union in sync after clear()` | patch (1.1.2 → 1.1.3) |
|
|
32
|
+
| `feat:` | `feat: add $symmetricDifferenceSets()` | minor (1.1.2 → 1.2.0) |
|
|
33
|
+
| `feat!:` or `BREAKING CHANGE:` in the body | `feat!: rename $deriveSetFromSet()` | major (1.1.2 → 2.0.0) |
|
|
34
|
+
| `docs:`, `chore:`, `refactor:`, `test:`, `ci:` | `docs: fix typo in GLOSSARY` | none |
|
|
35
|
+
|
|
36
|
+
The README shown on npm only updates with a new release. To publish a README fix, use `fix:`.
|
|
37
|
+
|
|
38
|
+
### Pull requests
|
|
39
|
+
|
|
40
|
+
1. Create a branch from `main`: `git checkout -b fix/short-description`.
|
|
41
|
+
2. Commit, push and open a pull request into `main`.
|
|
42
|
+
3. The PR title must be a Conventional Commit too: it is checked in CI and becomes the commit message on squash merge.
|
|
43
|
+
4. CI runs formatting and type checks and lints every commit message. Merge when all checks are green, using **Squash and merge**.
|
|
44
|
+
|
|
45
|
+
### Releases
|
|
46
|
+
|
|
47
|
+
Releases are automated with [release-please](https://github.com/googleapis/release-please):
|
|
48
|
+
|
|
49
|
+
1. After a `fix:` or `feat:` commit lands on `main`, release-please opens or updates a pull request named `chore(main): release X.Y.Z` with the new version and changelog.
|
|
50
|
+
2. Review the changelog in that PR and merge it.
|
|
51
|
+
3. The release job creates the GitHub release and tags (`vX.Y.Z`, `vX.Y`, `vX`) and publishes the package to npm through trusted publishing (OIDC).
|
|
52
|
+
|
|
53
|
+
Do not edit the version in `package.json` or `CHANGELOG.md` by hand: release-please owns both.
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
5
57
|
## Guidelines
|
|
6
58
|
|
|
7
59
|
- **Favor composability**: use primitives that compose cleanly (e.g. `$Set`, `$Value`, `$Intersection`).
|
|
@@ -106,11 +158,3 @@ All combinators must be:
|
|
|
106
158
|
- Pull-based from source
|
|
107
159
|
- Push-updated via `applyChanges()`
|
|
108
160
|
- Isolation-tolerant (able to disable/re-enable cleanly)
|
|
109
|
-
|
|
110
|
-
---
|
|
111
|
-
|
|
112
|
-
## 🧪 Testing
|
|
113
|
-
|
|
114
|
-
All changes must be accompanied by unit tests for new logic, and regression tests for fixed bugs.
|
|
115
|
-
|
|
116
|
-
Use the existing test harness under `/test` and add specs per feature/module.
|
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
[](https://www.npmjs.com/package/heavy-reactive)
|
|
2
|
-
[](https://github.com/your-username/heavy-reactive/blob/main/LICENSE)
|
|
2
|
+
[](https://github.com/Qsppl/heavy-reactive/blob/main/LICENSE)
|
|
4
3
|
|
|
5
4
|
# Heavy Reactive
|
|
6
5
|
|
|
@@ -8,20 +7,24 @@ Lightweight TypeScript primitives for reactive programming with heavy computatio
|
|
|
8
7
|
|
|
9
8
|
The core maintains constant-time operations even with massive datasets, processing only what changes through granular differential updates. You get precise memory control and zero-implicit reactivity waterfalls while working with plain JavaScript objects.
|
|
10
9
|
|
|
10
|
+
The library grew out of a production map that renders 200,000+ geo-objects in real time, where filters, layers and selections had to update without re-scanning the whole dataset. Signals are powered by [class-signals](https://github.com/Qsppl/class-signals).
|
|
11
|
+
|
|
11
12
|
## 🚀 Getting Started
|
|
12
13
|
|
|
13
14
|
Install the library:
|
|
14
15
|
|
|
15
16
|
```bash
|
|
16
|
-
npm install
|
|
17
|
+
npm install heavy-reactive
|
|
17
18
|
```
|
|
18
19
|
|
|
19
20
|
Import the reactive primitives:
|
|
20
21
|
|
|
21
22
|
```ts
|
|
22
|
-
import { $value, $set, $intersectionSets, $unionSets, $differenceSets } from "
|
|
23
|
+
import { $value, $set, $intersectionSets, $unionSets, $differenceSets } from "heavy-reactive"
|
|
23
24
|
```
|
|
24
25
|
|
|
26
|
+
The package ships as TypeScript source. Use it with a TypeScript-aware bundler such as Vite or esbuild, or with Bun; plain Node.js does not load `.ts` files from `node_modules`.
|
|
27
|
+
|
|
25
28
|
## ✨ Core Concepts
|
|
26
29
|
|
|
27
30
|
### `$value()` – Reactive Value
|
|
@@ -90,7 +93,8 @@ Factory functions provide named creation helpers for all key reactive types.
|
|
|
90
93
|
- `$subsetViaSet(...)` – Build a projected subset using a set of relation keys in a `$Set`
|
|
91
94
|
- `$complementViaVal(...)` – Build a complement set by excluding a projection from a single relation value
|
|
92
95
|
- `$complementViaSet(...)` – Build a complement set by excluding projected values from multiple relation keys
|
|
93
|
-
- `$
|
|
96
|
+
- `$deriveSetFromSet(...)` – Build a derived set that maps source deltas into custom results
|
|
97
|
+
- `$deriveSetFromAny<T>()(...)` – Build a derived set from any mix of `$Set` and `$Value` dependencies (the low-level primitive behind the factories above)
|
|
94
98
|
|
|
95
99
|
Each factory returns a `$Combination<T>` instance.
|
|
96
100
|
|
|
@@ -179,8 +183,8 @@ This is useful for optimizing performance:
|
|
|
179
183
|
|
|
180
184
|
## 🔁 Subscriptions and Signals
|
|
181
185
|
|
|
182
|
-
All reactive entities expose signals like `.onChange` or `.onSwitch
|
|
183
|
-
|
|
186
|
+
All reactive entities expose signals like `.onChange` or `.onSwitch`.
|
|
187
|
+
These signals emit typed payloads and support cancellation:
|
|
184
188
|
|
|
185
189
|
```ts
|
|
186
190
|
const ctrl = new AbortController()
|
|
@@ -194,7 +198,7 @@ $tags.onChange.subscribe(
|
|
|
194
198
|
|
|
195
199
|
## 📚 Learn More
|
|
196
200
|
|
|
197
|
-
- See [GLOSSARY.md](./
|
|
201
|
+
- See [GLOSSARY.md](./GLOSSARY.md) for terminology
|
|
198
202
|
- See [CONTRIBUTING.md](./CONTRIBUTING.md) for internal architecture and projection mechanics
|
|
199
203
|
|
|
200
204
|
## 🛠 License
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "heavy-reactive",
|
|
3
3
|
"description": "Reactive state management for heavy computations, distributed tasks, and long-running data processing",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.2.1",
|
|
6
6
|
"homepage": "https://github.com/Qsppl/heavy-reactive#readme",
|
|
7
7
|
"bugs": {
|
|
8
8
|
"url": "https://github.com/Qsppl/heavy-reactive/issues"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"signals"
|
|
22
22
|
],
|
|
23
23
|
"license": "MIT",
|
|
24
|
-
"author": "
|
|
24
|
+
"author": "Artem Shumailov",
|
|
25
25
|
"main": "feature.reactivity/reactivity.module.ts",
|
|
26
26
|
"types": "feature.reactivity/reactivity.module.ts",
|
|
27
27
|
"exports": {
|