![Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack](https://cdn.sanity.io/images/cgdhsj6q/production/6af25114feaaac7179b18127c83327568ff592d1-1024x1024.webp?w=800&fit=max&auto=format)
Security News
Namecheap Takes Down Polyfill.io Service Following Supply Chain Attack
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
@nuxtjs/opencollective
Advanced tools
Package description
The @nuxtjs/opencollective npm package is designed to encourage users of an open-source project to contribute to its collective fund. It displays a post-install message in the terminal, prompting users to donate to the project's Open Collective. This helps maintainers to sustain their work on the project by raising funds from users who find the project valuable.
Post-install donation prompt
Displays a message after `npm install` is run, encouraging users to support the project on Open Collective.
const { showPostInstallMessage } = require('@nuxtjs/opencollective');
// This function is typically called in a postinstall script in package.json
showPostInstallMessage();
Similar to @nuxtjs/opencollective, opencollective-postinstall is a package that displays a message after npm install, encouraging users to support the project through Open Collective. It serves the same purpose but is not scoped under the Nuxt.js project.
The fund package is another tool that can be used to encourage financial support for open-source projects. It differs from @nuxtjs/opencollective in that it allows for a more customizable message and can direct users to various funding platforms, not just Open Collective.
Changelog
Readme
Displaying opencollective statistics and a donation URL after users install a package is important for many creators. After problems with current packages that offer similar features, we decided to spin off our one own. Our key goals are:
@nuxtjs/opencollective
dependency using yarn or npm to your projectpostinstall
in your package.json{
// ...
"scripts": {
"postinstall": "opencollective || exit 0"
},
"collective": {
"url": "https://opencollective.com/nuxtjs"
}
// ...
}
Configuration is applied through your project's package.json
.
A full configuration looks like:
{
"collective": {
"url": "https://opencollective.com/nuxtjs",
"logoUrl": "https://opencollective.com/nuxtjs/logo.txt?reverse=true&variant=variant2",
"donation": {
"slug": "/order/591",
"amount": "50",
"text": "Please donate:"
}
}
}
Attribute | Optional | Default | Comment |
---|---|---|---|
url | ❌ | - | The URL to your opencollective page |
logo | ✅ | - | LEGACY: The URL to the logo that should be displayed. Please use logoUrl instead. |
logoUrl | ✅ | - | The URL to the ASCII-logo that should be displayed. |
donation.slug | ✅ | '/donate' | The slug that should be appended to url . Can be used to setup a specific order. |
donation.amount | ✅ | - | The default amount that should be selected on the opencollective page. |
donation.text | ✅ | 'Donate:' | The text that will be displayed before your donation url. |
We know the postinstall messages can be annoying when deploying in production or running a CI pipeline. That's why the message is disabled in those environments by default.
Enabled when one the following environment variables is set:
NODE_ENV=dev
NODE_ENV=development
OPENCOLLECTIVE_FORCE
Strictly Disabled when one the following environment variables is set:
OC_POSTINSTALL_TEST
OPENCOLLECTIVE_HIDE
CI
CONTINUOUS_INTEGRATION
NODE_ENV
(set and not dev
or development
)yarn install
or npm install
path/to/project/root/src/index.js path/to/package/you/want/to/try
npm t
or yarn test
This project is heavily inspired by opencollective-cli.
Copyright (c) Alexander Lichter npm@lichter.io
FAQs
[![npm version][npm-v-src]][npm-v-href] [![npm downloads][npm-d-src]][npm-d-href] [![status][github-actions-src]][github-actions-href]
We found that @nuxtjs/opencollective demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.
Security News
A JavaScript library maintainer is under fire after merging a controversial PR to support legacy versions of Node.js.