Product
Socket Now Supports uv.lock Files
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
@mux/mux-elements-codemod
Advanced tools
A codemod to transform @mux-elments scope imports into @mux scope imports
mux-elements-codemod is a CLI app to help run various migrations or codemods on users who use any of the mux elements.
Easiest way to use it is via npx
which ships with npm
:
npx @mux/mux-elements-codemod
Alternatively, install it globally with npm
or yarn
npm install --global @mux/mux-elements-codemod
mux-elements-codemod
By default, it will run in dry-run mode, so, you don't have to worry about it changing your files. Pass in --force
for it to change any file.
$ mux-elements-codemod --help
$ mux-elements-codemod [OPTIONS] [paths ...]
$ mux-elements-codemod [--help|-h]
paths can be regular globbed items or a list of folders
The default path is ./
Examples:
$ mux-elements-codemod -i ./packages ./examples
$ mux-elements-codemod --imports ./packages
$ mux-elements-codemod --imports ./examples/**/*.tsx
$ mux-elements-codemod --extensions="tsx jsx" --imports ./examples/
$ mux-elements-codemod -e="tsx jsx" --imports ./examples/ --ignore .next --ignore dist
Options:
-i --imports update imports/requires scope from @mux-elements to @mux
--ignore Add a name to ignore in the files, multiples can be provided
-e --extensions specifiy the specific file extensions to use as a space separated string
default is "js ts jsx tsx json html mjs cjs"
-f --force by default, this does a dry run, run with --force to replace the text inline
-h --help show this help
Currently, the only available codemod is a scope migration script for imports.
It allows you to bulk change multiple imports that use the old scope (@mux-elements
) to the new scope (@mux
).
$ mux-elements-codemod --imports ./src
Running in dry run mode. The following files will be modified:
src/player.tsx
Before:
2:import MuxPlayer from "@mux-elements/mux-player-react";
After:
2:import MuxPlayer from "@mux/mux-player-react";
And then, you can run it with --force
to make the replacements inline.
$ mux-elements-codemod --imports ./src --force
Modifying the following files to replace `@mux-elements/` scope with `@mux/`:
src/player.tsx
FAQs
A codemod to transform @mux-elements scope imports into @mux scope imports
The npm package @mux/mux-elements-codemod receives a total of 98 weekly downloads. As such, @mux/mux-elements-codemod popularity was classified as not popular.
We found that @mux/mux-elements-codemod 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.
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.
Security News
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.