Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
opencollective-postinstall
Advanced tools
Lightweight npm postinstall message to invite people to donate to your collective
The opencollective-postinstall npm package is designed to display a message after the installation of an npm package. This is typically used by open source projects to encourage users to support their work via Open Collective. It helps maintainers to promote their funding needs directly in the terminal after a user installs their package.
Display a custom message post-installation
This feature allows package maintainers to display a custom message in the terminal after their package is installed. The message is usually a call to support the project on Open Collective. The code snippet shows how to set up the postinstall script in the package.json file to trigger the opencollective-postinstall command.
{
"scripts": {
"postinstall": "opencollective-postinstall"
}
}
Similar to opencollective-postinstall, the 'funding' package is used to display a message about funding options for the package. However, 'funding' allows for more customization in terms of the message content and the funding platforms it supports, making it a more flexible option compared to opencollective-postinstall.
This package serves a similar purpose by allowing messages or scripts to be run after npm install. While opencollective-postinstall focuses specifically on Open Collective funding messages, postinstall-postinstall can be used for a variety of post-install scripts, not limited to funding appeals.
Lightweight npm postinstall message to invite people to donate to your collective
npm install --save opencollective-postinstall
And in your package.json
add:
{
...
"scripts": {
"postinstall": "opencollective-postinstall"
},
"collective": {
"url": "https://opencollective.com/webpack"
}
...
}
In some places (e.g. CI) you may want to disable this output. You can do this by setting the environment variable DISABLE_OPENCOLLECTIVE=true
.
It will not be shown if npm's log level is set to silent (--silent
), warn (--quiet
), or error (--loglevel error
).
Note: This is a lightweight alternative to the opencollective-cli that offers a more complete postinstall message with the current balance and ASCII logo of the collective.
FAQs
Lightweight npm postinstall message to invite people to donate to your collective
The npm package opencollective-postinstall receives a total of 2,589,474 weekly downloads. As such, opencollective-postinstall popularity was classified as popular.
We found that opencollective-postinstall demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.