
Research
Shai-Hulud Descends to Hades: Miasma Worm Campaign Spreads with New PyPI Wave
Socket found 37 malicious PyPI wheels that abuse Python startup hooks to launch a Bun-powered credential stealer tied to Mini Shai-Hulud/Miasma.
mobx-custom
Advanced tools
yarn add mobx mobx-custom
import {deepExtendObservable} from "mobx-custom"
import {observe} from "mobx"
class Address = {
city = "上海"
cityCode = -1
desc = "xx路"
}
class Person {
age = 10
address = new Address()
}
const oriPerson = new Person()
const person = deepExtendObservable(oriPerson, {...oriPerson})
observe(person, () => {
console.log('person属性有变动')
})
person.address = new Address() // 触发observe
person.address.city = "北京" // 触发observe
person.age = 200 // 触发observe
import {deepExtendObservable} from "mobx-custom"
import {observe, observable, extendObservable} from "mobx"
class Address = {
city = "上海"
cityCode = -1
desc = "xx路"
}
class Person {
age = 10
address = new Address()
}
// mobx会将普通对象进行observable
const obj = observable({a: 1})
observe(obj, () => {
console.log('obj属性有变动')
})
person.a = 2 // 触发observe
// mobx不会对person1做处理
const person1 = observable(new Person())
observe(person1, () => {
console.log('person1属性有变动')
})
person.age = 2 // 不会触发observe
// mobx不会对person2.address做处理
let oriPerson2 = new Person()
const person2 = extendObservable(oriPerson2, {...oriPerson2})
observe(person2, () => {
console.log('person2属性有变动')
})
person.age = 2 // 会触发observe
person.address = new Address() // 不会触发observe
FAQs
解决mobx extendObservable无法用于自定义类的问题
The npm package mobx-custom receives a total of 2 weekly downloads. As such, mobx-custom popularity was classified as not popular.
We found that mobx-custom demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Socket found 37 malicious PyPI wheels that abuse Python startup hooks to launch a Bun-powered credential stealer tied to Mini Shai-Hulud/Miasma.

Security News
RubyGems and Bundler 4.0.13 introduced an opt-in cooldown feature that delays newly published gems during dependency resolution.

Security News
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.