
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
babel-plugin-transform-require-extensions
Advanced tools
A Babel plugin that transforms specified require path file extensions.
A Babel plugin that transforms specified require
path file extensions.
This is useful for building dual ESM/CJS packages. File names with extensions are mandatory in ESM import
specifiers in .mjs
files. After transpiling this to CJS in .js
files, the hardcoded .mjs
extensions in the require
paths must be transformed to .js
. Alternatively, sometimes it’s safe to remove the extensions as Node.js in CJS mode can automatically resolve .js
file extensions.
To install from npm run:
npm install babel-plugin-transform-require-extensions --save-dev
Configure Babel to use the plugin:
{ "plugins": ["transform-require-extensions"] }
This plugin must run after any ESM to CJS transpilation occurs.
By default .mjs
extensions are transformed to .js
. The extensions
option can be used to specify extension replacements. For example, to remove .mjs
extensions:
{
"plugins": [
[
"transform-require-extensions",
{
"extensions": {
".mjs": ""
}
}
]
]
}
2.0.1
hard-rejection
dev dependency to ensure unhandled rejections in tests exit the process with an error.test:prettier
script.semi
to the default, true
.assert
imports.FAQs
A Babel plugin that transforms specified require path file extensions.
The npm package babel-plugin-transform-require-extensions receives a total of 122 weekly downloads. As such, babel-plugin-transform-require-extensions popularity was classified as not popular.
We found that babel-plugin-transform-require-extensions demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.