Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
@compiled/codemods
Advanced tools
A familiar and performant compile time CSS-in-JS library for React.
Codemods for easy migration from styled components and emotion.
Codemods in this repository can be run with the Hypermod.io CLI.
# Transform single file
npx @hypermod/cli --packages @compiled/codemods /Project/path/to/file
# Transform multiple files
npx @hypermod/cli --packages @compiled/codemods /Project/**/*.tsx
Codemods support a simple plugin system where supported implementations can be overridden. The CodemodPlugin
interface
lists all the supported methods to be re-implemented. See the following example:
import type { API, FileInfo, Options } from 'jscodeshift';
import type { CodemodPlugin } from '@compiled/codemods';
const ExampleCodemodPlugin: CodemodPlugin = {
name: 'example-codemod-plugin',
create: (fileInfo: FileInfo, { jscodeshift: j }: API, options: Options) => ({
visitor: {
program({ program }) {
j(program)
.find(j.ImportDeclaration)
.at(-1)
.get()
.insertAfter(
j.importDeclaration(
[j.importSpecifier(j.identifier('getFeatureFlag'))],
j.literal('./feature-flags')
)
);
},
},
}),
};
export default ExampleCodemodPlugin;
FAQs
A familiar and performant compile time CSS-in-JS library for React.
The npm package @compiled/codemods receives a total of 8 weekly downloads. As such, @compiled/codemods popularity was classified as not popular.
We found that @compiled/codemods 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.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.