You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@blac/core

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@blac/core - npm Package Compare versions

Comparing version
2.0.0-rc.3
to
2.0.0-rc.4
+5
-8
dist/index.cjs

@@ -123,3 +123,3 @@

* Release a reference to an instance
* Disposes when ref count reaches zero (unless keepAlive)
* Disposes when ref count reaches zero (unless static keepAlive is true)
*/

@@ -136,3 +136,4 @@ release(constructor, key, forceDispose = false) {

entry.refCount--;
if (entry.refCount <= 0 && !entry.instance.keepAlive) {
const keepAlive = constructor.keepAlive === true;
if (entry.refCount <= 0 && !keepAlive) {
entry.instance.dispose();

@@ -284,3 +285,2 @@ this.instances.delete(instanceKey);

name;
keepAlive;
debug;

@@ -295,3 +295,2 @@ instanceId;

this.name = config.name || this.constructor.name;
this.keepAlive = config.keepAlive ?? false;
this.debug = config.debug ?? false;

@@ -428,2 +427,3 @@ this.instanceId = config.instanceId || generateSimpleId(this.constructor.name);

var TodoCubit = class extends Cubit {
static keepAlive = true;
nextId = 0;

@@ -435,6 +435,3 @@ constructor() {

isLoading: false
}, {
name: "TodoCubit",
keepAlive: true
});
}, { name: "TodoCubit" });
}

@@ -441,0 +438,0 @@ addTodo = (text) => {

@@ -21,3 +21,3 @@ //#region src/core/StateContainerRegistry.d.ts

* Release a reference to an instance
* Disposes when ref count reaches zero (unless keepAlive)
* Disposes when ref count reaches zero (unless static keepAlive is true)
*/

@@ -66,4 +66,2 @@ release<T extends StateContainer<any>>(constructor: new (...args: any[]) => T, key?: string, forceDispose?: boolean): void;

name?: string;
/** Whether to keep container alive when no consumers */
keepAlive?: boolean;
/** Enable debug logging */

@@ -73,4 +71,2 @@ debug?: boolean;

instanceId?: string;
/** Whether this instance should be isolated (not shared) */
isolated?: boolean;
}

@@ -141,3 +137,2 @@ /**

readonly name: string;
readonly keepAlive: boolean;
readonly debug: boolean;

@@ -245,2 +240,3 @@ readonly instanceId: string;

declare class TodoCubit extends Cubit<TodoState> {
static keepAlive: boolean;
private nextId;

@@ -247,0 +243,0 @@ constructor();

@@ -21,3 +21,3 @@ //#region src/core/StateContainerRegistry.d.ts

* Release a reference to an instance
* Disposes when ref count reaches zero (unless keepAlive)
* Disposes when ref count reaches zero (unless static keepAlive is true)
*/

@@ -66,4 +66,2 @@ release<T extends StateContainer<any>>(constructor: new (...args: any[]) => T, key?: string, forceDispose?: boolean): void;

name?: string;
/** Whether to keep container alive when no consumers */
keepAlive?: boolean;
/** Enable debug logging */

@@ -73,4 +71,2 @@ debug?: boolean;

instanceId?: string;
/** Whether this instance should be isolated (not shared) */
isolated?: boolean;
}

@@ -141,3 +137,2 @@ /**

readonly name: string;
readonly keepAlive: boolean;
readonly debug: boolean;

@@ -245,2 +240,3 @@ readonly instanceId: string;

declare class TodoCubit extends Cubit<TodoState> {
static keepAlive: boolean;
private nextId;

@@ -247,0 +243,0 @@ constructor();

@@ -122,3 +122,3 @@ //#region src/utils/idGenerator.ts

* Release a reference to an instance
* Disposes when ref count reaches zero (unless keepAlive)
* Disposes when ref count reaches zero (unless static keepAlive is true)
*/

@@ -135,3 +135,4 @@ release(constructor, key, forceDispose = false) {

entry.refCount--;
if (entry.refCount <= 0 && !entry.instance.keepAlive) {
const keepAlive = constructor.keepAlive === true;
if (entry.refCount <= 0 && !keepAlive) {
entry.instance.dispose();

@@ -283,3 +284,2 @@ this.instances.delete(instanceKey);

name;
keepAlive;
debug;

@@ -294,3 +294,2 @@ instanceId;

this.name = config.name || this.constructor.name;
this.keepAlive = config.keepAlive ?? false;
this.debug = config.debug ?? false;

@@ -427,2 +426,3 @@ this.instanceId = config.instanceId || generateSimpleId(this.constructor.name);

var TodoCubit = class extends Cubit {
static keepAlive = true;
nextId = 0;

@@ -434,6 +434,3 @@ constructor() {

isLoading: false
}, {
name: "TodoCubit",
keepAlive: true
});
}, { name: "TodoCubit" });
}

@@ -440,0 +437,0 @@ addTodo = (text) => {

{
"name": "@blac/core",
"version": "2.0.0-rc.3",
"version": "2.0.0-rc.4",
"license": "MIT",

@@ -5,0 +5,0 @@ "author": "Brendan Mullins <jsnanigans@gmail.com>",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display