Skip to content

Commit d2cb54e

Browse files
committed
chore(package): update and remove unnecessary deps
1 parent 6553310 commit d2cb54e

28 files changed

+102
-118
lines changed

circle.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ test:
1818
override:
1919
- ./scripts/run-ci.sh ./scripts/prepare.sh
2020
- ./scripts/run-ci.sh ./scripts/lint.sh
21-
- ./scripts/run-ci.sh ./scripts/node-matrix.sh ./scripts/prepare.sh ./scripts/test-unit.sh ./scripts/test-cover.sh ./scripts/test-e2e.sh && ./scripts/run-ci.sh ./scripts/test-instrumentations.sh:
21+
- ./scripts/run-ci.sh ./scripts/node-matrix.sh ./scripts/prepare.sh ./scripts/test-unit.sh ./scripts/test-coverage.sh ./scripts/test-e2e.sh && ./scripts/run-ci.sh ./scripts/test-instrumentations.sh:
2222
parallel: true
2323

2424
deployment:

package.json

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,17 @@
2222
},
2323
"main": "lib/index.js",
2424
"scripts": {
25-
"lint": "eslint lib example e2e",
25+
"install": "npm i @risingstack/v8-profiler --build-from-source || exit 0",
26+
"lint": "./scripts/lint.sh",
2627
"test": "npm run test-unit",
27-
"test-e2e": "cd ./test/e2e && npm test",
2828
"test-unit": "mocha 'lib/**/*.spec.js'",
29-
"test-cls": "cd ./test/instrumentations && npm run test-cls",
30-
"test-module": "cd ./test/instrumentations && npm run test-e2e",
31-
"cover": "istanbul cover _mocha 'lib/**/*.spec.js'",
32-
"changelog": "conventional-changelog -p angular -o CHANGELOG.md -r 500",
29+
"test-e2e": "./scripts/test-e2e.sh",
30+
"test-instrumentations": "./scripts/test-instrumentations.sh",
31+
"test-coverage": "./scripts/test-coverage.sh",
3332
"semantic-release": "semantic-release pre && npm publish && semantic-release post",
3433
"semantic-release-pre": "semantic-release pre",
3534
"semantic-release-post": "semantic-release post",
36-
"install": "npm i @risingstack/v8-profiler --build-from-source || exit 0"
35+
"which": "which"
3736
},
3837
"repository": {
3938
"type": "git",
@@ -42,12 +41,15 @@
4241
"bugs": {
4342
"url": "https://github.com/RisingStack/trace-nodejs/issues"
4443
},
44+
"engines": {
45+
"node": ">=0.12"
46+
},
4547
"dependencies": {
4648
"bl": "1.2.0",
4749
"continuation-local-storage": "3.2.0",
48-
"debug": "2.6.0",
50+
"debug": "2.6.1",
4951
"https-proxy-agent": "1.0.0",
50-
"js-yaml": "3.7.0",
52+
"js-yaml": "3.8.1",
5153
"json-stringify-safe": "5.0.1",
5254
"lodash.assign": "4.2.0",
5355
"lodash.defaults": "4.2.0",
@@ -58,11 +60,11 @@
5860
"lodash.isnumber": "3.0.3",
5961
"lodash.uniq": "4.5.0",
6062
"lodash.remove": "4.7.0",
61-
"lodash.some": "^4.6.0",
62-
"qs": "6.3.0",
63+
"lodash.some": "4.6.0",
64+
"qs": "6.3.1",
6365
"semver": "5.3.0",
6466
"sync-request": "3.0.1",
65-
"uuid": "^3.0.1"
67+
"uuid": "3.0.1"
6668
},
6769
"optionalDependencies": {
6870
"microtime": "2.1.2",
@@ -71,20 +73,20 @@
7173
"@risingstack/v8-profiler": "5.7.0"
7274
},
7375
"devDependencies": {
74-
"chai": "3.5.0",
75-
"conventional-changelog": "1.1.0",
76-
"eslint": "2.10.2",
77-
"eslint-config-standard": "5.3.1",
78-
"eslint-plugin-promise": "1.0.8",
79-
"eslint-plugin-standard": "1.3.2",
80-
"istanbul": "0.4.5",
81-
"lodash.defaultsdeep": "^4.5.1",
82-
"mocha": "3.2.0",
83-
"nock": "9.0.2",
84-
"pre-commit": "1.2.1",
85-
"semantic-release": "6.3.2",
86-
"sinon": "1.17.6",
87-
"sinon-chai": "2.8.0"
76+
"chai": "^3.5.0",
77+
"conventional-changelog": "^1.1.0",
78+
"eslint": "^3.15.0",
79+
"eslint-config-standard": "^6.2.1",
80+
"eslint-plugin-promise": "^3.4.1",
81+
"eslint-plugin-standard": "^2.0.1",
82+
"istanbul": "^0.4.5",
83+
"lodash": "^4.17.4",
84+
"mocha": "^3.2.0",
85+
"nock": "^9.0.6",
86+
"pre-commit": "^1.2.2",
87+
"semantic-release": "^6.3.2",
88+
"sinon": "^1.17.7",
89+
"sinon-chai": "^2.8.0"
8890
},
8991
"pre-commit": [
9092
"lint",

scripts/lint.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@ source ./scripts/util/env-node.sh
55

66
nvm use $NODE_VERSION
77

8-
npm run lint
8+
eslint=$(npm run which --loglevel silent -- eslint)
9+
10+
$eslint lib example test

scripts/prepare.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,3 @@ nvm use $NODE_VERSION
77

88
rm -rf node_modules
99
npm install >/dev/null
10-
npm link >/dev/null 2>&1

scripts/test-cover.sh renamed to scripts/test-coverage.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env bash
22
set -e
3+
source ./scripts/util/env-essential.sh
34
source ./scripts/util/env-node.sh
45

56
nvm use $NODE_VERSION
@@ -10,4 +11,7 @@ else
1011
dir=./coverage/v$NODE_VERSION
1112
fi
1213

13-
npm run cover -- --dir $dir
14+
istanbul=$(npm run which --loglevel silent -- istanbul)
15+
mocha=$(npm run which --loglevel silent -- _mocha)
16+
17+
$istanbul cover $mocha 'lib/**/*.spec.js' --dir $dir

scripts/test-instrumentations.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#!/usr/bin/env bash
22
set -e
3+
source ./scripts/util/env-essential.sh
34
source ./scripts/util/env-node.sh
45

56
nvm use $NODE_VERSION_FW
67

78
if [[ -z $INSTR_TARGET_VERSIONS ]]; then
8-
INSTR_TARGET_VERSIONS=some
9+
INSTR_TARGET_VERSIONS=one
910
fi
1011

1112
cd ./test/instrumentations

test/e2e/apiCalls.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ apiCalls.forEach(function (name) {
8080
}
8181
}
8282
})
83-
require('@risingstack/trace')
83+
require('../..')
8484
t.pass('Trace loaded into server')
8585
// http server
8686
var app = express()

test/e2e/clientUnreachable.spec.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ var cpOpts = {
2525
}
2626
}
2727

28-
2928
test('client Unreachable',
3029
{
3130
// FIXME: I patched nock, so it can gunzip requests on appropriate
@@ -36,11 +35,11 @@ test('client Unreachable',
3635
timeout: TEST_TIMEOUT,
3736
childProcessOpts: cpOpts
3837
}, function (t) {
39-
var timesCalled = 0
4038
serviceMocks.mockServiceKeyRequest({
4139
url: TRACE_COLLECTOR_API_URL,
4240
apiKey: TRACE_API_KEY,
4341
callback: function () {
42+
t.pass('Service key requested')
4443
return [200, { key: TEST_TRACE_SERVICE_KEY }]
4544
}
4645
})
@@ -54,7 +53,7 @@ test('client Unreachable',
5453
process.exit(0)
5554
}
5655
})
57-
require('@risingstack/trace')
56+
require('../..')
5857
t.pass('Trace loaded into server')
5958
// http server
6059
var app = express()

test/e2e/crash/index.spec.js

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,29 @@
1-
'use strict'
2-
3-
var express = require('express')
4-
var bodyParser = require('body-parser')
5-
var test = require('tape')
6-
var spawnSync = require('spawn-sync')
7-
var defaultsDeep = require('lodash.defaultsdeep')
8-
var path = require('path')
9-
// var semver = require('semver')
10-
11-
var TRACE_API_KEY = 'headers.payload.signature'
12-
var TRACE_SERVICE_NAME = 'service-name'
13-
var TEST_WEB_SERVER_PORT = process.env.TEST_WEBSERVER_PORT || 44332
14-
var TEST_TIMEOUT = 10000
15-
16-
var env = {
17-
TRACE_API_KEY: TRACE_API_KEY,
18-
TRACE_SERVICE_NAME: TRACE_SERVICE_NAME,
19-
TRACE_COLLECT_INTERVAL: 100,
20-
TRACE_UPDATE_INTERVAL: 100000,
21-
TRACE_COLLECTOR_API_URL: 'http://127.0.0.1:' + TEST_WEB_SERVER_PORT
22-
}
23-
1+
// 'use strict'
2+
//
3+
// var express = require('express')
4+
// var bodyParser = require('body-parser')
5+
// var test = require('tape')
6+
// var spawnSync = require('spawn-sync')
7+
// var defaultsDeep = require('lodash').defaultsDeep
8+
// var path = require('path')
9+
// // var semver = require('semver')
10+
//
11+
// var TRACE_API_KEY = 'headers.payload.signature'
12+
// var TRACE_SERVICE_NAME = 'service-name'
13+
// var TEST_WEB_SERVER_PORT = process.env.TEST_WEBSERVER_PORT || 44332
14+
// var TEST_TIMEOUT = 10000
15+
//
16+
// var env = {
17+
// TRACE_API_KEY: TRACE_API_KEY,
18+
// TRACE_SERVICE_NAME: TRACE_SERVICE_NAME,
19+
// TRACE_COLLECT_INTERVAL: 100,
20+
// TRACE_UPDATE_INTERVAL: 100000,
21+
// TRACE_COLLECTOR_API_URL: 'http://127.0.0.1:' + TEST_WEB_SERVER_PORT
22+
// }
23+
//
2424
// test('should report crash', {
2525
// timeout: TEST_TIMEOUT,
26-
// skip: true
27-
// // skip: !semver.satisfies(process.version, '>= 6')
26+
// skip: true // !semver.satisfies(process.version, '>= 6')
2827
// }, function (t) {
2928
// var app = express()
3029
// app.use(bodyParser.json())

test/e2e/crash/testee.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
require('@risingstack/trace')
1+
require('../../..')
22
not.exist() // eslint-disable-line

0 commit comments

Comments
 (0)