Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
kafka-please
Advanced tools
A pre-built version of Kafka that can be started and stopped from Node.js
This npm module lets you start up a Kafka broker (including ZooKeeper) locally. It's meant to facilitate integration tests when you need to test against a Kafka broker.
You need Java in order to run Kafka. This npm module assumes that you already have Java installed.
Usage:
npm install kafka-please --save-dev
const makeKafkaServer = require('kafka-please');
makeKafkaServer().then(kafkaServer => {
// Do stuff that needs a Kafka broker here
console.log('made kafka server', kafkaServer);
console.log('zookeeper listens on', kafkaServer.zookeeperPort);
console.log('kafka listens on', kafkaServer.kafkaPort);
// Remember to shut down the server afterwards!
return kafkaServer.close().then(() => {
console.log('stopped kafka server');
return Promise.resolve();
});
});
Typically, starting a Kafka server takes ~2-3 seconds, and can make your mocha tests time out, if you don't override the timeout:
describe('my integration test', () => {
it('should use kafka', function() {
this.timeout(60000); // Set timeout to 60 seconds, just to be sure
// start kafka, run integration tests etc. here
});
});
fetch.sh
to download Kafka and unzip itnpm install
to get dependenciesnpm test
will run the integration tests.FAQs
A pre-built version of Kafka that can be started and stopped from Node.js
The npm package kafka-please receives a total of 10 weekly downloads. As such, kafka-please popularity was classified as not popular.
We found that kafka-please 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.