From 4b7d14c1ad740570060e35fc5b7c88e46a2772d5 Mon Sep 17 00:00:00 2001 From: Ken Ashcraft Date: Wed, 27 Mar 2019 15:50:01 -0700 Subject: [PATCH] Use ts-mocha to run tests (#444) * Use ts-mocha to run tests * Add compile step to CI * Update all packages to use ts-mocha * Fix typo around pjsonVersion * Delete spurious blank line * Get .ts coverage for all packages * Undo changes to opencensus-nodejs/package.json. It needs to be compiled to .js to get the tests to pass. * Undo ts-mocha for redis package * Don't use ts-mocha for ocagent * Revert package-lock.json and ocagent.ts since we aren't going to change package.json as part of this PR. * Remove unnecessary nyc block * Undo changes to package-lock.json * Handle templatesDir --- .circleci/config.yml | 3 + packages/opencensus-core/package-lock.json | 86 +++++++++++ packages/opencensus-core/package.json | 14 +- .../opencensus-core/src/common/version.ts | 13 +- .../package-lock.json | 86 +++++++++++ .../opencensus-exporter-instana/package.json | 14 +- .../package-lock.json | 65 +++++++++ .../opencensus-exporter-jaeger/package.json | 14 +- .../opencensus-exporter-jaeger/src/jaeger.ts | 14 +- .../package-lock.json | 86 +++++++++++ .../package.json | 14 +- .../package-lock.json | 86 +++++++++++ .../package.json | 14 +- .../package-lock.json | 86 +++++++++++ .../opencensus-exporter-zipkin/package.json | 14 +- .../package-lock.json | 134 +++++++++++------- .../opencensus-exporter-zpages/package.json | 14 +- .../page-handlers/rpcz.page-handler.ts | 3 +- .../page-handlers/statsz.page-handler.ts | 3 +- .../page-handlers/templates-dir.ts | 28 ++++ .../traceconfigz.page-handler.ts | 4 +- .../page-handlers/tracez.page-handler.ts | 5 +- .../package-lock.json | 86 +++++++++++ .../package.json | 14 +- .../package-lock.json | 86 +++++++++++ .../package.json | 14 +- .../package-lock.json | 86 +++++++++++ .../package.json | 14 +- .../package-lock.json | 86 +++++++++++ .../package.json | 14 +- .../package-lock.json | 86 +++++++++++ .../package.json | 14 +- .../package-lock.json | 86 +++++++++++ .../package.json | 14 +- .../package-lock.json | 86 +++++++++++ .../opencensus-propagation-b3/package.json | 14 +- .../package-lock.json | 65 +++++++++ .../package.json | 14 +- .../package-lock.json | 86 +++++++++++ .../package.json | 14 +- .../package-lock.json | 89 ++++++++++++ .../package.json | 4 +- .../package-lock.json | 86 +++++++++++ .../package.json | 14 +- .../package-lock.json | 100 +++++++++++-- .../opencensus-resource-util/package.json | 14 +- 46 files changed, 1877 insertions(+), 109 deletions(-) create mode 100644 packages/opencensus-exporter-zpages/src/zpages-frontend/page-handlers/templates-dir.ts diff --git a/.circleci/config.yml b/.circleci/config.yml index 00c8b0d7d..26eb6dab2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,6 +14,9 @@ unit_tests: &unit_tests - run: name: Install modules and dependencies. command: npm install + - run: + name: Ensure code compiles to JS. + command: npm run compile - run: name: Run unit tests. command: npm run test diff --git a/packages/opencensus-core/package-lock.json b/packages/opencensus-core/package-lock.json index 1ece70b1a..dd3b02938 100644 --- a/packages/opencensus-core/package-lock.json +++ b/packages/opencensus-core/package-lock.json @@ -136,6 +136,12 @@ "@types/node": "*" } }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "optional": true + }, "@types/mocha": { "version": "5.2.5", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.5.tgz", @@ -798,6 +804,12 @@ "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" }, + "deepmerge": { + "version": "2.2.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/deepmerge/-/deepmerge-2.2.1.tgz", + "integrity": "sha1-XT/yKgHAD2RUBaL7wX0HeKGAEXA=", + "optional": true + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -1851,6 +1863,23 @@ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, + "json5": { + "version": "1.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/json5/-/json5-1.0.1.tgz", + "integrity": "sha1-d5+wAYYE+oVOrL9iUhgNg1Q+Pb4=", + "optional": true, + "requires": { + "minimist": "^1.2.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "optional": true + } + } + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -4121,6 +4150,42 @@ "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, + "ts-mocha": { + "version": "6.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-mocha/-/ts-mocha-6.0.0.tgz", + "integrity": "sha1-QLjFRi/85vXc7l/3KWVbKVjyblA=", + "requires": { + "ts-node": "7.0.1", + "tsconfig-paths": "^3.5.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "ts-node": { + "version": "7.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-node/-/ts-node-7.0.1.tgz", + "integrity": "sha1-lWLcLR5tJI0kvFX3c+P2FDN9m68=", + "requires": { + "arrify": "^1.0.0", + "buffer-from": "^1.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.6", + "yn": "^2.0.0" + } + }, + "yn": { + "version": "2.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/yn/-/yn-2.0.0.tgz", + "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=" + } + } + }, "ts-node": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.0.2.tgz", @@ -4133,6 +4198,27 @@ "yn": "^3.0.0" } }, + "tsconfig-paths": { + "version": "3.8.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/tsconfig-paths/-/tsconfig-paths-3.8.0.tgz", + "integrity": "sha1-TjQgLVtBlY8mnPVrAe2VuFPVn3I=", + "optional": true, + "requires": { + "@types/json5": "^0.0.29", + "deepmerge": "^2.0.1", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "optional": true + } + } + }, "tslib": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", diff --git a/packages/opencensus-core/package.json b/packages/opencensus-core/package.json index 70cf84634..8ea2385e6 100644 --- a/packages/opencensus-core/package.json +++ b/packages/opencensus-core/package.json @@ -6,7 +6,7 @@ "types": "build/src/index.d.ts", "repository": "census-instrumentation/opencensus-node", "scripts": { - "test": "nyc mocha build/test/**/*.js", + "test": "nyc ts-mocha -p ./tsconfig.json test/**/*.ts", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json", "clean": "rimraf build/*", "check": "gts check", @@ -14,7 +14,6 @@ "compile:release": "tsc -p tsconfig-release.json", "fix": "gts fix", "prepare": "npm run compile:release", - "pretest": "npm run compile", "posttest": "npm run check" }, "keywords": [ @@ -38,6 +37,16 @@ "LICENSE", "README.md" ], + "nyc": { + "extension": [ + ".ts", + ".tsx" + ], + "exclude": [ + "**/*.d.ts" + ], + "all": true + }, "publishConfig": { "access": "public" }, @@ -54,6 +63,7 @@ "intercept-stdout": "^0.1.2", "mocha": "^6.0.0", "nyc": "13.3.0", + "ts-mocha": "^6.0.0", "ts-node": "^8.0.0", "typescript": "~2.9.0" }, diff --git a/packages/opencensus-core/src/common/version.ts b/packages/opencensus-core/src/common/version.ts index 2dc170f29..885c86889 100644 --- a/packages/opencensus-core/src/common/version.ts +++ b/packages/opencensus-core/src/common/version.ts @@ -20,9 +20,16 @@ type Package = { }; // Load the package details. Note that the `require` is performed at runtime, -// which means the source files will be in the `/build` directory, so the -// package path is relative to that location. -const pjson: Package = require('../../../package.json'); +// which means package.json will be relative to the location of this file. +// If this file has been compiled, it will be in the `/build` directory, so the +// package path is relative to that location. Otherwise, it will be relative +// to the original .ts file. +let pjson: Package; +try { + pjson = require('../../../package.json'); +} catch { + pjson = require('../../package.json'); +} // Export the core package version export const version: string = pjson.version; diff --git a/packages/opencensus-exporter-instana/package-lock.json b/packages/opencensus-exporter-instana/package-lock.json index 2db57bb29..47fa59fb8 100644 --- a/packages/opencensus-exporter-instana/package-lock.json +++ b/packages/opencensus-exporter-instana/package-lock.json @@ -128,6 +128,12 @@ "to-fast-properties": "^2.0.0" } }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "optional": true + }, "@types/mocha": { "version": "5.2.5", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.5.tgz", @@ -798,6 +804,12 @@ "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" }, + "deepmerge": { + "version": "2.2.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/deepmerge/-/deepmerge-2.2.1.tgz", + "integrity": "sha1-XT/yKgHAD2RUBaL7wX0HeKGAEXA=", + "optional": true + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -1834,6 +1846,23 @@ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, + "json5": { + "version": "1.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/json5/-/json5-1.0.1.tgz", + "integrity": "sha1-d5+wAYYE+oVOrL9iUhgNg1Q+Pb4=", + "optional": true, + "requires": { + "minimist": "^1.2.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "optional": true + } + } + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -4091,6 +4120,42 @@ "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, + "ts-mocha": { + "version": "6.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-mocha/-/ts-mocha-6.0.0.tgz", + "integrity": "sha1-QLjFRi/85vXc7l/3KWVbKVjyblA=", + "requires": { + "ts-node": "7.0.1", + "tsconfig-paths": "^3.5.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "ts-node": { + "version": "7.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-node/-/ts-node-7.0.1.tgz", + "integrity": "sha1-lWLcLR5tJI0kvFX3c+P2FDN9m68=", + "requires": { + "arrify": "^1.0.0", + "buffer-from": "^1.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.6", + "yn": "^2.0.0" + } + }, + "yn": { + "version": "2.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/yn/-/yn-2.0.0.tgz", + "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=" + } + } + }, "ts-node": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.0.2.tgz", @@ -4103,6 +4168,27 @@ "yn": "^3.0.0" } }, + "tsconfig-paths": { + "version": "3.8.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/tsconfig-paths/-/tsconfig-paths-3.8.0.tgz", + "integrity": "sha1-TjQgLVtBlY8mnPVrAe2VuFPVn3I=", + "optional": true, + "requires": { + "@types/json5": "^0.0.29", + "deepmerge": "^2.0.1", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "optional": true + } + } + }, "tslib": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", diff --git a/packages/opencensus-exporter-instana/package.json b/packages/opencensus-exporter-instana/package.json index 6b20d165d..876e3cb20 100644 --- a/packages/opencensus-exporter-instana/package.json +++ b/packages/opencensus-exporter-instana/package.json @@ -6,14 +6,13 @@ "types": "build/src/index.d.ts", "repository": "census-instrumentation/opencensus-node", "scripts": { - "test": "nyc mocha build/test/**/*.js", + "test": "nyc ts-mocha -p ./tsconfig.json test/**/*.ts", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json", "clean": "rimraf build/*", "check": "gts check", "compile": "tsc -p .", "fix": "gts fix", "prepare": "npm run compile", - "pretest": "npm run compile", "posttest": "npm run check" }, "keywords": [ @@ -36,6 +35,16 @@ "LICENSE", "README.md" ], + "nyc": { + "extension": [ + ".ts", + ".tsx" + ], + "exclude": [ + "**/*.d.ts" + ], + "all": true + }, "publishConfig": { "access": "public" }, @@ -48,6 +57,7 @@ "mocha": "^6.0.0", "nock": "^10.0.0", "nyc": "13.3.0", + "ts-mocha": "^6.0.0", "ts-node": "^8.0.0", "typescript": "~3.2.0" }, diff --git a/packages/opencensus-exporter-jaeger/package-lock.json b/packages/opencensus-exporter-jaeger/package-lock.json index 1c039197a..9195c342c 100644 --- a/packages/opencensus-exporter-jaeger/package-lock.json +++ b/packages/opencensus-exporter-jaeger/package-lock.json @@ -128,6 +128,12 @@ "to-fast-properties": "^2.0.0" } }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "optional": true + }, "@types/mocha": { "version": "5.2.5", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.5.tgz", @@ -798,6 +804,12 @@ "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" }, + "deepmerge": { + "version": "2.2.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/deepmerge/-/deepmerge-2.2.1.tgz", + "integrity": "sha1-XT/yKgHAD2RUBaL7wX0HeKGAEXA=", + "optional": true + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -1848,6 +1860,15 @@ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, + "json5": { + "version": "1.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/json5/-/json5-1.0.1.tgz", + "integrity": "sha1-d5+wAYYE+oVOrL9iUhgNg1Q+Pb4=", + "optional": true, + "requires": { + "minimist": "^1.2.0" + } + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -4226,6 +4247,37 @@ "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, + "ts-mocha": { + "version": "6.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-mocha/-/ts-mocha-6.0.0.tgz", + "integrity": "sha1-QLjFRi/85vXc7l/3KWVbKVjyblA=", + "requires": { + "ts-node": "7.0.1", + "tsconfig-paths": "^3.5.0" + }, + "dependencies": { + "ts-node": { + "version": "7.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-node/-/ts-node-7.0.1.tgz", + "integrity": "sha1-lWLcLR5tJI0kvFX3c+P2FDN9m68=", + "requires": { + "arrify": "^1.0.0", + "buffer-from": "^1.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.6", + "yn": "^2.0.0" + } + }, + "yn": { + "version": "2.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/yn/-/yn-2.0.0.tgz", + "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=" + } + } + }, "ts-node": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.0.2.tgz", @@ -4238,6 +4290,19 @@ "yn": "^3.0.0" } }, + "tsconfig-paths": { + "version": "3.8.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/tsconfig-paths/-/tsconfig-paths-3.8.0.tgz", + "integrity": "sha1-TjQgLVtBlY8mnPVrAe2VuFPVn3I=", + "optional": true, + "requires": { + "@types/json5": "^0.0.29", + "deepmerge": "^2.0.1", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + } + }, "tslib": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", diff --git a/packages/opencensus-exporter-jaeger/package.json b/packages/opencensus-exporter-jaeger/package.json index fe379679e..dedb582ae 100644 --- a/packages/opencensus-exporter-jaeger/package.json +++ b/packages/opencensus-exporter-jaeger/package.json @@ -6,14 +6,13 @@ "types": "build/src/index.d.ts", "repository": "census-instrumentation/opencensus-node", "scripts": { - "test": "nyc mocha build/test/**/*.js", + "test": "nyc ts-mocha -p ./tsconfig.json test/**/*.ts", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json", "clean": "rimraf build/*", "check": "gts check", "compile": "tsc -p .", "fix": "gts fix", "prepare": "npm run compile", - "pretest": "npm run compile", "posttest": "npm run check" }, "keywords": [ @@ -35,6 +34,16 @@ "LICENSE", "README.md" ], + "nyc": { + "extension": [ + ".ts", + ".tsx" + ], + "exclude": [ + "**/*.d.ts" + ], + "all": true + }, "publishConfig": { "access": "public" }, @@ -48,6 +57,7 @@ "nock": "^10.0.0", "nyc": "^13.0.0", "rimraf": "^2.6.2", + "ts-mocha": "^6.0.0", "ts-node": "^8.0.0", "typescript": "~3.2.0" }, diff --git a/packages/opencensus-exporter-jaeger/src/jaeger.ts b/packages/opencensus-exporter-jaeger/src/jaeger.ts index a4f833809..2a630994e 100644 --- a/packages/opencensus-exporter-jaeger/src/jaeger.ts +++ b/packages/opencensus-exporter-jaeger/src/jaeger.ts @@ -33,6 +33,17 @@ export interface JaegerTraceExporterOptions extends ExporterConfig { maxPacketSize?: number; } +// Load the package details. Note that the `require` is performed at runtime, +// which means package.json will be relative to the location of this file. +// If this file has been compiled, it will be in the `/build` directory, so the +// package path is relative to that location. Otherwise, it will be relative +// to the original .ts file. +let pjsonVersion: string; +try { + pjsonVersion = require('../../package.json'); +} catch { + pjsonVersion = require('../package.json'); +} /** Format and sends span information to Jaeger */ export class JaegerTraceExporter implements Exporter { @@ -60,7 +71,6 @@ export class JaegerTraceExporter implements Exporter { constructor(options: JaegerTraceExporterOptions) { - const pjson = require('../../package.json'); this.logger = options.logger || logger.logger(); this.bufferTimeout = options.bufferTimeout || DEFAULT_BUFFER_FLUSH_INTERVAL_MILLIS; @@ -71,7 +81,7 @@ export class JaegerTraceExporter implements Exporter { const defaultTags: Record = {}; defaultTags[JaegerTraceExporter .JAEGER_OPENCENSUS_EXPORTER_VERSION_TAG_KEY] = - `opencensus-exporter-jaeger-${pjson.version}`; + `opencensus-exporter-jaeger-${pjsonVersion}`; defaultTags[JaegerTraceExporter.TRACER_HOSTNAME_TAG_KEY] = os.hostname(); defaultTags[JaegerTraceExporter.PROCESS_IP] = Utils.ipToInt(Utils.myIp()); diff --git a/packages/opencensus-exporter-prometheus/package-lock.json b/packages/opencensus-exporter-prometheus/package-lock.json index 0f8ad7650..ba4b2eab0 100644 --- a/packages/opencensus-exporter-prometheus/package-lock.json +++ b/packages/opencensus-exporter-prometheus/package-lock.json @@ -187,6 +187,12 @@ "@types/range-parser": "*" } }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "optional": true + }, "@types/mime": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-2.0.0.tgz", @@ -907,6 +913,12 @@ "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" }, + "deepmerge": { + "version": "2.2.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/deepmerge/-/deepmerge-2.2.1.tgz", + "integrity": "sha1-XT/yKgHAD2RUBaL7wX0HeKGAEXA=", + "optional": true + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -2088,6 +2100,23 @@ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, + "json5": { + "version": "1.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/json5/-/json5-1.0.1.tgz", + "integrity": "sha1-d5+wAYYE+oVOrL9iUhgNg1Q+Pb4=", + "optional": true, + "requires": { + "minimist": "^1.2.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "optional": true + } + } + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -4578,6 +4607,42 @@ "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, + "ts-mocha": { + "version": "6.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-mocha/-/ts-mocha-6.0.0.tgz", + "integrity": "sha1-QLjFRi/85vXc7l/3KWVbKVjyblA=", + "requires": { + "ts-node": "7.0.1", + "tsconfig-paths": "^3.5.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "ts-node": { + "version": "7.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-node/-/ts-node-7.0.1.tgz", + "integrity": "sha1-lWLcLR5tJI0kvFX3c+P2FDN9m68=", + "requires": { + "arrify": "^1.0.0", + "buffer-from": "^1.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.6", + "yn": "^2.0.0" + } + }, + "yn": { + "version": "2.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/yn/-/yn-2.0.0.tgz", + "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=" + } + } + }, "ts-node": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.0.2.tgz", @@ -4590,6 +4655,27 @@ "yn": "^3.0.0" } }, + "tsconfig-paths": { + "version": "3.8.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/tsconfig-paths/-/tsconfig-paths-3.8.0.tgz", + "integrity": "sha1-TjQgLVtBlY8mnPVrAe2VuFPVn3I=", + "optional": true, + "requires": { + "@types/json5": "^0.0.29", + "deepmerge": "^2.0.1", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "optional": true + } + } + }, "tslib": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", diff --git a/packages/opencensus-exporter-prometheus/package.json b/packages/opencensus-exporter-prometheus/package.json index 097264bf4..57ca11a40 100644 --- a/packages/opencensus-exporter-prometheus/package.json +++ b/packages/opencensus-exporter-prometheus/package.json @@ -6,14 +6,13 @@ "types": "build/src/index.d.ts", "repository": "census-instrumentation/opencensus-node", "scripts": { - "test": "nyc mocha build/test/**/*.js", + "test": "nyc ts-mocha -p ./tsconfig.json test/**/*.ts", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json", "clean": "rimraf build/*", "check": "gts check", "compile": "tsc -p .", "fix": "gts fix", "prepare": "npm run compile", - "pretest": "npm run compile", "posttest": "npm run check" }, "keywords": [ @@ -36,6 +35,16 @@ "LICENSE", "README.md" ], + "nyc": { + "extension": [ + ".ts", + ".tsx" + ], + "exclude": [ + "**/*.d.ts" + ], + "all": true + }, "publishConfig": { "access": "public" }, @@ -48,6 +57,7 @@ "gts": "^0.9.0", "mocha": "^6.0.0", "nyc": "^13.0.0", + "ts-mocha": "^6.0.0", "ts-node": "^8.0.0", "typescript": "~3.2.0" }, diff --git a/packages/opencensus-exporter-stackdriver/package-lock.json b/packages/opencensus-exporter-stackdriver/package-lock.json index d8d226de8..e632f8cd4 100644 --- a/packages/opencensus-exporter-stackdriver/package-lock.json +++ b/packages/opencensus-exporter-stackdriver/package-lock.json @@ -145,6 +145,12 @@ } } }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "optional": true + }, "@types/mocha": { "version": "5.2.5", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.5.tgz", @@ -833,6 +839,12 @@ "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" }, + "deepmerge": { + "version": "2.2.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/deepmerge/-/deepmerge-2.2.1.tgz", + "integrity": "sha1-XT/yKgHAD2RUBaL7wX0HeKGAEXA=", + "optional": true + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -2037,6 +2049,23 @@ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, + "json5": { + "version": "1.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/json5/-/json5-1.0.1.tgz", + "integrity": "sha1-d5+wAYYE+oVOrL9iUhgNg1Q+Pb4=", + "optional": true, + "requires": { + "minimist": "^1.2.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "optional": true + } + } + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -4420,6 +4449,42 @@ "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, + "ts-mocha": { + "version": "6.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-mocha/-/ts-mocha-6.0.0.tgz", + "integrity": "sha1-QLjFRi/85vXc7l/3KWVbKVjyblA=", + "requires": { + "ts-node": "7.0.1", + "tsconfig-paths": "^3.5.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "ts-node": { + "version": "7.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-node/-/ts-node-7.0.1.tgz", + "integrity": "sha1-lWLcLR5tJI0kvFX3c+P2FDN9m68=", + "requires": { + "arrify": "^1.0.0", + "buffer-from": "^1.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.6", + "yn": "^2.0.0" + } + }, + "yn": { + "version": "2.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/yn/-/yn-2.0.0.tgz", + "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=" + } + } + }, "ts-node": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.0.2.tgz", @@ -4432,6 +4497,27 @@ "yn": "^3.0.0" } }, + "tsconfig-paths": { + "version": "3.8.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/tsconfig-paths/-/tsconfig-paths-3.8.0.tgz", + "integrity": "sha1-TjQgLVtBlY8mnPVrAe2VuFPVn3I=", + "optional": true, + "requires": { + "@types/json5": "^0.0.29", + "deepmerge": "^2.0.1", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "optional": true + } + } + }, "tslib": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", diff --git a/packages/opencensus-exporter-stackdriver/package.json b/packages/opencensus-exporter-stackdriver/package.json index 03ab98e7a..cf35da88e 100644 --- a/packages/opencensus-exporter-stackdriver/package.json +++ b/packages/opencensus-exporter-stackdriver/package.json @@ -6,14 +6,13 @@ "types": "build/src/index.d.ts", "repository": "census-instrumentation/opencensus-node", "scripts": { - "test": "nyc mocha build/test/**/*.js", + "test": "nyc ts-mocha -p ./tsconfig.json test/**/*.ts", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json", "clean": "rimraf build/*", "check": "gts check", "compile": "tsc -p .", "fix": "gts fix", "prepare": "npm run compile", - "pretest": "npm run compile; cp -r ./test/fixtures ./build/test/", "posttest": "npm run check" }, "keywords": [ @@ -37,6 +36,16 @@ "LICENSE", "README.md" ], + "nyc": { + "extension": [ + ".ts", + ".tsx" + ], + "exclude": [ + "**/*.d.ts" + ], + "all": true + }, "publishConfig": { "access": "public" }, @@ -49,6 +58,7 @@ "mocha": "^6.0.0", "nock": "^10.0.0", "nyc": "^13.0.0", + "ts-mocha": "^6.0.0", "ts-node": "^8.0.0", "typescript": "~3.1.0" }, diff --git a/packages/opencensus-exporter-zipkin/package-lock.json b/packages/opencensus-exporter-zipkin/package-lock.json index a6516bd52..566ccb01a 100644 --- a/packages/opencensus-exporter-zipkin/package-lock.json +++ b/packages/opencensus-exporter-zipkin/package-lock.json @@ -128,6 +128,12 @@ "to-fast-properties": "^2.0.0" } }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "optional": true + }, "@types/mocha": { "version": "5.2.5", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.5.tgz", @@ -793,6 +799,12 @@ "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" }, + "deepmerge": { + "version": "2.2.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/deepmerge/-/deepmerge-2.2.1.tgz", + "integrity": "sha1-XT/yKgHAD2RUBaL7wX0HeKGAEXA=", + "optional": true + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -1842,6 +1854,23 @@ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, + "json5": { + "version": "1.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/json5/-/json5-1.0.1.tgz", + "integrity": "sha1-d5+wAYYE+oVOrL9iUhgNg1Q+Pb4=", + "optional": true, + "requires": { + "minimist": "^1.2.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "optional": true + } + } + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -4091,6 +4120,42 @@ "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, + "ts-mocha": { + "version": "6.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-mocha/-/ts-mocha-6.0.0.tgz", + "integrity": "sha1-QLjFRi/85vXc7l/3KWVbKVjyblA=", + "requires": { + "ts-node": "7.0.1", + "tsconfig-paths": "^3.5.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "ts-node": { + "version": "7.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-node/-/ts-node-7.0.1.tgz", + "integrity": "sha1-lWLcLR5tJI0kvFX3c+P2FDN9m68=", + "requires": { + "arrify": "^1.0.0", + "buffer-from": "^1.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.6", + "yn": "^2.0.0" + } + }, + "yn": { + "version": "2.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/yn/-/yn-2.0.0.tgz", + "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=" + } + } + }, "ts-node": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.0.2.tgz", @@ -4103,6 +4168,27 @@ "yn": "^3.0.0" } }, + "tsconfig-paths": { + "version": "3.8.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/tsconfig-paths/-/tsconfig-paths-3.8.0.tgz", + "integrity": "sha1-TjQgLVtBlY8mnPVrAe2VuFPVn3I=", + "optional": true, + "requires": { + "@types/json5": "^0.0.29", + "deepmerge": "^2.0.1", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "optional": true + } + } + }, "tslib": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", diff --git a/packages/opencensus-exporter-zipkin/package.json b/packages/opencensus-exporter-zipkin/package.json index 8dd0342e9..800f451f0 100644 --- a/packages/opencensus-exporter-zipkin/package.json +++ b/packages/opencensus-exporter-zipkin/package.json @@ -6,14 +6,13 @@ "types": "build/src/index.d.ts", "repository": "census-instrumentation/opencensus-node", "scripts": { - "test": "nyc mocha build/test/**/*.js", + "test": "nyc ts-mocha -p ./tsconfig.json test/**/*.ts", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json", "clean": "rimraf build/*", "check": "gts check", "compile": "tsc -p .", "fix": "gts fix", "prepare": "npm run compile", - "pretest": "npm run compile", "posttest": "npm run check" }, "keywords": [ @@ -35,6 +34,16 @@ "LICENSE", "README.md" ], + "nyc": { + "extension": [ + ".ts", + ".tsx" + ], + "exclude": [ + "**/*.d.ts" + ], + "all": true + }, "publishConfig": { "access": "public" }, @@ -47,6 +56,7 @@ "mocha": "^6.0.0", "nock": "^10.0.0", "nyc": "13.3.0", + "ts-mocha": "^6.0.0", "ts-node": "^8.0.0", "typescript": "~3.2.0" }, diff --git a/packages/opencensus-exporter-zpages/package-lock.json b/packages/opencensus-exporter-zpages/package-lock.json index db475e92e..09686b789 100644 --- a/packages/opencensus-exporter-zpages/package-lock.json +++ b/packages/opencensus-exporter-zpages/package-lock.json @@ -179,6 +179,12 @@ "resolved": "https://registry.npmjs.org/@types/extend/-/extend-3.0.0.tgz", "integrity": "sha512-Eo8NQCbgjlMPQarlFAE3vpyCvFda4dg1Ob5ZJb6BJI9x4NAZVWowyMNB8GJJDgDI4lr2oqiQvXlPB0Fn1NoXnQ==" }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "optional": true + }, "@types/mime": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@types/mime/-/mime-2.0.0.tgz", @@ -889,6 +895,12 @@ "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" }, + "deepmerge": { + "version": "2.2.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/deepmerge/-/deepmerge-2.2.1.tgz", + "integrity": "sha1-XT/yKgHAD2RUBaL7wX0HeKGAEXA=", + "optional": true + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -2068,6 +2080,23 @@ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, + "json5": { + "version": "1.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/json5/-/json5-1.0.1.tgz", + "integrity": "sha1-d5+wAYYE+oVOrL9iUhgNg1Q+Pb4=", + "optional": true, + "requires": { + "minimist": "^1.2.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "optional": true + } + } + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -3655,54 +3684,6 @@ "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" }, - "pkg-dir": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.0.0.tgz", - "integrity": "sha512-1S63UXE5ujsNUTFEgI001K06PkKqNceY07OBdRw24KYs3xvtoG3bkkunIG1p3glRKUjrZYc43opq2Y70R+/Rbw==", - "requires": { - "find-up": "^3.0.0" - }, - "dependencies": { - "find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "requires": { - "locate-path": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", - "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.1.0.tgz", - "integrity": "sha512-H2RyIJ7+A3rjkwKC2l5GGtU4H1vkxKCAGsWasNVd0Set+6i4znxbWy6/j16YDPJDWxhsgZiKAstMEP8wCdSpjA==" - } - } - }, "posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", @@ -4499,6 +4480,42 @@ "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, + "ts-mocha": { + "version": "6.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-mocha/-/ts-mocha-6.0.0.tgz", + "integrity": "sha1-QLjFRi/85vXc7l/3KWVbKVjyblA=", + "requires": { + "ts-node": "7.0.1", + "tsconfig-paths": "^3.5.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "ts-node": { + "version": "7.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-node/-/ts-node-7.0.1.tgz", + "integrity": "sha1-lWLcLR5tJI0kvFX3c+P2FDN9m68=", + "requires": { + "arrify": "^1.0.0", + "buffer-from": "^1.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.6", + "yn": "^2.0.0" + } + }, + "yn": { + "version": "2.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/yn/-/yn-2.0.0.tgz", + "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=" + } + } + }, "ts-node": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.0.2.tgz", @@ -4511,6 +4528,27 @@ "yn": "^3.0.0" } }, + "tsconfig-paths": { + "version": "3.8.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/tsconfig-paths/-/tsconfig-paths-3.8.0.tgz", + "integrity": "sha1-TjQgLVtBlY8mnPVrAe2VuFPVn3I=", + "optional": true, + "requires": { + "@types/json5": "^0.0.29", + "deepmerge": "^2.0.1", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "optional": true + } + } + }, "tslib": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", diff --git a/packages/opencensus-exporter-zpages/package.json b/packages/opencensus-exporter-zpages/package.json index af63c2afb..e588f12aa 100644 --- a/packages/opencensus-exporter-zpages/package.json +++ b/packages/opencensus-exporter-zpages/package.json @@ -6,14 +6,13 @@ "types": "build/src/index.d.ts", "repository": "census-instrumentation/opencensus-node", "scripts": { - "test": "nyc mocha build/test/**/*.js", + "test": "nyc ts-mocha -p ./tsconfig.json test/**/*.ts", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json", "clean": "rimraf build/*", "check": "gts check", "compile": "tsc -p .", "fix": "gts fix", "prepare": "npm run compile", - "pretest": "npm run compile", "posttest": "npm run check" }, "keywords": [ @@ -36,6 +35,16 @@ "LICENSE", "README.md" ], + "nyc": { + "extension": [ + ".ts", + ".tsx" + ], + "exclude": [ + "**/*.d.ts" + ], + "all": true + }, "publishConfig": { "access": "public" }, @@ -52,6 +61,7 @@ "mocha": "^6.0.0", "nyc": "13.3.0", "rimraf": "^2.6.2", + "ts-mocha": "^6.0.0", "ts-node": "^8.0.0", "typescript": "~3.2.0" }, diff --git a/packages/opencensus-exporter-zpages/src/zpages-frontend/page-handlers/rpcz.page-handler.ts b/packages/opencensus-exporter-zpages/src/zpages-frontend/page-handlers/rpcz.page-handler.ts index 3a4823a22..09830cc3b 100644 --- a/packages/opencensus-exporter-zpages/src/zpages-frontend/page-handlers/rpcz.page-handler.ts +++ b/packages/opencensus-exporter-zpages/src/zpages-frontend/page-handlers/rpcz.page-handler.ts @@ -16,10 +16,9 @@ import {AggregationType} from '@opencensus/core'; import * as ejs from 'ejs'; -import * as path from 'path'; import {StatsParams} from '../../zpages'; +import {templatesDir} from './templates-dir'; -const templatesDir = path.join(__dirname, '../../../../templates'); const FIXED_SIZE = 3; export interface ZMeasureOrders { diff --git a/packages/opencensus-exporter-zpages/src/zpages-frontend/page-handlers/statsz.page-handler.ts b/packages/opencensus-exporter-zpages/src/zpages-frontend/page-handlers/statsz.page-handler.ts index a12b0d708..8f2820948 100644 --- a/packages/opencensus-exporter-zpages/src/zpages-frontend/page-handlers/statsz.page-handler.ts +++ b/packages/opencensus-exporter-zpages/src/zpages-frontend/page-handlers/statsz.page-handler.ts @@ -16,6 +16,7 @@ import {AggregationData, AggregationType, TagKey, TagValue, View} from '@opencensus/core'; import {StatsParams} from '../../zpages'; +import {templatesDir} from './templates-dir'; const ejs = require('ejs'); import * as path from 'path'; @@ -201,7 +202,7 @@ export class StatszPageHandler { * file */ private loaderFile(fileName: string): string { - const fileDir = path.join(__dirname, '../../../../templates', fileName); + const fileDir = path.join(templatesDir, fileName); return ejs.fileLoader(fileDir, 'utf8'); } } diff --git a/packages/opencensus-exporter-zpages/src/zpages-frontend/page-handlers/templates-dir.ts b/packages/opencensus-exporter-zpages/src/zpages-frontend/page-handlers/templates-dir.ts new file mode 100644 index 000000000..f7bdb4953 --- /dev/null +++ b/packages/opencensus-exporter-zpages/src/zpages-frontend/page-handlers/templates-dir.ts @@ -0,0 +1,28 @@ +/** + * Copyright 2019 OpenCensus Authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as path from 'path'; + +/** The directory to search for templates. */ +export const templatesDir = function getTemplatesDir() { + // When this file is compiled to JS, it will live in the 'build' dir which + // is a peer of 'templates'. Tests don't compile, so the relative path is + // different. + if (path.basename(path.join(__dirname, '../../..')) === 'build') { + return path.join(__dirname, '../../../../templates'); + } + return path.join(__dirname, '../../../templates'); +}(); diff --git a/packages/opencensus-exporter-zpages/src/zpages-frontend/page-handlers/traceconfigz.page-handler.ts b/packages/opencensus-exporter-zpages/src/zpages-frontend/page-handlers/traceconfigz.page-handler.ts index 3c77daa1f..2f0ba090e 100644 --- a/packages/opencensus-exporter-zpages/src/zpages-frontend/page-handlers/traceconfigz.page-handler.ts +++ b/packages/opencensus-exporter-zpages/src/zpages-frontend/page-handlers/traceconfigz.page-handler.ts @@ -17,10 +17,8 @@ import {SamplerBuilder} from '@opencensus/core'; import * as tracing from '@opencensus/nodejs'; import * as ejs from 'ejs'; -import * as path from 'path'; -// The directory to search for templates. -const templatesDir = path.join(__dirname, '../../../../templates'); +import {templatesDir} from './templates-dir'; export interface TraceConfigzParams { change: string; diff --git a/packages/opencensus-exporter-zpages/src/zpages-frontend/page-handlers/tracez.page-handler.ts b/packages/opencensus-exporter-zpages/src/zpages-frontend/page-handlers/tracez.page-handler.ts index 63dbfeb46..b6fea7643 100644 --- a/packages/opencensus-exporter-zpages/src/zpages-frontend/page-handlers/tracez.page-handler.ts +++ b/packages/opencensus-exporter-zpages/src/zpages-frontend/page-handlers/tracez.page-handler.ts @@ -16,12 +16,9 @@ import {RootSpan, Span} from '@opencensus/core'; import * as ejs from 'ejs'; -import * as path from 'path'; import {LatencyBucketBoundaries} from '../latency-bucket-boundaries'; - -// The directory to search for templates. -const templatesDir = path.join(__dirname, '../../../../templates'); +import {templatesDir} from './templates-dir'; export type TracezParams = { tracename: string; type: string; diff --git a/packages/opencensus-instrumentation-grpc/package-lock.json b/packages/opencensus-instrumentation-grpc/package-lock.json index 67b86d878..e3b541c23 100644 --- a/packages/opencensus-instrumentation-grpc/package-lock.json +++ b/packages/opencensus-instrumentation-grpc/package-lock.json @@ -182,6 +182,12 @@ "resolved": "https://registry.npmjs.org/@protobufjs/utf8/-/utf8-1.1.0.tgz", "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "optional": true + }, "@types/lodash": { "version": "4.14.109", "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.109.tgz", @@ -901,6 +907,12 @@ "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" }, + "deepmerge": { + "version": "2.2.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/deepmerge/-/deepmerge-2.2.1.tgz", + "integrity": "sha1-XT/yKgHAD2RUBaL7wX0HeKGAEXA=", + "optional": true + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -2413,6 +2425,23 @@ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, + "json5": { + "version": "1.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/json5/-/json5-1.0.1.tgz", + "integrity": "sha1-d5+wAYYE+oVOrL9iUhgNg1Q+Pb4=", + "optional": true, + "requires": { + "minimist": "^1.2.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "optional": true + } + } + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -4874,6 +4903,42 @@ "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, + "ts-mocha": { + "version": "6.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-mocha/-/ts-mocha-6.0.0.tgz", + "integrity": "sha1-QLjFRi/85vXc7l/3KWVbKVjyblA=", + "requires": { + "ts-node": "7.0.1", + "tsconfig-paths": "^3.5.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "ts-node": { + "version": "7.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-node/-/ts-node-7.0.1.tgz", + "integrity": "sha1-lWLcLR5tJI0kvFX3c+P2FDN9m68=", + "requires": { + "arrify": "^1.0.0", + "buffer-from": "^1.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.6", + "yn": "^2.0.0" + } + }, + "yn": { + "version": "2.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/yn/-/yn-2.0.0.tgz", + "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=" + } + } + }, "ts-node": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.0.2.tgz", @@ -4886,6 +4951,27 @@ "yn": "^3.0.0" } }, + "tsconfig-paths": { + "version": "3.8.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/tsconfig-paths/-/tsconfig-paths-3.8.0.tgz", + "integrity": "sha1-TjQgLVtBlY8mnPVrAe2VuFPVn3I=", + "optional": true, + "requires": { + "@types/json5": "^0.0.29", + "deepmerge": "^2.0.1", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "optional": true + } + } + }, "tslib": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", diff --git a/packages/opencensus-instrumentation-grpc/package.json b/packages/opencensus-instrumentation-grpc/package.json index fff443970..7e49d3f9e 100644 --- a/packages/opencensus-instrumentation-grpc/package.json +++ b/packages/opencensus-instrumentation-grpc/package.json @@ -6,14 +6,13 @@ "types": "build/src/index.d.ts", "repository": "census-instrumentation/opencensus-node", "scripts": { - "test": "nyc mocha build/test/**/*.js", + "test": "nyc ts-mocha -p ./tsconfig.json test/**/*.ts", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json", "clean": "rimraf build/*", "check": "gts check", "compile": "tsc -p .", "fix": "gts fix", "prepare": "npm run compile", - "pretest": "npm run compile; npm run copy-fixtures", "posttest": "npm run check", "copy-fixtures": "cp -r ./test/fixtures ./build/test/" }, @@ -36,6 +35,16 @@ "LICENSE", "README.md" ], + "nyc": { + "extension": [ + ".ts", + ".tsx" + ], + "exclude": [ + "**/*.d.ts" + ], + "all": true + }, "publishConfig": { "access": "public" }, @@ -51,6 +60,7 @@ "nyc": "^13.0.0", "protobufjs": "^6.8.8", "rimraf": "^2.6.2", + "ts-mocha": "^6.0.0", "ts-node": "^8.0.0", "typescript": "~2.8.3" }, diff --git a/packages/opencensus-instrumentation-http/package-lock.json b/packages/opencensus-instrumentation-http/package-lock.json index 810d05ec9..908176a6a 100644 --- a/packages/opencensus-instrumentation-http/package-lock.json +++ b/packages/opencensus-instrumentation-http/package-lock.json @@ -145,6 +145,12 @@ } } }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "optional": true + }, "@types/mocha": { "version": "5.2.5", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.5.tgz", @@ -828,6 +834,12 @@ "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" }, + "deepmerge": { + "version": "2.2.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/deepmerge/-/deepmerge-2.2.1.tgz", + "integrity": "sha1-XT/yKgHAD2RUBaL7wX0HeKGAEXA=", + "optional": true + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -1877,6 +1889,23 @@ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, + "json5": { + "version": "1.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/json5/-/json5-1.0.1.tgz", + "integrity": "sha1-d5+wAYYE+oVOrL9iUhgNg1Q+Pb4=", + "optional": true, + "requires": { + "minimist": "^1.2.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "optional": true + } + } + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -4229,6 +4258,42 @@ "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, + "ts-mocha": { + "version": "6.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-mocha/-/ts-mocha-6.0.0.tgz", + "integrity": "sha1-QLjFRi/85vXc7l/3KWVbKVjyblA=", + "requires": { + "ts-node": "7.0.1", + "tsconfig-paths": "^3.5.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "ts-node": { + "version": "7.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-node/-/ts-node-7.0.1.tgz", + "integrity": "sha1-lWLcLR5tJI0kvFX3c+P2FDN9m68=", + "requires": { + "arrify": "^1.0.0", + "buffer-from": "^1.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.6", + "yn": "^2.0.0" + } + }, + "yn": { + "version": "2.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/yn/-/yn-2.0.0.tgz", + "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=" + } + } + }, "ts-node": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.0.2.tgz", @@ -4241,6 +4306,27 @@ "yn": "^3.0.0" } }, + "tsconfig-paths": { + "version": "3.8.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/tsconfig-paths/-/tsconfig-paths-3.8.0.tgz", + "integrity": "sha1-TjQgLVtBlY8mnPVrAe2VuFPVn3I=", + "optional": true, + "requires": { + "@types/json5": "^0.0.29", + "deepmerge": "^2.0.1", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "optional": true + } + } + }, "tslib": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", diff --git a/packages/opencensus-instrumentation-http/package.json b/packages/opencensus-instrumentation-http/package.json index 50d824584..946c93a70 100644 --- a/packages/opencensus-instrumentation-http/package.json +++ b/packages/opencensus-instrumentation-http/package.json @@ -6,14 +6,13 @@ "types": "build/src/index.d.ts", "repository": "census-instrumentation/opencensus-node", "scripts": { - "test": "nyc mocha build/test/**/*.js", + "test": "nyc ts-mocha -p ./tsconfig.json test/**/*.ts", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json", "clean": "rimraf build/*", "check": "gts check", "compile": "tsc -p .", "fix": "gts fix", "prepare": "npm run compile", - "pretest": "npm run compile", "posttest": "npm run check" }, "keywords": [ @@ -35,6 +34,16 @@ "LICENSE", "README.md" ], + "nyc": { + "extension": [ + ".ts", + ".tsx" + ], + "exclude": [ + "**/*.d.ts" + ], + "all": true + }, "publishConfig": { "access": "public" }, @@ -51,6 +60,7 @@ "nock": "^10.0.0", "nyc": "^13.0.0", "rimraf": "^2.6.2", + "ts-mocha": "^6.0.0", "ts-node": "^8.0.0", "typescript": "~2.9.0" }, diff --git a/packages/opencensus-instrumentation-http2/package-lock.json b/packages/opencensus-instrumentation-http2/package-lock.json index bc10ad902..0986f194d 100644 --- a/packages/opencensus-instrumentation-http2/package-lock.json +++ b/packages/opencensus-instrumentation-http2/package-lock.json @@ -145,6 +145,12 @@ } } }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "optional": true + }, "@types/mocha": { "version": "5.2.5", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.5.tgz", @@ -784,6 +790,12 @@ "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" }, + "deepmerge": { + "version": "2.2.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/deepmerge/-/deepmerge-2.2.1.tgz", + "integrity": "sha1-XT/yKgHAD2RUBaL7wX0HeKGAEXA=", + "optional": true + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -1828,6 +1840,23 @@ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, + "json5": { + "version": "1.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/json5/-/json5-1.0.1.tgz", + "integrity": "sha1-d5+wAYYE+oVOrL9iUhgNg1Q+Pb4=", + "optional": true, + "requires": { + "minimist": "^1.2.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "optional": true + } + } + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -4132,6 +4161,42 @@ "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, + "ts-mocha": { + "version": "6.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-mocha/-/ts-mocha-6.0.0.tgz", + "integrity": "sha1-QLjFRi/85vXc7l/3KWVbKVjyblA=", + "requires": { + "ts-node": "7.0.1", + "tsconfig-paths": "^3.5.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "ts-node": { + "version": "7.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-node/-/ts-node-7.0.1.tgz", + "integrity": "sha1-lWLcLR5tJI0kvFX3c+P2FDN9m68=", + "requires": { + "arrify": "^1.0.0", + "buffer-from": "^1.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.6", + "yn": "^2.0.0" + } + }, + "yn": { + "version": "2.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/yn/-/yn-2.0.0.tgz", + "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=" + } + } + }, "ts-node": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.0.2.tgz", @@ -4144,6 +4209,27 @@ "yn": "^3.0.0" } }, + "tsconfig-paths": { + "version": "3.8.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/tsconfig-paths/-/tsconfig-paths-3.8.0.tgz", + "integrity": "sha1-TjQgLVtBlY8mnPVrAe2VuFPVn3I=", + "optional": true, + "requires": { + "@types/json5": "^0.0.29", + "deepmerge": "^2.0.1", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "optional": true + } + } + }, "tslib": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", diff --git a/packages/opencensus-instrumentation-http2/package.json b/packages/opencensus-instrumentation-http2/package.json index 061031607..9545d200f 100644 --- a/packages/opencensus-instrumentation-http2/package.json +++ b/packages/opencensus-instrumentation-http2/package.json @@ -6,14 +6,13 @@ "types": "build/src/index.d.ts", "repository": "census-instrumentation/opencensus-node", "scripts": { - "test": "nyc mocha build/test/**/*.js", + "test": "nyc ts-mocha -p ./tsconfig.json test/**/*.ts", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json", "clean": "rimraf build/*", "check": "gts check", "compile": "tsc -p .", "fix": "gts fix", "prepare": "npm run compile", - "pretest": "npm run compile", "posttest": "npm run check" }, "keywords": [ @@ -35,6 +34,16 @@ "LICENSE", "README.md" ], + "nyc": { + "extension": [ + ".ts", + ".tsx" + ], + "exclude": [ + "**/*.d.ts" + ], + "all": true + }, "publishConfig": { "access": "public" }, @@ -49,6 +58,7 @@ "mocha": "^6.0.0", "nyc": "^13.0.0", "rimraf": "^2.6.2", + "ts-mocha": "^6.0.0", "ts-node": "^8.0.0", "typescript": "~2.9.0" }, diff --git a/packages/opencensus-instrumentation-https/package-lock.json b/packages/opencensus-instrumentation-https/package-lock.json index b9fd413bb..0abfb2423 100644 --- a/packages/opencensus-instrumentation-https/package-lock.json +++ b/packages/opencensus-instrumentation-https/package-lock.json @@ -145,6 +145,12 @@ } } }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "optional": true + }, "@types/mocha": { "version": "5.2.5", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.5.tgz", @@ -820,6 +826,12 @@ "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" }, + "deepmerge": { + "version": "2.2.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/deepmerge/-/deepmerge-2.2.1.tgz", + "integrity": "sha1-XT/yKgHAD2RUBaL7wX0HeKGAEXA=", + "optional": true + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -1869,6 +1881,23 @@ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, + "json5": { + "version": "1.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/json5/-/json5-1.0.1.tgz", + "integrity": "sha1-d5+wAYYE+oVOrL9iUhgNg1Q+Pb4=", + "optional": true, + "requires": { + "minimist": "^1.2.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "optional": true + } + } + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -4214,6 +4243,42 @@ "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, + "ts-mocha": { + "version": "6.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-mocha/-/ts-mocha-6.0.0.tgz", + "integrity": "sha1-QLjFRi/85vXc7l/3KWVbKVjyblA=", + "requires": { + "ts-node": "7.0.1", + "tsconfig-paths": "^3.5.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "ts-node": { + "version": "7.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-node/-/ts-node-7.0.1.tgz", + "integrity": "sha1-lWLcLR5tJI0kvFX3c+P2FDN9m68=", + "requires": { + "arrify": "^1.0.0", + "buffer-from": "^1.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.6", + "yn": "^2.0.0" + } + }, + "yn": { + "version": "2.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/yn/-/yn-2.0.0.tgz", + "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=" + } + } + }, "ts-node": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.0.2.tgz", @@ -4226,6 +4291,27 @@ "yn": "^3.0.0" } }, + "tsconfig-paths": { + "version": "3.8.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/tsconfig-paths/-/tsconfig-paths-3.8.0.tgz", + "integrity": "sha1-TjQgLVtBlY8mnPVrAe2VuFPVn3I=", + "optional": true, + "requires": { + "@types/json5": "^0.0.29", + "deepmerge": "^2.0.1", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "optional": true + } + } + }, "tslib": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", diff --git a/packages/opencensus-instrumentation-https/package.json b/packages/opencensus-instrumentation-https/package.json index f96839d5d..860f7e513 100644 --- a/packages/opencensus-instrumentation-https/package.json +++ b/packages/opencensus-instrumentation-https/package.json @@ -6,14 +6,13 @@ "types": "build/src/index.d.ts", "repository": "census-instrumentation/opencensus-node", "scripts": { - "test": "nyc mocha build/test/**/*.js", + "test": "nyc ts-mocha -p ./tsconfig.json test/**/*.ts", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json", "clean": "rimraf build/*", "check": "gts check", "compile": "tsc -p .", "fix": "gts fix", "prepare": "npm run compile", - "pretest": "npm run compile", "posttest": "npm run check" }, "keywords": [ @@ -35,6 +34,16 @@ "LICENSE", "README.md" ], + "nyc": { + "extension": [ + ".ts", + ".tsx" + ], + "exclude": [ + "**/*.d.ts" + ], + "all": true + }, "publishConfig": { "access": "public" }, @@ -50,6 +59,7 @@ "nock": "^10.0.0", "nyc": "^13.0.0", "rimraf": "^2.6.2", + "ts-mocha": "^6.0.0", "ts-node": "^8.0.0", "typescript": "~2.9.0" }, diff --git a/packages/opencensus-instrumentation-ioredis/package-lock.json b/packages/opencensus-instrumentation-ioredis/package-lock.json index 7fe807518..d90c089ea 100644 --- a/packages/opencensus-instrumentation-ioredis/package-lock.json +++ b/packages/opencensus-instrumentation-ioredis/package-lock.json @@ -124,6 +124,12 @@ "@types/node": "*" } }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "optional": true + }, "@types/mocha": { "version": "5.2.6", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.6.tgz", @@ -685,6 +691,12 @@ "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" }, + "deepmerge": { + "version": "2.2.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/deepmerge/-/deepmerge-2.2.1.tgz", + "integrity": "sha1-XT/yKgHAD2RUBaL7wX0HeKGAEXA=", + "optional": true + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -1627,6 +1639,23 @@ "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" }, + "json5": { + "version": "1.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/json5/-/json5-1.0.1.tgz", + "integrity": "sha1-d5+wAYYE+oVOrL9iUhgNg1Q+Pb4=", + "optional": true, + "requires": { + "minimist": "^1.2.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "optional": true + } + } + }, "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", @@ -3923,6 +3952,42 @@ "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, + "ts-mocha": { + "version": "6.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-mocha/-/ts-mocha-6.0.0.tgz", + "integrity": "sha1-QLjFRi/85vXc7l/3KWVbKVjyblA=", + "requires": { + "ts-node": "7.0.1", + "tsconfig-paths": "^3.5.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "ts-node": { + "version": "7.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-node/-/ts-node-7.0.1.tgz", + "integrity": "sha1-lWLcLR5tJI0kvFX3c+P2FDN9m68=", + "requires": { + "arrify": "^1.0.0", + "buffer-from": "^1.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.6", + "yn": "^2.0.0" + } + }, + "yn": { + "version": "2.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/yn/-/yn-2.0.0.tgz", + "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=" + } + } + }, "ts-node": { "version": "8.0.3", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.0.3.tgz", @@ -3935,6 +4000,27 @@ "yn": "^3.0.0" } }, + "tsconfig-paths": { + "version": "3.8.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/tsconfig-paths/-/tsconfig-paths-3.8.0.tgz", + "integrity": "sha1-TjQgLVtBlY8mnPVrAe2VuFPVn3I=", + "optional": true, + "requires": { + "@types/json5": "^0.0.29", + "deepmerge": "^2.0.1", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "optional": true + } + } + }, "tslib": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", diff --git a/packages/opencensus-instrumentation-ioredis/package.json b/packages/opencensus-instrumentation-ioredis/package.json index 9d867226d..aadd01298 100644 --- a/packages/opencensus-instrumentation-ioredis/package.json +++ b/packages/opencensus-instrumentation-ioredis/package.json @@ -6,14 +6,13 @@ "types": "build/src/index.d.ts", "repository": "census-instrumentation/opencensus-node", "scripts": { - "test": "nyc mocha build/test/**/*.js", + "test": "nyc ts-mocha -p ./tsconfig.json test/**/*.ts", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json", "clean": "rimraf build/*", "check": "gts check", "compile": "tsc -p .", "fix": "gts fix", "prepare": "npm run compile", - "pretest": "npm run compile", "posttest": "npm run check" }, "keywords": [ @@ -37,6 +36,16 @@ "LICENSE", "README.md" ], + "nyc": { + "extension": [ + ".ts", + ".tsx" + ], + "exclude": [ + "**/*.d.ts" + ], + "all": true + }, "publishConfig": { "access": "public" }, @@ -51,6 +60,7 @@ "mocha": "^6.0.0", "nyc": "^13.0.0", "rimraf": "^2.6.2", + "ts-mocha": "^6.0.0", "ts-node": "^8.0.0", "typescript": "~3.2.0", "ioredis": "^4.6.2" diff --git a/packages/opencensus-instrumentation-mongodb/package-lock.json b/packages/opencensus-instrumentation-mongodb/package-lock.json index 5d081d8ea..933d4fea9 100644 --- a/packages/opencensus-instrumentation-mongodb/package-lock.json +++ b/packages/opencensus-instrumentation-mongodb/package-lock.json @@ -158,6 +158,12 @@ "resolved": "https://registry.npmjs.org/@types/events/-/events-1.2.0.tgz", "integrity": "sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA==" }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "optional": true + }, "@types/mocha": { "version": "5.2.5", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.5.tgz", @@ -799,6 +805,12 @@ "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" }, + "deepmerge": { + "version": "2.2.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/deepmerge/-/deepmerge-2.2.1.tgz", + "integrity": "sha1-XT/yKgHAD2RUBaL7wX0HeKGAEXA=", + "optional": true + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -1843,6 +1855,23 @@ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, + "json5": { + "version": "1.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/json5/-/json5-1.0.1.tgz", + "integrity": "sha1-d5+wAYYE+oVOrL9iUhgNg1Q+Pb4=", + "optional": true, + "requires": { + "minimist": "^1.2.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "optional": true + } + } + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -4363,6 +4392,42 @@ "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, + "ts-mocha": { + "version": "6.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-mocha/-/ts-mocha-6.0.0.tgz", + "integrity": "sha1-QLjFRi/85vXc7l/3KWVbKVjyblA=", + "requires": { + "ts-node": "7.0.1", + "tsconfig-paths": "^3.5.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "ts-node": { + "version": "7.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-node/-/ts-node-7.0.1.tgz", + "integrity": "sha1-lWLcLR5tJI0kvFX3c+P2FDN9m68=", + "requires": { + "arrify": "^1.0.0", + "buffer-from": "^1.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.6", + "yn": "^2.0.0" + } + }, + "yn": { + "version": "2.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/yn/-/yn-2.0.0.tgz", + "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=" + } + } + }, "ts-node": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.0.2.tgz", @@ -4375,6 +4440,27 @@ "yn": "^3.0.0" } }, + "tsconfig-paths": { + "version": "3.8.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/tsconfig-paths/-/tsconfig-paths-3.8.0.tgz", + "integrity": "sha1-TjQgLVtBlY8mnPVrAe2VuFPVn3I=", + "optional": true, + "requires": { + "@types/json5": "^0.0.29", + "deepmerge": "^2.0.1", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "optional": true + } + } + }, "tslib": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", diff --git a/packages/opencensus-instrumentation-mongodb/package.json b/packages/opencensus-instrumentation-mongodb/package.json index 68a72f8c1..bfbdab104 100644 --- a/packages/opencensus-instrumentation-mongodb/package.json +++ b/packages/opencensus-instrumentation-mongodb/package.json @@ -6,14 +6,13 @@ "types": "build/src/index.d.ts", "repository": "census-instrumentation/opencensus-node", "scripts": { - "test": "nyc mocha build/test/**/*.js", + "test": "nyc ts-mocha -p ./tsconfig.json test/**/*.ts", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json", "clean": "rimraf build/*", "check": "gts check", "compile": "tsc -p .", "fix": "gts fix", "prepare": "npm run compile", - "pretest": "npm run compile", "posttest": "npm run check" }, "keywords": [ @@ -35,6 +34,16 @@ "LICENSE", "README.md" ], + "nyc": { + "extension": [ + ".ts", + ".tsx" + ], + "exclude": [ + "**/*.d.ts" + ], + "all": true + }, "publishConfig": { "access": "public" }, @@ -49,6 +58,7 @@ "mongodb": "3.1.10", "nyc": "^13.0.0", "rimraf": "^2.6.2", + "ts-mocha": "^6.0.0", "ts-node": "^8.0.0", "typescript": "~2.9.0" }, diff --git a/packages/opencensus-propagation-b3/package-lock.json b/packages/opencensus-propagation-b3/package-lock.json index a66ceb713..9fbd887ed 100644 --- a/packages/opencensus-propagation-b3/package-lock.json +++ b/packages/opencensus-propagation-b3/package-lock.json @@ -128,6 +128,12 @@ "to-fast-properties": "^2.0.0" } }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "optional": true + }, "@types/mocha": { "version": "5.2.5", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.5.tgz", @@ -757,6 +763,12 @@ "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" }, + "deepmerge": { + "version": "2.2.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/deepmerge/-/deepmerge-2.2.1.tgz", + "integrity": "sha1-XT/yKgHAD2RUBaL7wX0HeKGAEXA=", + "optional": true + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -1794,6 +1806,23 @@ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, + "json5": { + "version": "1.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/json5/-/json5-1.0.1.tgz", + "integrity": "sha1-d5+wAYYE+oVOrL9iUhgNg1Q+Pb4=", + "optional": true, + "requires": { + "minimist": "^1.2.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "optional": true + } + } + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -4100,6 +4129,42 @@ "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, + "ts-mocha": { + "version": "6.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-mocha/-/ts-mocha-6.0.0.tgz", + "integrity": "sha1-QLjFRi/85vXc7l/3KWVbKVjyblA=", + "requires": { + "ts-node": "7.0.1", + "tsconfig-paths": "^3.5.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "ts-node": { + "version": "7.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-node/-/ts-node-7.0.1.tgz", + "integrity": "sha1-lWLcLR5tJI0kvFX3c+P2FDN9m68=", + "requires": { + "arrify": "^1.0.0", + "buffer-from": "^1.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.6", + "yn": "^2.0.0" + } + }, + "yn": { + "version": "2.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/yn/-/yn-2.0.0.tgz", + "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=" + } + } + }, "ts-node": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.0.2.tgz", @@ -4112,6 +4177,27 @@ "yn": "^3.0.0" } }, + "tsconfig-paths": { + "version": "3.8.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/tsconfig-paths/-/tsconfig-paths-3.8.0.tgz", + "integrity": "sha1-TjQgLVtBlY8mnPVrAe2VuFPVn3I=", + "optional": true, + "requires": { + "@types/json5": "^0.0.29", + "deepmerge": "^2.0.1", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "optional": true + } + } + }, "tslib": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", diff --git a/packages/opencensus-propagation-b3/package.json b/packages/opencensus-propagation-b3/package.json index 82d8602bd..4d87f0489 100644 --- a/packages/opencensus-propagation-b3/package.json +++ b/packages/opencensus-propagation-b3/package.json @@ -6,14 +6,13 @@ "types": "build/src/index.d.ts", "repository": "census-instrumentation/opencensus-node", "scripts": { - "test": "nyc mocha build/test/**/*.js", + "test": "nyc ts-mocha -p ./tsconfig.json test/**/*.ts", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json", "clean": "rimraf build/*", "check": "gts check", "compile": "tsc -p .", "fix": "gts fix", "prepare": "npm run compile", - "pretest": "npm run compile", "posttest": "npm run check" }, "keywords": [ @@ -35,6 +34,16 @@ "LICENSE", "README.md" ], + "nyc": { + "extension": [ + ".ts", + ".tsx" + ], + "exclude": [ + "**/*.d.ts" + ], + "all": true + }, "publishConfig": { "access": "public" }, @@ -47,6 +56,7 @@ "mocha": "^6.0.0", "nyc": "^13.0.0", "rimraf": "^2.6.2", + "ts-mocha": "^6.0.0", "ts-node": "^8.0.0", "typescript": "~3.2.0" }, diff --git a/packages/opencensus-propagation-binaryformat/package-lock.json b/packages/opencensus-propagation-binaryformat/package-lock.json index 055faa8ba..47bf1e932 100644 --- a/packages/opencensus-propagation-binaryformat/package-lock.json +++ b/packages/opencensus-propagation-binaryformat/package-lock.json @@ -116,6 +116,12 @@ "to-fast-properties": "^2.0.0" } }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "optional": true + }, "@types/mocha": { "version": "5.2.6", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.6.tgz", @@ -662,6 +668,12 @@ "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" }, + "deepmerge": { + "version": "2.2.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/deepmerge/-/deepmerge-2.2.1.tgz", + "integrity": "sha1-XT/yKgHAD2RUBaL7wX0HeKGAEXA=", + "optional": true + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -1577,6 +1589,15 @@ "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" }, + "json5": { + "version": "1.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/json5/-/json5-1.0.1.tgz", + "integrity": "sha1-d5+wAYYE+oVOrL9iUhgNg1Q+Pb4=", + "optional": true, + "requires": { + "minimist": "^1.2.0" + } + }, "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", @@ -3835,6 +3856,37 @@ "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, + "ts-mocha": { + "version": "6.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-mocha/-/ts-mocha-6.0.0.tgz", + "integrity": "sha1-QLjFRi/85vXc7l/3KWVbKVjyblA=", + "requires": { + "ts-node": "7.0.1", + "tsconfig-paths": "^3.5.0" + }, + "dependencies": { + "ts-node": { + "version": "7.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-node/-/ts-node-7.0.1.tgz", + "integrity": "sha1-lWLcLR5tJI0kvFX3c+P2FDN9m68=", + "requires": { + "arrify": "^1.0.0", + "buffer-from": "^1.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.6", + "yn": "^2.0.0" + } + }, + "yn": { + "version": "2.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/yn/-/yn-2.0.0.tgz", + "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=" + } + } + }, "ts-node": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.0.2.tgz", @@ -3847,6 +3899,19 @@ "yn": "^3.0.0" } }, + "tsconfig-paths": { + "version": "3.8.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/tsconfig-paths/-/tsconfig-paths-3.8.0.tgz", + "integrity": "sha1-TjQgLVtBlY8mnPVrAe2VuFPVn3I=", + "optional": true, + "requires": { + "@types/json5": "^0.0.29", + "deepmerge": "^2.0.1", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + } + }, "tslib": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", diff --git a/packages/opencensus-propagation-binaryformat/package.json b/packages/opencensus-propagation-binaryformat/package.json index 4d45850af..a4af8b0f3 100644 --- a/packages/opencensus-propagation-binaryformat/package.json +++ b/packages/opencensus-propagation-binaryformat/package.json @@ -6,14 +6,13 @@ "types": "build/src/index.d.ts", "repository": "census-instrumentation/opencensus-node", "scripts": { - "test": "nyc mocha build/test/**/*.js", + "test": "nyc ts-mocha -p ./tsconfig.json test/**/*.ts", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json", "clean": "rimraf build/*", "check": "gts check", "compile": "tsc -p .", "fix": "gts fix", "prepare": "npm run compile", - "pretest": "npm run compile", "posttest": "npm run check" }, "keywords": [ @@ -35,6 +34,16 @@ "LICENSE", "README.md" ], + "nyc": { + "extension": [ + ".ts", + ".tsx" + ], + "exclude": [ + "**/*.d.ts" + ], + "all": true + }, "publishConfig": { "access": "public" }, @@ -46,6 +55,7 @@ "mocha": "^6.0.0", "nyc": "^13.0.0", "rimraf": "^2.6.2", + "ts-mocha": "^6.0.0", "ts-node": "^8.0.0", "typescript": "~3.2.0" }, diff --git a/packages/opencensus-propagation-jaeger/package-lock.json b/packages/opencensus-propagation-jaeger/package-lock.json index a66ceb713..9fbd887ed 100644 --- a/packages/opencensus-propagation-jaeger/package-lock.json +++ b/packages/opencensus-propagation-jaeger/package-lock.json @@ -128,6 +128,12 @@ "to-fast-properties": "^2.0.0" } }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "optional": true + }, "@types/mocha": { "version": "5.2.5", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.5.tgz", @@ -757,6 +763,12 @@ "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" }, + "deepmerge": { + "version": "2.2.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/deepmerge/-/deepmerge-2.2.1.tgz", + "integrity": "sha1-XT/yKgHAD2RUBaL7wX0HeKGAEXA=", + "optional": true + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -1794,6 +1806,23 @@ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, + "json5": { + "version": "1.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/json5/-/json5-1.0.1.tgz", + "integrity": "sha1-d5+wAYYE+oVOrL9iUhgNg1Q+Pb4=", + "optional": true, + "requires": { + "minimist": "^1.2.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "optional": true + } + } + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -4100,6 +4129,42 @@ "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, + "ts-mocha": { + "version": "6.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-mocha/-/ts-mocha-6.0.0.tgz", + "integrity": "sha1-QLjFRi/85vXc7l/3KWVbKVjyblA=", + "requires": { + "ts-node": "7.0.1", + "tsconfig-paths": "^3.5.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "ts-node": { + "version": "7.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-node/-/ts-node-7.0.1.tgz", + "integrity": "sha1-lWLcLR5tJI0kvFX3c+P2FDN9m68=", + "requires": { + "arrify": "^1.0.0", + "buffer-from": "^1.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.6", + "yn": "^2.0.0" + } + }, + "yn": { + "version": "2.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/yn/-/yn-2.0.0.tgz", + "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=" + } + } + }, "ts-node": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.0.2.tgz", @@ -4112,6 +4177,27 @@ "yn": "^3.0.0" } }, + "tsconfig-paths": { + "version": "3.8.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/tsconfig-paths/-/tsconfig-paths-3.8.0.tgz", + "integrity": "sha1-TjQgLVtBlY8mnPVrAe2VuFPVn3I=", + "optional": true, + "requires": { + "@types/json5": "^0.0.29", + "deepmerge": "^2.0.1", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "optional": true + } + } + }, "tslib": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", diff --git a/packages/opencensus-propagation-jaeger/package.json b/packages/opencensus-propagation-jaeger/package.json index 821a62154..1c12db5bc 100644 --- a/packages/opencensus-propagation-jaeger/package.json +++ b/packages/opencensus-propagation-jaeger/package.json @@ -6,14 +6,13 @@ "types": "build/src/index.d.ts", "repository": "census-instrumentation/opencensus-node", "scripts": { - "test": "nyc mocha build/test/**/*.js", + "test": "nyc ts-mocha -p ./tsconfig.json test/**/*.ts", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json", "clean": "rimraf build/*", "check": "gts check", "compile": "tsc -p .", "fix": "gts fix", "prepare": "npm run compile", - "pretest": "npm run compile", "posttest": "npm run check" }, "keywords": [ @@ -34,6 +33,16 @@ "LICENSE", "README.md" ], + "nyc": { + "extension": [ + ".ts", + ".tsx" + ], + "exclude": [ + "**/*.d.ts" + ], + "all": true + }, "publishConfig": { "access": "public" }, @@ -46,6 +55,7 @@ "mocha": "^6.0.0", "nyc": "^13.0.0", "rimraf": "^2.6.2", + "ts-mocha": "^6.0.0", "ts-node": "^8.0.0", "typescript": "~3.2.0" }, diff --git a/packages/opencensus-propagation-stackdriver/package-lock.json b/packages/opencensus-propagation-stackdriver/package-lock.json index 6ae22dea2..e79b22e83 100644 --- a/packages/opencensus-propagation-stackdriver/package-lock.json +++ b/packages/opencensus-propagation-stackdriver/package-lock.json @@ -135,6 +135,12 @@ } } }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "optional": true + }, "@types/mocha": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.0.tgz", @@ -446,6 +452,11 @@ "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==" }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha1-MnE7wCj3XAL9txDXx7zsHyxgcO8=" + }, "builtin-modules": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", @@ -755,6 +766,12 @@ "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" }, + "deepmerge": { + "version": "2.2.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/deepmerge/-/deepmerge-2.2.1.tgz", + "integrity": "sha1-XT/yKgHAD2RUBaL7wX0HeKGAEXA=", + "optional": true + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -1772,6 +1789,15 @@ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, + "json5": { + "version": "1.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/json5/-/json5-1.0.1.tgz", + "integrity": "sha1-d5+wAYYE+oVOrL9iUhgNg1Q+Pb4=", + "optional": true, + "requires": { + "minimist": "^1.2.0" + } + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -1882,6 +1908,11 @@ } } }, + "make-error": { + "version": "1.3.5", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/make-error/-/make-error-1.3.5.tgz", + "integrity": "sha1-7+ToH22yjK3WBccPKcgxtY73dsg=" + }, "map-age-cleaner": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", @@ -3762,6 +3793,22 @@ "urix": "^0.1.0" } }, + "source-map-support": { + "version": "0.5.11", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/source-map-support/-/source-map-support-0.5.11.tgz", + "integrity": "sha1-76ws4IADVdAmMmoMoj4WKurJpOI=", + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=" + } + } + }, "source-map-url": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", @@ -4000,6 +4047,43 @@ "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, + "ts-mocha": { + "version": "6.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-mocha/-/ts-mocha-6.0.0.tgz", + "integrity": "sha1-QLjFRi/85vXc7l/3KWVbKVjyblA=", + "requires": { + "ts-node": "7.0.1", + "tsconfig-paths": "^3.5.0" + } + }, + "ts-node": { + "version": "7.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-node/-/ts-node-7.0.1.tgz", + "integrity": "sha1-lWLcLR5tJI0kvFX3c+P2FDN9m68=", + "requires": { + "arrify": "^1.0.0", + "buffer-from": "^1.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.6", + "yn": "^2.0.0" + } + }, + "tsconfig-paths": { + "version": "3.8.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/tsconfig-paths/-/tsconfig-paths-3.8.0.tgz", + "integrity": "sha1-TjQgLVtBlY8mnPVrAe2VuFPVn3I=", + "optional": true, + "requires": { + "@types/json5": "^0.0.29", + "deepmerge": "^2.0.1", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + } + }, "tslib": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", @@ -4401,6 +4485,11 @@ "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" } } + }, + "yn": { + "version": "2.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/yn/-/yn-2.0.0.tgz", + "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=" } } } diff --git a/packages/opencensus-propagation-stackdriver/package.json b/packages/opencensus-propagation-stackdriver/package.json index 117d93055..c73cde320 100644 --- a/packages/opencensus-propagation-stackdriver/package.json +++ b/packages/opencensus-propagation-stackdriver/package.json @@ -6,14 +6,13 @@ "types": "build/src/index.d.ts", "repository": "census-instrumentation/opencensus-node", "scripts": { - "test": "nyc mocha build/test/**/*.js", + "test": "nyc ts-mocha -p ./tsconfig.json test/**/*.ts", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json", "check": "gts check", "clean": "gts clean", "compile": "tsc -p .", "fix": "gts fix", "prepare": "npm run compile", - "pretest": "npm run compile", "posttest": "npm run check" }, "keywords": [ @@ -34,6 +33,7 @@ "gts": "^0.9.0", "mocha": "^6.0.0", "nyc": "^13.2.0", + "ts-mocha": "^6.0.0", "typescript": "~3.2.0" }, "dependencies": { diff --git a/packages/opencensus-propagation-tracecontext/package-lock.json b/packages/opencensus-propagation-tracecontext/package-lock.json index defefc67c..998462039 100644 --- a/packages/opencensus-propagation-tracecontext/package-lock.json +++ b/packages/opencensus-propagation-tracecontext/package-lock.json @@ -128,6 +128,12 @@ "to-fast-properties": "^2.0.0" } }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "optional": true + }, "@types/mocha": { "version": "5.2.5", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.5.tgz", @@ -749,6 +755,12 @@ "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" }, + "deepmerge": { + "version": "2.2.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/deepmerge/-/deepmerge-2.2.1.tgz", + "integrity": "sha1-XT/yKgHAD2RUBaL7wX0HeKGAEXA=", + "optional": true + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -1786,6 +1798,23 @@ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, + "json5": { + "version": "1.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/json5/-/json5-1.0.1.tgz", + "integrity": "sha1-d5+wAYYE+oVOrL9iUhgNg1Q+Pb4=", + "optional": true, + "requires": { + "minimist": "^1.2.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "optional": true + } + } + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -4092,6 +4121,42 @@ "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, + "ts-mocha": { + "version": "6.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-mocha/-/ts-mocha-6.0.0.tgz", + "integrity": "sha1-QLjFRi/85vXc7l/3KWVbKVjyblA=", + "requires": { + "ts-node": "7.0.1", + "tsconfig-paths": "^3.5.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" + }, + "ts-node": { + "version": "7.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-node/-/ts-node-7.0.1.tgz", + "integrity": "sha1-lWLcLR5tJI0kvFX3c+P2FDN9m68=", + "requires": { + "arrify": "^1.0.0", + "buffer-from": "^1.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.6", + "yn": "^2.0.0" + } + }, + "yn": { + "version": "2.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/yn/-/yn-2.0.0.tgz", + "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=" + } + } + }, "ts-node": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.0.2.tgz", @@ -4104,6 +4169,27 @@ "yn": "^3.0.0" } }, + "tsconfig-paths": { + "version": "3.8.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/tsconfig-paths/-/tsconfig-paths-3.8.0.tgz", + "integrity": "sha1-TjQgLVtBlY8mnPVrAe2VuFPVn3I=", + "optional": true, + "requires": { + "@types/json5": "^0.0.29", + "deepmerge": "^2.0.1", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "optional": true + } + } + }, "tslib": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", diff --git a/packages/opencensus-propagation-tracecontext/package.json b/packages/opencensus-propagation-tracecontext/package.json index baf992673..8c11ca79a 100644 --- a/packages/opencensus-propagation-tracecontext/package.json +++ b/packages/opencensus-propagation-tracecontext/package.json @@ -6,14 +6,13 @@ "types": "build/src/index.d.ts", "repository": "census-instrumentation/opencensus-node", "scripts": { - "test": "nyc mocha build/test/**/*.js", + "test": "nyc ts-mocha -p ./tsconfig.json test/**/*.ts", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json", "clean": "rimraf build/*", "check": "gts check", "compile": "tsc -p .", "fix": "gts fix", "prepare": "npm run compile", - "pretest": "npm run compile", "posttest": "npm run check" }, "keywords": [ @@ -35,6 +34,16 @@ "LICENSE", "README.md" ], + "nyc": { + "extension": [ + ".ts", + ".tsx" + ], + "exclude": [ + "**/*.d.ts" + ], + "all": true + }, "publishConfig": { "access": "public" }, @@ -46,6 +55,7 @@ "mocha": "^6.0.0", "nyc": "^13.0.0", "rimraf": "^2.6.2", + "ts-mocha": "^6.0.0", "ts-node": "^8.0.0", "typescript": "~3.2.0" }, diff --git a/packages/opencensus-resource-util/package-lock.json b/packages/opencensus-resource-util/package-lock.json index 66f1c744a..2f1b2acfd 100644 --- a/packages/opencensus-resource-util/package-lock.json +++ b/packages/opencensus-resource-util/package-lock.json @@ -121,6 +121,12 @@ "to-fast-properties": "^2.0.0" } }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "optional": true + }, "@types/mocha": { "version": "5.2.5", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-5.2.5.tgz", @@ -458,6 +464,11 @@ "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==" }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha1-MnE7wCj3XAL9txDXx7zsHyxgcO8=" + }, "builtin-modules": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", @@ -794,6 +805,12 @@ "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" }, + "deepmerge": { + "version": "2.2.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/deepmerge/-/deepmerge-2.2.1.tgz", + "integrity": "sha1-XT/yKgHAD2RUBaL7wX0HeKGAEXA=", + "optional": true + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -1861,6 +1878,15 @@ "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" }, + "json5": { + "version": "1.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/json5/-/json5-1.0.1.tgz", + "integrity": "sha1-d5+wAYYE+oVOrL9iUhgNg1Q+Pb4=", + "optional": true, + "requires": { + "minimist": "^1.2.0" + } + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -1971,6 +1997,11 @@ } } }, + "make-error": { + "version": "1.3.5", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/make-error/-/make-error-1.3.5.tgz", + "integrity": "sha1-7+ToH22yjK3WBccPKcgxtY73dsg=" + }, "map-age-cleaner": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", @@ -2330,7 +2361,6 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", - "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -2655,8 +2685,7 @@ "is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "optional": true + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, "is-builtin-module": { "version": "1.0.0", @@ -2740,7 +2769,6 @@ "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "optional": true, "requires": { "is-buffer": "^1.1.5" } @@ -2787,8 +2815,7 @@ "longest": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "optional": true + "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" }, "lru-cache": { "version": "4.1.3", @@ -3054,8 +3081,7 @@ "repeat-string": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "optional": true + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" }, "require-directory": { "version": "2.1.1", @@ -4117,6 +4143,22 @@ "urix": "^0.1.0" } }, + "source-map-support": { + "version": "0.5.11", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/source-map-support/-/source-map-support-0.5.11.tgz", + "integrity": "sha1-76ws4IADVdAmMmoMoj4WKurJpOI=", + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha1-dHIq8y6WFOnCh6jQu95IteLxomM=" + } + } + }, "source-map-url": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", @@ -4355,6 +4397,43 @@ "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, + "ts-mocha": { + "version": "6.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-mocha/-/ts-mocha-6.0.0.tgz", + "integrity": "sha1-QLjFRi/85vXc7l/3KWVbKVjyblA=", + "requires": { + "ts-node": "7.0.1", + "tsconfig-paths": "^3.5.0" + } + }, + "ts-node": { + "version": "7.0.1", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/ts-node/-/ts-node-7.0.1.tgz", + "integrity": "sha1-lWLcLR5tJI0kvFX3c+P2FDN9m68=", + "requires": { + "arrify": "^1.0.0", + "buffer-from": "^1.1.0", + "diff": "^3.1.0", + "make-error": "^1.1.1", + "minimist": "^1.2.0", + "mkdirp": "^0.5.1", + "source-map-support": "^0.5.6", + "yn": "^2.0.0" + } + }, + "tsconfig-paths": { + "version": "3.8.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/tsconfig-paths/-/tsconfig-paths-3.8.0.tgz", + "integrity": "sha1-TjQgLVtBlY8mnPVrAe2VuFPVn3I=", + "optional": true, + "requires": { + "@types/json5": "^0.0.29", + "deepmerge": "^2.0.1", + "json5": "^1.0.1", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + } + }, "tslib": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", @@ -4754,6 +4833,11 @@ "lodash": "^4.17.11", "yargs": "^12.0.5" } + }, + "yn": { + "version": "2.0.0", + "resolved": "https://artifacts.netflix.com/api/npm/npm-netflix/yn/-/yn-2.0.0.tgz", + "integrity": "sha1-5a2ryKz0CPY4X8dklWhMiOavaJo=" } } } diff --git a/packages/opencensus-resource-util/package.json b/packages/opencensus-resource-util/package.json index ca371753d..574f8aca3 100644 --- a/packages/opencensus-resource-util/package.json +++ b/packages/opencensus-resource-util/package.json @@ -6,14 +6,13 @@ "types": "build/src/index.d.ts", "repository": "census-instrumentation/opencensus-node", "scripts": { - "test": "nyc mocha build/test/**/*.js", + "test": "nyc ts-mocha -p ./tsconfig.json test/**/*.ts", "codecov": "nyc report --reporter=json && codecov -f coverage/*.json", "clean": "rimraf build/*", "check": "gts check", "compile": "tsc -p .", "fix": "gts fix", "prepare": "npm run compile", - "pretest": "npm run compile", "posttest": "npm run check" }, "keywords": [ @@ -35,6 +34,16 @@ "LICENSE", "README.md" ], + "nyc": { + "extension": [ + ".ts", + ".tsx" + ], + "exclude": [ + "**/*.d.ts" + ], + "all": true + }, "publishConfig": { "access": "public" }, @@ -48,6 +57,7 @@ "nock": "^10.0.0", "nyc": "^13.0.0", "rimraf": "^2.6.2", + "ts-mocha": "^6.0.0", "typescript": "~3.2.0" }, "dependencies": {