
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
enable-transition
Advanced tools
📦 Installation
npm install enable-transition
🔨 Usage
class Test extends React.PureComponent {
state = {
num: 2,
visible: false,
display: 'none',
height: 100
};
onToggle = () => this.setState({num: (this.state.num + 1) % 2});
onToggle2 = () => this.setState(({visible}: any) => ({visible: !visible}));
onToggle3 = () => this.setState(({display}: any) => ({display: display === 'block' ? 'none' : 'block'}));
onToggle4 = () => this.setState(({height}: any) => ({height: height === 100 ? undefined : 100}));
render() {
const {num, visible, display, height} = this.state;
return (
<div>
1、style切换-高度切换
<div className={'container'}>
<EnableTransition attribute={'height'} >
{(ref: React.LegacyRef<HTMLDivElement>) => {
return <div
ref={ref}
style={{
width: 100,
transition: 'all 500ms',
height: height,
backgroundColor: 'red'
}}
>高度切换
</div>
}}
</EnableTransition>
<button onClick={this.onToggle4}>toggle</button>
</div>
2、style切换-display切换
<div className={'container'}>
<EnableTransition attribute={'display'} displayNone={{setHeightZero:true,setWidthZero:true}}>
{(ref: React.LegacyRef<HTMLDivElement>) => {
return <div
ref={ref}
style={{
width: 100,
height:100,
transition: 'all 5000ms',
display: display,
backgroundColor: 'red'
}}
>高度切换
</div>
}}
</EnableTransition>
<button onClick={this.onToggle3}>toggle</button>
</div>
</div>
);
}
}
FAQs
Make display=none support gradients
We found that enable-transition 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
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.