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] #75 #76

Merged
merged 1 commit into from
Sep 27, 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ sudo: false
node_js:
- "6"
- "8"
- "9"
- "10"

git:
depth: false

env:
- STAN_VERSION=v0.8.0-beta
- STAN_VERSION=v0.11.0

before_script:
- wget "https://github.com/nats-io/nats-streaming-server/releases/download/$STAN_VERSION/nats-streaming-server-$STAN_VERSION-linux-amd64.zip" -O tmp.zip
Expand All @@ -21,10 +20,10 @@ before_script:


script:
- if [[ "$TRAVIS_NODE_VERSION" == 4 ]]; then npm test; fi
- if [[ "$TRAVIS_NODE_VERSION" == 6 ]]; then npm test; fi
- if [[ "$TRAVIS_NODE_VERSION" == 8 ]]; then npm test; fi
- if [[ "$TRAVIS_NODE_VERSION" == 9 ]]; then npm run coveralls; fi
- npm test

after_success:
- if [[ "$TRAVIS_NODE_VERSION" == 10 ]]; then npm run coveralls; fi

after_failure:
- cat nats-streaming-server/logs/*.log
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ lint:
./node_modules/.bin/jshint ./test ./index.js ./lib/stan.js

test:
@NODE_ENV=test ./node_modules/.bin/mocha -c\
@NODE_ENV=test ./node_modules/.bin/mocha --exit -c\
--reporter list \
--slow 5000 \
--timeout 10000
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ Node NATS Streaming is an extremely performant, lightweight reliable streaming p

[![license](https://img.shields.io/github/license/nats-io/node-nats-streaming.svg)](https://www.apache.org/licenses/LICENSE-2.0)
[![Travis branch](https://img.shields.io/travis/nats-io/node-nats-streaming/master.svg)]()
[![Coveralls github branch](https://img.shields.io/coveralls/github/nats-io/node-nats-streaming/master.svg)]()
[![npm](https://img.shields.io/npm/v/node-nats-streaming.svg)](https://www.npmjs.com/package/node-nats-streaming)
[![Coverage Status](https://coveralls.io/repos/github/nats-io/node-nats-streaming/badge.svg?branch=master)](https://coveralls.io/github/nats-io/node-nats-streaming?branch=master)[![npm](https://img.shields.io/npm/v/node-nats-streaming.svg)](https://www.npmjs.com/package/node-nats-streaming)
[![npm](https://img.shields.io/npm/dt/node-nats-streaming.svg)](https://www.npmjs.com/package/node-nats-streaming)




NATS Streaming provides the following high-level feature set:
- Log based persistence
- At-Least-Once Delivery model, giving reliable message delivery
Expand Down
4 changes: 3 additions & 1 deletion lib/stan.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var util = require('util'),
/**
* Constants
*/
var VERSION = '0.0.41',
var VERSION = '0.0.50',
DEFAULT_PORT = 4222,
DEFAULT_PRE = 'nats://localhost:',
DEFAULT_URI = DEFAULT_PRE + DEFAULT_PORT,
Expand Down Expand Up @@ -413,6 +413,7 @@ Stan.prototype.publish = function(subject, data, ackHandler) {
if (this.nc === undefined) {
if (util.isFunction(ackHandler)) {
ackHandler(new Error(CONN_CLOSED));
return;
} else {
throw new Error(CONN_CLOSED);
}
Expand Down Expand Up @@ -654,6 +655,7 @@ Subscription.prototype.close = function() {
function closeOrUnsubscribe(that, doClose) {
if(that.isClosed()) {
that.emit('error', new Error(BAD_SUBSCRIPTION));
return;
}

var sc = that.stanConnection;
Expand Down
17 changes: 8 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-nats-streaming",
"version": "0.0.41",
"version": "0.0.50",
"description": "Node.js client for NATS Streaming, a lightweight, high-performance cloud native messaging system",
"keywords": [
"nats",
Expand Down Expand Up @@ -29,33 +29,32 @@
"contributors": [],
"main": "./index.js",
"scripts": {
"cover": "istanbul cover _mocha",
"coveralls": "npm run cover -- --report lcovonly && cat ./reports/coverage/lcov.info | coveralls",
"coveralls": "cat ./reports/coverage/lcov.info | coveralls",
"depcheck": "dependency-check . lib/* lib/pb/*",
"depcheck:unused": "dependency-check ./package.json --unused --no-dev lib/*.js",
"gen": "protoc --js_out=import_style=commonjs,library=lib/pb/protocol_pb,binary:. lib/pb/protocol.proto",
"lint": "jshint --reporter node_modules/jshint-stylish lib/*.js test/*.js test/support/*.js examples/*.js",
"npm-publish": "npm publish https://github.com/nats-io/node-nats-streaming.git --access public",
"test": "npm run depcheck && npm run depcheck:unused && npm run lint && npm run test:unit",
"test:unit": "mkdir -p reports/ && NODE_ENV=test multi='spec=- xunit=reports/mocha-xunit.xml' istanbul cover _mocha -- -R mocha-multi --timeout 10000 --slow 750 && istanbul check-coverage"
"test:unit": "mkdir -p reports/ && NODE_ENV=test multi='spec=- xunit=reports/mocha-xunit.xml' istanbul cover _mocha -- -R mocha-multi --exit --timeout 10000 --slow 750 && istanbul check-coverage"
},
"engines": {
"node": ">= 0.10.x <10.0.0"
"node": ">= 6.0.0"
},
"dependencies": {
"google-protobuf": "^3.3.0",
"nats": "^1.0.0",
"nuid": "^1.0.0"
},
"devDependencies": {
"coveralls": "^2.11.2",
"coveralls": "^3.0.2",
"dependency-check": "2.6.x",
"istanbul": "^0.4.5",
"jshint": "^2.9.5",
"jshint": "^2.9.6",
"jshint-stylish": "^2.2.1",
"mocha": "^3.0.2",
"mocha": "^5.2.0",
"mocha-lcov-reporter": "1.2.x",
"mocha-multi": "^0.9.1",
"mocha-multi": "^1.0.1",
"should": "^11.2.1"
},
"typings": "./index.d.ts"
Expand Down