Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

opencollective-postinstall

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opencollective-postinstall - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

bin/setup.js

11

bin/opencollective-postinstall.js
#!/usr/bin/env node
const fs = require('fs');
const { padding } = require('../lib/utils');
const { debug, padding } = require('../lib/utils');
const { fetchStats, fetchLogo } = require('../lib/fetchData');
const { printLogo, printFooter, printStats } = require('../lib/print');
const setup = require('../setup');

@@ -37,7 +36,5 @@ const {

if (process.env.DEBUG) console.log("process.env", process.env);
debug("process.env", process.env);
if (!npm_package_collective_url) {
setup();
} else if (npm_lifecycle_event !== 'postinstall') {
if (npm_lifecycle_event !== 'postinstall') {
console.error(`This script should be run as a postinstall script. Please add it to your package.json.`);

@@ -51,4 +48,4 @@ console.log(`e.g.:`);

return process.exit(0);
} else {
} else if (npm_package_collective_url) {
init();
}
const chalk = require('chalk');
const debug = function() {
if (process.env.DEBUG && process.env.DEBUG.match(/postinstall/i)) {
console.log.apply(this, arguments);
}
}
const padding = function(length) {

@@ -23,4 +29,5 @@ let padding = '';

module.exports = {
debug,
padding,
formatCurrency
};
{
"name": "opencollective-postinstall",
"version": "1.0.8",
"version": "1.0.9",
"description": "Prompt users to donate after they install your node module with npm install",

@@ -12,3 +12,3 @@ "main": "index.js",

"test": "echo \"Error: no test specified\" && exit 1",
"postinstall": "./bin/opencollective-postinstall.js"
"postinstall": "./bin/setup.js"
},

@@ -15,0 +15,0 @@ "bin": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc