Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

fix(NA): install library from branch #208

Merged
merged 6 commits into from
Jul 7, 2017
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
4 changes: 1 addition & 3 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
src
node_modules
dist/test
dist/test
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Changelog

### vNEXT
- Fix to make library able to be installed from a branch [PR #208](https://github.com/apollographql/subscriptions-transport-ws/pull/208)
- Fix for non forced closes (now it wont send connection_terminate) [PR #197](https://github.com/apollographql/subscriptions-transport-ws/pull/197)
- A lot of connection's flow improvements (on connect, on disconnect and on reconnect) [PR #197](https://github.com/apollographql/subscriptions-transport-ws/pull/197)
- Require specific lodash/assign module instead of entire package, so memory impact is reduced [PR #196](https://github.com/apollographql/subscriptions-transport-ws/pull/196)

- docs(README): Fix onEvent(eventName, callback, thisContext) list of eventName [PR #205](https://github.com/apollographql/subscriptions-transport-ws/pull/205)


### 0.7.3
- Fix for first subscription is never unsubscribed [PR #179](https://github.com/apollographql/subscriptions-transport-ws/pull/179)

Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"url": "git+https://github.com/apollostack/subscriptions-transport-ws.git"
},
"dependencies": {
"@types/ws": "^3.0.0",
"backo2": "^1.0.2",
"eventemitter3": "^2.0.3",
"graphql-subscriptions": "^0.4.4",
Expand All @@ -31,7 +30,8 @@
"coverage": "node ./node_modules/istanbul/lib/cli.js cover _mocha -- --full-trace ./dist/test/tests.js",
"postcoverage": "remap-istanbul --input coverage/coverage.raw.json --type lcovonly --output coverage/lcov.info",
"browser-compile": "webpack --config \"./unpkg-webpack.config.js\"",
"prepublish": "npm run compile && npm run browser-compile"
"prepublishOnly": "npm run compile && npm run browser-compile && rimraf src",
"postinstall": "node scripts/post-install.js"
},
"devDependencies": {
"@types/chai": "^4.0.0",
Expand All @@ -40,12 +40,14 @@
"@types/mocha": "^2.2.41",
"@types/node": "^8.0.8",
"@types/sinon": "^2.3.0",
"@types/ws": "^3.0.0",
"chai": "^4.0.2",
"graphql": "^0.10.1",
"istanbul": "^1.0.0-alpha.2",
"lodash": "^4.17.1",
"mocha": "^3.4.2",
"remap-istanbul": "^0.9.5",
"rimraf": "^2.6.1",
"sinon": "^2.3.6",
"tslint": "^5.5.0",
"typescript": "^2.4.1",
Expand Down
21 changes: 21 additions & 0 deletions scripts/post-install.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env node
'use strict';

var execSync = require('child_process').execSync;
var stat = require('fs').stat;

function exec(command) {
execSync(command, {
stdio: [0, 1, 2]
});
}

stat('dist', function(error, stat) {
if (process && process.env && process.env.npm_config_only !== 'dev') {
exec('npm install --only=dev');
}

if (error || !stat.isDirectory()) {
exec('npm run compile && npm run browser-compile && rimraf src');
}
});
5 changes: 4 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
"pretty": true,
"declaration": true,
"skipLibCheck": true,
"lib": ["es6", "esnext"]
"lib": ["es6", "esnext"],
"types": [
"node"
]
},
"exclude": [
"node_modules",
Expand Down