Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@rimbu/actor

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rimbu/actor - npm Package Compare versions

Comparing version 0.8.1 to 0.8.2

2

dist/main/command.js

@@ -27,3 +27,3 @@ "use strict";

if (enabled.obsReadonly.state) {
props.execute.apply(props, (0, tslib_1.__spreadArray)([], (0, tslib_1.__read)(args), false));
props.execute.apply(props, tslib_1.__spreadArray([], tslib_1.__read(args), false));
}

@@ -30,0 +30,0 @@ },

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
(0, tslib_1.__exportStar)(require("./internal"), exports);
tslib_1.__exportStar(require("./internal"), exports);
//# sourceMappingURL=index.js.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
(0, tslib_1.__exportStar)(require("./obs"), exports);
(0, tslib_1.__exportStar)(require("./actor"), exports);
(0, tslib_1.__exportStar)(require("./command"), exports);
(0, tslib_1.__exportStar)(require("./process-queue"), exports);
tslib_1.__exportStar(require("./obs"), exports);
tslib_1.__exportStar(require("./actor"), exports);
tslib_1.__exportStar(require("./command"), exports);
tslib_1.__exportStar(require("./process-queue"), exports);
//# sourceMappingURL=internal.js.map

@@ -37,3 +37,3 @@ "use strict";

try {
for (var _b = (0, tslib_1.__values)(this._subscribers), _c = _b.next(); !_c.done; _c = _b.next()) {
for (var _b = tslib_1.__values(this._subscribers), _c = _b.next(); !_c.done; _c = _b.next()) {
var subscriber = _c.value;

@@ -54,3 +54,3 @@ subscriber(newState, oldState);

var Impl = /** @class */ (function (_super) {
(0, tslib_1.__extends)(Impl, _super);
tslib_1.__extends(Impl, _super);
//implements Obs<T, D> {

@@ -60,5 +60,6 @@ function Impl(pureState, options, derivedState, fullState) {

if (fullState === void 0) { fullState = ((options === null || options === void 0 ? void 0 : options.derive)
? (0, tslib_1.__assign)((0, tslib_1.__assign)({}, pureState), derivedState) : pureState); }
? tslib_1.__assign(tslib_1.__assign({}, pureState), derivedState) : pureState); }
var _this = this;
var _a;
var _this = _super.call(this, options) || this;
_this = _super.call(this, options) || this;
_this.pureState = pureState;

@@ -110,3 +111,3 @@ _this.options = options;

var newDerivedState = this.options.derive(newPureState, oldPureState, oldDerivedState);
var newFullState = (0, tslib_1.__assign)((0, tslib_1.__assign)({}, newPureState), newDerivedState);
var newFullState = tslib_1.__assign(tslib_1.__assign({}, newPureState), newDerivedState);
this.derivedState = newDerivedState;

@@ -124,3 +125,3 @@ var oldFullState = this.fullState;

var pureState = this.pureState;
var newState = (0, deep_1.patch)(pureState).apply(void 0, (0, tslib_1.__spreadArray)([], (0, tslib_1.__read)(patches), false));
var newState = (0, deep_1.patch)(pureState).apply(void 0, tslib_1.__spreadArray([], tslib_1.__read(patches), false));
this.setState(newState);

@@ -193,3 +194,3 @@ };

try {
for (var parts_1 = (0, tslib_1.__values)(parts), parts_1_1 = parts_1.next(); !parts_1_1.done; parts_1_1 = parts_1.next()) {
for (var parts_1 = tslib_1.__values(parts), parts_1_1 = parts_1.next(); !parts_1_1.done; parts_1_1 = parts_1.next()) {
var part = parts_1_1.value;

@@ -271,3 +272,3 @@ obj[part] = {};

var parentPatch = mapFrom(newCombinedState);
var _a = (0, tslib_1.__read)((0, deep_1.patch)([
var _a = tslib_1.__read((0, deep_1.patch)([
_this.state,

@@ -274,0 +275,0 @@ other.state,

@@ -16,5 +16,5 @@ "use strict";

function start() {
return (0, tslib_1.__awaiter)(this, void 0, void 0, function () {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var nextProcess;
return (0, tslib_1.__generator)(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {

@@ -42,5 +42,5 @@ case 0:

return new Promise(function (resolve, reject) {
queue.push(function () { return (0, tslib_1.__awaiter)(_this, void 0, void 0, function () {
queue.push(function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var e_1;
return (0, tslib_1.__generator)(this, function (_a) {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {

@@ -47,0 +47,0 @@ case 0:

{
"name": "@rimbu/actor",
"version": "0.8.1",
"version": "0.8.2",
"description": "State management tools to create stateful logic that can be easily integrated in any framework",

@@ -58,4 +58,4 @@ "keywords": [

"dependencies": {
"@rimbu/deep": "^0.9.1",
"tslib": "^2.3.1"
"@rimbu/deep": "^0.9.2",
"tslib": "^2.4.0"
},

@@ -69,3 +69,3 @@ "publishConfig": {

},
"gitHead": "f44e1b43f07ac973555270806bbdde5f06400941"
"gitHead": "33dd7ca935f19f513586834a2ce1b1f886352ae7"
}

@@ -9,4 +9,6 @@ <p align="center">

For complete documentation please visit the _[Rimbu Docs](https://rimbu.org)_.
This package is still experimental, and therefore does not yet have complete documentation.
For complete documentation please visit the _[Rimbu Docs](https://rimbu.org)_ or the _[Rimbu API Docs](https://rimbu.org/api)_.
## Installation

@@ -24,26 +26,37 @@

Create a file called `rimbu.ts` and add the following:
For Deno, the following approach is recommended:
> ```ts
> export * from 'https://deno.land/x/rimbu/actor/mod.ts';
> ```
In the root folder of your project, create or edit a file called `import_map.json` with the following contents (where you should replace `x.y.z` with the desired version of Rimbu):
Or using a pinned version (`x.y.z`):
```json
{
"imports": {
"@rimbu/": "https://deno.land/x/rimbu@x.y.z/"
}
}
```
> ```ts
> export * from 'https://deno.land/x/rimbu/actor@x.y.z/mod.ts';
> ```
**Note: The trailing slashes are important!**
Then import what you need from `rimbu.ts`:
In this way you can use relative imports from Rimbu in your code, like so:
```ts
import { Actor } from './rimbu.ts';
import { List } from '@rimbu/core/mod.ts';
import { HashMap } from '@rimbu/hashed/mod.ts';
```
Because Rimbu uses complex types, it's recommended to use the `--no-check` flag (your editor should already have checked your code) and to specify a `tsconfig.json` file with the settings described below.
Note that for sub-packages, due to conversion limitations it is needed to import the `index.ts` instead of `mod.ts`, like so:
Running your script then becomes:
```ts
import { HashMap } from '@rimbu/hashed/map/index.ts';
```
> `deno run --no-check --config tsconfig.json <your-script>.ts`
To run your script (let's assume the entry point is in `src/main.ts`):
`deno run --import-map import_map.json src/main.ts`
Because Rimbu uses advanced types, this may slow down the type checking part when running your code. If you're able to rely on your code editor to provide type errors, you can skip the Deno type check using the `--no-check` flag:
`deno run --import-map import_map.json --no-check src/main.ts`
## Usage

@@ -84,3 +97,3 @@

<img src = "https://contrib.rocks/image?repo=vitoke/iternal"/>
<img src = "https://contrib.rocks/image?repo=rimbu-org/rimbu"/>

@@ -87,0 +100,0 @@ Made with [contributors-img](https://contrib.rocks).

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc