Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make no-kafka optional dependency #183

Merged
merged 1 commit into from Mar 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion commands/topics_tail.js
Expand Up @@ -2,7 +2,6 @@

const cli = require('heroku-cli-util')
const co = require('co')
const kafka = require('no-kafka')

const debug = require('../lib/debug')
const clusterConfig = require('../lib/shared').clusterConfig
Expand All @@ -15,6 +14,7 @@ const IDLE_TIMEOUT = 1000
const MAX_LENGTH = 80

function * tail (context, heroku) {
const kafka = require('no-kafka')
yield withCluster(heroku, context.app, context.args.CLUSTER, function * (addon) {
if (isPrivate(addon)) {
throw new Error('`kafka:topics:tail` is not available in Heroku Private Spaces')
Expand Down
2 changes: 1 addition & 1 deletion commands/topics_write.js
Expand Up @@ -2,7 +2,6 @@

const cli = require('heroku-cli-util')
const co = require('co')
const kafka = require('no-kafka')

const debug = require('../lib/debug')
const clusterConfig = require('../lib/shared').clusterConfig
Expand All @@ -14,6 +13,7 @@ const CLIENT_ID = 'heroku-write-producer'
const IDLE_TIMEOUT = 1000

function * write (context, heroku) {
const kafka = require('no-kafka')
yield withCluster(heroku, context.app, context.args.CLUSTER, function * (addon) {
if (isPrivate(addon)) {
cli.exit(1, '`kafka:topics:write` is not available in Heroku Private Spaces')
Expand Down
4 changes: 3 additions & 1 deletion package.json
Expand Up @@ -14,9 +14,11 @@
"heroku-cli-util": "6.1.17",
"humanize-plus": "^1.8.2",
"lodash.uniqby": "4.7.0",
"no-kafka": "github:hunterloftis/kafka",
"node-spinner": "0.0.4"
},
"optionalDependencies": {
"no-kafka": "github:hunterloftis/kafka"
},
"devDependencies": {
"chai": "^3.5.0",
"chai-as-promised": "^5.3.0",
Expand Down