
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
babel-plugin-jsx-expressions
Advanced tools
Plugin to automatically wrap JSX expressions and spread attributes containing any member access with a computed [signal](https://preactjs.com/guide/v10/signals/).
Plugin to automatically wrap JSX expressions and spread attributes containing any member access with a computed signal.
This enables signal-safe expressions in JSX when using Preact with the Signals library.
npm install --save-dev @babel/core @preact/signals
Also install this plugin (locally or from your project):
npm install --save-dev babel-plugin-jsx-expressions
const { transformSync } = require("@babel/core");
const plugin = require("babel-plugin-jsx-expressions");
const result = transformSync(code, {
filename: "file.tsx",
plugins: [plugin],
parserOpts: { sourceType: "module" },
sourceMaps: true
});
Or in your babel.config.js
:
module.exports = {
plugins: ["babel-plugin-jsx-expressions"]
};
This plugin transforms JSX like:
<div>{foo.bar}</div>
into:
import { computed } from "@preact/signals";
<div>{computed(() => foo.bar)}</div>
It also works for JSX spread attributes:
<Component {...some.obj} />
// becomes
<Component {...computed(() => some.obj)} />
jsx
and typescript
by injecting those parser plugins via manipulateOptions()
.MemberExpression
(e.g. a.b
) are wrapped.MIT
FAQs
Plugin to automatically wrap JSX expressions and spread attributes containing any member access with a computed [signal](https://preactjs.com/guide/v10/signals/).
We found that babel-plugin-jsx-expressions demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.