[PR #23] [MERGED] Type improvements: optional observable & live data proxy #24

Closed
opened 2026-05-23 08:36:51 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/appy-one/acebase-core/pull/23
Author: @appy-one
Created: 11/21/2022
Status: Merged
Merged: 11/21/2022
Merged by: @appy-one

Base: masterHead: improvement/optional-rxjs-observable


📝 Commits (10+)

  • 3759a1d new getGlobalObject utility function
  • 105f9bc Allow any Observable implementation
  • 18026bc try importing rxjs Observable upon load,
  • 41a3002 Use typed getObservable call
  • 6d52729 fix wrong return type
  • b910387 export SimpleObservable
  • 930936a use esm build on import (temp!)
  • 1526c3c don't ignore package-lock.json
  • 95e5c88 changed eslint comma-dangle settings
  • 4cbb43c Add rxjs as optional dependency

📊 Changes

43 files changed (+1909 additions, -203 deletions)

View changed files

📝 .eslintrc (+8 -1)
📝 .gitignore (+1 -2)
📝 dist/cjs/acebase-base.js.map (+1 -1)
📝 dist/cjs/data-proxy.js (+12 -6)
📝 dist/cjs/data-proxy.js.map (+1 -1)
📝 dist/cjs/data-reference.js (+5 -6)
📝 dist/cjs/data-reference.js.map (+1 -1)
📝 dist/cjs/index.js (+3 -1)
📝 dist/cjs/index.js.map (+1 -1)
📝 dist/cjs/optional-observable.js (+33 -24)
📝 dist/cjs/optional-observable.js.map (+1 -1)
📝 dist/cjs/utils.js (+18 -1)
📝 dist/cjs/utils.js.map (+1 -1)
📝 dist/esm/acebase-base.js.map (+1 -1)
📝 dist/esm/data-proxy.js (+12 -6)
📝 dist/esm/data-proxy.js.map (+1 -1)
📝 dist/esm/data-reference.js (+5 -6)
📝 dist/esm/data-reference.js.map (+1 -1)
📝 dist/esm/index.js (+1 -0)
📝 dist/esm/index.js.map (+1 -1)

...and 23 more files

📄 Description

This PR:

  • adds the rxjs dependency as an optionalDependency in package.json. This should:

    • allow usage of the methods that return Observables with the right types if the rxjs dependency is installed
    • throw build errors if Observable methods are used while rxjs is not installed
    • get successful builds if those methods are not used and rxjs is not installed
  • Improves the types of live data proxies and object collections. TODO: Get proxied value types to include proxy methods such as getRef and startTransaction on target and child objects without having to explicitly cast or use proxyAccess in TypeScript


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/appy-one/acebase-core/pull/23 **Author:** [@appy-one](https://github.com/appy-one) **Created:** 11/21/2022 **Status:** ✅ Merged **Merged:** 11/21/2022 **Merged by:** [@appy-one](https://github.com/appy-one) **Base:** `master` ← **Head:** `improvement/optional-rxjs-observable` --- ### 📝 Commits (10+) - [`3759a1d`](https://github.com/appy-one/acebase-core/commit/3759a1d753a4951d82cf29f1b546a943f77753ab) new getGlobalObject utility function - [`105f9bc`](https://github.com/appy-one/acebase-core/commit/105f9bcffc7d82e095b115597766e6a4bd8ab6dc) Allow any Observable implementation - [`18026bc`](https://github.com/appy-one/acebase-core/commit/18026bc6a09aa6c5512cdbc495155f9a86ea22c8) try `import`ing rxjs Observable upon load, - [`41a3002`](https://github.com/appy-one/acebase-core/commit/41a3002947775d44fb1a440989fa4b402b9fe2e4) Use typed getObservable call - [`6d52729`](https://github.com/appy-one/acebase-core/commit/6d52729ef1970cc8b7ae4232edff4c54cf2f6952) fix wrong return type - [`b910387`](https://github.com/appy-one/acebase-core/commit/b910387d269865d546f3d5495fe147787935baba) export SimpleObservable - [`930936a`](https://github.com/appy-one/acebase-core/commit/930936acfc3f97bfb6e720cacb16d955297b7de6) use esm build on import (temp!) - [`1526c3c`](https://github.com/appy-one/acebase-core/commit/1526c3cb9eed4ffe44c5cbe02330be798f3821be) don't ignore package-lock.json - [`95e5c88`](https://github.com/appy-one/acebase-core/commit/95e5c889ca2e6f5b0461aede8484e6871a089dbd) changed eslint comma-dangle settings - [`4cbb43c`](https://github.com/appy-one/acebase-core/commit/4cbb43c523346c156e8398a139029780a2b726e2) Add rxjs as optional dependency ### 📊 Changes **43 files changed** (+1909 additions, -203 deletions) <details> <summary>View changed files</summary> 📝 `.eslintrc` (+8 -1) 📝 `.gitignore` (+1 -2) 📝 `dist/cjs/acebase-base.js.map` (+1 -1) 📝 `dist/cjs/data-proxy.js` (+12 -6) 📝 `dist/cjs/data-proxy.js.map` (+1 -1) 📝 `dist/cjs/data-reference.js` (+5 -6) 📝 `dist/cjs/data-reference.js.map` (+1 -1) 📝 `dist/cjs/index.js` (+3 -1) 📝 `dist/cjs/index.js.map` (+1 -1) 📝 `dist/cjs/optional-observable.js` (+33 -24) 📝 `dist/cjs/optional-observable.js.map` (+1 -1) 📝 `dist/cjs/utils.js` (+18 -1) 📝 `dist/cjs/utils.js.map` (+1 -1) 📝 `dist/esm/acebase-base.js.map` (+1 -1) 📝 `dist/esm/data-proxy.js` (+12 -6) 📝 `dist/esm/data-proxy.js.map` (+1 -1) 📝 `dist/esm/data-reference.js` (+5 -6) 📝 `dist/esm/data-reference.js.map` (+1 -1) 📝 `dist/esm/index.js` (+1 -0) 📝 `dist/esm/index.js.map` (+1 -1) _...and 23 more files_ </details> ### 📄 Description This PR: * adds the `rxjs` dependency as an `optionalDependency` in `package.json`. This should: * allow usage of the methods that return `Observable`s with the right types if the `rxjs` dependency is installed * throw build errors if `Observable` methods are used while `rxjs` is not installed * get successful builds if those methods are not used and `rxjs` is not installed * Improves the types of live data proxies and object collections. TODO: Get proxied value types to include proxy methods such as `getRef` and `startTransaction` on target and child objects without having to explicitly cast or use `proxyAccess` in TypeScript --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror added the
pull-request
label 2026-05-23 08:36:51 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/acebase-core#24
No description provided.