Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
es6-import-list
Advanced tools
Utility for obtaining the dependency list from ES6 modules. This module only analyzes imports declared using the ES module syntax.
npm install -g es6-import-list
$ es6-import-list -d src/
// Output:
┌────────────────────────┬─────────────────────────┐
│ Modules │ Import List │
├────────────────────────┼─────────────────────────┤
│ megadraft │ MegadraftEditor │
│ │ MegadraftIcons │
│ │ editorStateFromRaw │
├────────────────────────┼─────────────────────────┤
│ react │ Component │
│ │ React │
├────────────────────────┼─────────────────────────┤
│ react-dom │ render │
└────────────────────────┴─────────────────────────┘
Generate a JSON output with all the dependency information
$ es6-import-list -d src/ --json
// Output:
{
"megadraft": [
"MegadraftEditor",
"MegadraftIcons",
"editorStateFromRaw"
],
"react": [
"Component",
"React"
],
"react-dom": [
"render"
]
}
Try es6-import-list --help
for more information.
const getImports = require('es6-import-list');
getImports('my-directory', importsList => {
console.log(importsList);
});
Default options:
const options = {
match: /.js$/,
exclude: [/^\./],
}
es6-import-list uses node-dir, so you can pass additional options parameter to match or ignore files, for example.
const getImports = require('es6-import-list');
const options = {
match: /.js$/,
exclude: [/^\./],
excludeDir: ['dist', 'lib', 'node_modules'],
};
getImports('my-directory', options, importList => {
console.log(importList);
});
FAQs
List all es6 imports
We found that es6-import-list demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.