
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
@leafygreen-ui/emotion
Advanced tools
pnpm add @leafygreen-ui/emotion
yarn add @leafygreen-ui/emotion
npm install @leafygreen-ui/emotion
This package should be used only in LeafyGreen components (i.e. @leafygreen-ui/* packages).
For external applications, prefer using @emotion/react (or similar), or an app-specific custom instance of Emotion.
Why? If any
@leafygreen-ui/*dependencies are not up to date, this could cause multiple copies of@leafygreen-ui/emotionto be installed, resulting in unpredictable styling.
Because we use a custom instance of Emotion to allow for styles defined in LeafyGreen to be easily overwritten, there's an additional step that must be taken to use our components when performing server-side rendering.
We expose three methods as named exports that are also exposed by the base emotion-server package: renderStylesToString, renderStylesToNodeStream, and extractCritical. You can find documentation on usage of each of the methods in the official Emotion documentation.
NOTE: If you are already server-side rendering an application using Emotion, you will use the methods exposed in
@leafygreen-ui/emotioninstead of, NOT in addition to the methods exposed byemotion-server.
import { renderToString } from 'react-dom/server';
import { renderStylesToString } from '@leafygreen-ui/emotion';
import App from './App';
const html = renderStylesToString(renderToString(<App />));
FAQs
leafyGreen UI Kit's Custom Instance of Emotion
We found that @leafygreen-ui/emotion demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers 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
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.