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

@leafer/watcher

Package Overview
Dependencies
Maintainers
1
Versions
116
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leafer/watcher - npm Package Compare versions

Comparing version
1.11.2
to
1.12.0
+5
-5
package.json
{
"name": "@leafer/watcher",
"version": "1.11.2",
"version": "1.12.0",
"description": "@leafer/watcher",

@@ -25,9 +25,9 @@ "author": "Chao (Leafer) Wan",

"dependencies": {
"@leafer/event": "1.11.2",
"@leafer/data": "1.11.2",
"@leafer/list": "1.11.2"
"@leafer/event": "1.12.0",
"@leafer/data": "1.12.0",
"@leafer/list": "1.12.0"
},
"devDependencies": {
"@leafer/interface": "1.11.2"
"@leafer/interface": "1.12.0"
}
}

@@ -23,3 +23,3 @@ import { ILeaf, IWatcher, IEventListenerId, ILeafList, IWatcherConfig } from '@leafer/interface'

public get updatedList(): ILeafList {
if (this.hasRemove) {
if (this.hasRemove && this.config.usePartLayout) {
const updatedList = new LeafList()

@@ -63,3 +63,3 @@ this.__updatedList.list.forEach(item => { if (item.leafer) updatedList.add(item) })

protected __onAttrChange(event: PropertyEvent): void {
this.__updatedList.add(event.target as ILeaf)
if (this.config.usePartLayout) this.__updatedList.add(event.target as ILeaf)
this.update()

@@ -69,8 +69,10 @@ }

protected __onChildEvent(event: ChildEvent): void {
if (event.type === ChildEvent.ADD) {
this.hasAdd = true
this.__pushChild(event.child)
} else {
this.hasRemove = true
this.__updatedList.add(event.parent)
if (this.config.usePartLayout) {
if (event.type === ChildEvent.ADD) {
this.hasAdd = true
this.__pushChild(event.child)
} else {
this.hasRemove = true
this.__updatedList.add(event.parent)
}
}

@@ -77,0 +79,0 @@ this.update()