
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
cosmic-curse
Advanced tools
"Fun Isn't Something One Considers When Balancing The Universe. But This... Does Put A Smile On My Face."
cosmic- curse, a better and improved package of death-node is a tool that helps you clean up unused dependencies from your Node.js project. It uses the depcheck and rimraf packages to find and delete unused dependencies.
To use cosmic-curse, you need to have Node.js and npm installed on your system. You can then install cosmic-curse using the following command:
npm install cosmic-curse
First thing is to install depcheck. [it is a required dependency].
⚠️ Warning: Please if you see depcheck listed among unused dependencies, retain , or you will kill my baby
I will fix this.
You can try installing the depcheck module in your project using npm by running the command :
npm install depcheck
To use cosmic-curse, you need to call the SnapTheFinger function in your Node.js code. Here's an example of how to use cosmic-curse in a Node.js script:
const myModule = require('cosmic-curse');
myModule.SnapTheFinger();
node fileTest.js
This will list all the installed packages in the current project directory, identify the unused packages, and prompt the user to confirm whether they want to remove all unused packages or keep some of them. The function will then remove the selected packages.
If No Modules in Project:
If No Unused Modules:
This is because I have typed so much so see the VISUALS!
pic 1: This is the result if you do this correctly
pic 2: This is the result if you do not
The promptUser function improved by validating the user's input. The function should ensure that the user only enters valid module names separated by commas.
The deleteUnusedModules function improved by adding error handling for the rimraf package. If a module cannot be deleted, the function should log an error message and continue deleting the other modules.
The main function improved by adding error handling for the depcheck package. If an error occurs, the function should log an error message and exit.
You no longer need to specify your directory , the package will determine for itself.
Implemented correct deletion of dependencies.
Fixed duplication of prompts
"Perfectly Balanced, As All Things Should Be."
If you want to contribute to the cosmic-curse project, you can fork the repository on GitHub and submit a pull request with your changes. Please make sure to follow the coding style and guidelines of the project.
Please make sure to update tests as appropriate.
cosmic-curse is licensed under the MIT License. See the MIT file for details. MIT
Michelle Juma
FAQs
Package that deletes unused modules after project is done
We found that cosmic-curse 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.