Repository navigation
Releases
Migrate to TypeScript + bug fixes
Port lib/*.js to strict TypeScript in src/, compiled to dist/ with bundled .d.ts, source maps, and declaration maps. Runtime behavior is unchanged except two bug fixes: a stray console.log in from()'s change handler, and observers being skipped (or notified after removal) when a subscription list changed mid-notification.
- onChange/from use variadic tuple inference; callbacks may declare fewer parameters than observables, and union-typed observables resolve to unknown rather than an unsound never.
- Tests run on Node's built-in runner directly against the .ts sources via native type stripping; adds direct onChange coverage and mid-notification unsubscribe cases (30 tests, 100% coverage).
- Packaging: exports map, files whitelist (no test files shipped), types field, engines/devEngines, prepublishOnly gate.
- Docs generated with TypeDoc instead of JSDoc.
- CI: setup-node on Node 22/24, typecheck+build steps, docs deploy gated on master (was gated on a nonexistent main) with contents: write permission.
- README: fix when()/compute-export/reduce examples.
Fixed npm package.
This release is functionally the same as the previous release, but I'm creating it to synchronize things with npm.
We needed a v1.0.2 release on npm because previous 1.x releases were missing JS files due to a misconfigured main file in package.json.
Refreshed for 2024; Breaking Changes
- Rewritten from previous version.
- Removed outdated tooling (like bower etc.).
- Breaking: API changed.
- Removed
oandoafunctions. - Removed
ObservableArrayentirely. - See current API at https://akshat1.github.io/compute/
- Removed
- Switched from Travis-CI to github actions.
- Set up auto publishing of JSDoc.
Bugfixes and UMD
Latest Compute! - added umd wrapper - fixed problems with using knockout
For the server, and the browser
Compute now actually works correctly with Knockout in the browser.
Coverage Summary
Statements : 96.53% ( 139/144 )
Branches : 83.33% ( 35/42 )
Functions : 100% ( 25/25 )
Lines : 97.59% ( 81/83 )
First working bower release
Turns out the last three bower releases have been useless since they didn't include the source or the files. The former because I ignored the source directory and the latter because it wasn't a part of the repo.
This release adds the dist folder to the repo. Tested this out by using Compute via bower in another project. Huzzah and all that.
Also, this one has proper tests (on the source, not release), lint and code-coverage.
Coverage stats:
| Statements | 89.87% ( 142/158 ) |
| Branches | 59.52% ( 25/42 ) |
| Functions | 87.1% ( 27/31 ) |
| Lines | 98.72% ( 77/78 ) |