
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
babel-plugin-fully-specified
Advanced tools
Babel Plugin to transform your code to include the mandatory file extensions so your output gets fully-specified imports.
Babel Plugin to transform your code to include the mandatory file extensions so your output gets fully-specified imports.
For who is this?
🍀 Basically for everyone who uses "type": "module"
in their package.json
– 🌈 but don't want to rewrite all their import paths to include e.g. /index.js
or extension at all.
It will transform like this:
- import { Thing } from '/path'
+ import { Thing } from '/path/index.js'
NB: Dynamic imports are currently not support!
npm install babel-plugin-fully-specified
# or
yarn add babel-plugin-fully-specified
… and add it to your Babel Plugins .babelrc
(babel.config.js
):
{
"plugins": [
+ "babel-plugin-fully-specified"
]
}
As of now, no options are available.
ESM requires with the Mandatory file extensions, that all imports includes its file extension. Traditionally, its very common to omit it, especially when it comes to /index
imports.
✨ Now, this is something the author of a package has to take care of – not you as a web page/app developer.
... failed to resolve only because it was resolved as fully specified (probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '.mjs' file, or a '.js' file where the package.json contains '"type": "module"'). The extension in the request is mandatory for it to be fully specified. Add the extension to the request.
If you see this 👆 – ask the author of a package to make their build pipeline fully specified, by e.g. include babel-plugin-fully-specified
.
This mono-repo will contain certain tools/packages to help you transform existing code during build.
- import { Thing } from '/path'
+ import { Thing } from '/path/index.js'
Right now, only a Babel exists – but an ESLint Plugin would be nice to have as well.
FAQs
Babel Plugin to transform your code to include the mandatory file extensions so your output gets fully-specified imports.
The npm package babel-plugin-fully-specified receives a total of 5,834 weekly downloads. As such, babel-plugin-fully-specified popularity was classified as popular.
We found that babel-plugin-fully-specified 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.