Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@automattic/babel-plugin-replace-textdomain
Advanced tools
Readme
A Babel plugin to replace the textdomain in gettext-style function calls.
This may be useful when using node modules for code-sharing among multiple applications (e.g. WordPress plugins), so each application's bundle uses a consistent textdomain throughout.
Generally you'll install this via your package manager, e.g.
npm install --save-dev @automattic/babel-plugin-replace-textdomain
In your Babel config, you might include the plugin something like this:
{
"plugins": [
[ "@automattic/babel-plugin-replace-textdomain", { "textdomain": "new-domain" } ]
]
}
Plugin options are:
textdomain
: Specify the replacement text domain. The value may be a string, which will replace all domains; an object, to map specific domains (leaving any others untouched); or a function, which will be passed the existing domain (empty string if the domain is missing entirely) and is expected to return the new domain (or null).
functions
: Specify the functions that take domain arguments. This is an object mapping function names to the (zero-based) index of the domain argument.
The default function list handles the __
, _x
, _n
, and _nx
functions provided by @wordpress/i18n. This list may be accessed as require( '@automattic/babel-plugin-replace-textdomain' ).defaultFunctions
.
To report instances of the specified i18n functions called without a domain or with an improper value for the domain, set the DEBUG
environment variable to include @automattic/babel-plugin-replace-textdomain
.
Need to report a security vulnerability? Go to https://automattic.com/security/ or directly to our security bug bounty site https://hackerone.com/automattic.
babel-plugin-replace-textdomain is licensed under GNU General Public License v2 (or later)
FAQs
A Babel plugin to replace the textdomain in gettext-style function calls.
The npm package @automattic/babel-plugin-replace-textdomain receives a total of 43 weekly downloads. As such, @automattic/babel-plugin-replace-textdomain popularity was classified as not popular.
We found that @automattic/babel-plugin-replace-textdomain demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 48 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.