@instana/shared-metrics 1.137.0 → 1.137.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/package.json +14 -5
- package/src/gc.js +2 -1
- package/src/libuv.js +3 -1
- package/src/util/nativeModuleRetry.js +19 -5
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
+
|
|
6
|
+
## [1.137.1](https://github.com/instana/nodejs/compare/v1.137.0...v1.137.1) (2021-11-23)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **dependency:** pinned semver to 7.3.3 ([d32f23e](https://github.com/instana/nodejs/commit/d32f23ea6807989d57ec6165c407b64e04d8d7c1)), closes [/github.com/npm/node-semver/blob/v7.3.3/package.json#L39](https://github.com//github.com/npm/node-semver/blob/v7.3.3/package.json/issues/L39) [/github.com/npm/node-semver/blob/v7.3.5/package.json#L39](https://github.com//github.com/npm/node-semver/blob/v7.3.5/package.json/issues/L39)
|
|
12
|
+
* **dependency:** updated tar to 6.x in shared-metrics ([#415](https://github.com/instana/nodejs/issues/415)) ([5288ba5](https://github.com/instana/nodejs/commit/5288ba5241acd23d54f11c76edb3cffc0ffe6a66))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instana/shared-metrics",
|
|
3
|
-
"version": "1.137.
|
|
3
|
+
"version": "1.137.1",
|
|
4
4
|
"description": "Internal metrics plug-in package for Node.js monitoring with Instana",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Bastian Krol",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"scripts": {
|
|
27
27
|
"audit": "bin/prepare-audit.sh && npm audit --production; AUDIT_RESULT=$?; git checkout package-lock.json; exit $AUDIT_RESULT",
|
|
28
28
|
"test": "npm run test:mocha",
|
|
29
|
-
"test:mocha": "mocha --sort --reporter mocha-multi --reporter-options spec=-,xunit=../../test-results/shared-metrics/results.xml $(find test -iname '*test.js' -not -path '*node_modules*')",
|
|
29
|
+
"test:mocha": "echo \"******* Files to be tested:\n $CI_SHARED_METRICS_TEST_FILES\" && mocha --sort --reporter mocha-multi --reporter-options spec=-,xunit=../../test-results/shared-metrics/results.xml ${CI_SHARED_METRICS_TEST_FILES:=$(find test -iname '*test.js' -not -path '*node_modules*')} test/globalHooks_test.js",
|
|
30
30
|
"test:debug": "WITH_STDOUT=true npm run test:mocha",
|
|
31
31
|
"lint": "eslint src test",
|
|
32
32
|
"verify": "npm run lint && npm test",
|
|
@@ -52,6 +52,14 @@
|
|
|
52
52
|
{
|
|
53
53
|
"name": "Richard Gebhardt",
|
|
54
54
|
"email": "gebhardt@us.ibm.com"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "Willian Carvalho",
|
|
58
|
+
"email": "willian.carvalho@instana.com"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"name": "Katharina Irrgang",
|
|
62
|
+
"email": "katharina.irrgang@instana.com"
|
|
55
63
|
}
|
|
56
64
|
],
|
|
57
65
|
"bugs": {
|
|
@@ -59,11 +67,12 @@
|
|
|
59
67
|
},
|
|
60
68
|
"license": "MIT",
|
|
61
69
|
"dependencies": {
|
|
62
|
-
"@instana/core": "1.137.
|
|
70
|
+
"@instana/core": "1.137.1",
|
|
63
71
|
"detect-libc": "^1.0.3",
|
|
64
72
|
"event-loop-lag": "^1.4.0",
|
|
65
73
|
"recursive-copy": "^2.0.13",
|
|
66
|
-
"
|
|
74
|
+
"semver": "7.3.3",
|
|
75
|
+
"tar": "^6.1.11"
|
|
67
76
|
},
|
|
68
77
|
"devDependencies": {
|
|
69
78
|
"@types/tar": "^4.0.5",
|
|
@@ -78,5 +87,5 @@
|
|
|
78
87
|
"event-loop-stats": "1.3.0",
|
|
79
88
|
"gcstats.js": "1.0.0"
|
|
80
89
|
},
|
|
81
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "3245c3c62510c75760763669a4834c789e75fa91"
|
|
82
91
|
}
|
package/src/gc.js
CHANGED
package/src/libuv.js
CHANGED
|
@@ -11,8 +11,8 @@ const EventEmitter = require('events');
|
|
|
11
11
|
const copy = require('recursive-copy');
|
|
12
12
|
const fs = require('fs');
|
|
13
13
|
const os = require('os');
|
|
14
|
+
const semver = require('semver');
|
|
14
15
|
const path = require('path');
|
|
15
|
-
const tar = require('tar');
|
|
16
16
|
const detectLibc = require('detect-libc');
|
|
17
17
|
|
|
18
18
|
/**
|
|
@@ -171,6 +171,20 @@ function copyPrecompiled(opts, loaderEmitter, callback) {
|
|
|
171
171
|
|
|
172
172
|
logger.info(`Found a precompiled version for ${opts.nativeModuleName} ${label}, unpacking.`);
|
|
173
173
|
|
|
174
|
+
/**
|
|
175
|
+
* tar@6 has dropped support for Node < 10
|
|
176
|
+
* It might work to require tar@6 or to execute commands with tar@6 and Node < 10,
|
|
177
|
+
* but we don't want to risk that a customers application fails - especially if tar@6 adds
|
|
178
|
+
* breaking changes. We decided to disallow this feature.
|
|
179
|
+
*/
|
|
180
|
+
if (semver.lt(process.version, '10.0.0')) {
|
|
181
|
+
logger.info(`Skipped copying precompiled version for ${opts.nativeModuleName} ${label} with Node < 10.`);
|
|
182
|
+
callback(false);
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
const tar = require('tar');
|
|
187
|
+
|
|
174
188
|
tar
|
|
175
189
|
.x({
|
|
176
190
|
cwd: os.tmpdir(),
|
|
@@ -203,10 +217,10 @@ function copyPrecompiled(opts, loaderEmitter, callback) {
|
|
|
203
217
|
// is, node_modules/${opts.nativeModuleName}). Node.js' module loading infrastructure
|
|
204
218
|
// (lib/internal/modules/cjs/loader.js and lib/internal/modules/package_json_reader.js) have built-in
|
|
205
219
|
// caching on multiple levels (for example, package.json locations and package.json contents). If Node.js
|
|
206
|
-
// has tried unsuccessfully to load a module or read a package.json from a particular path,
|
|
207
|
-
// and not try to load anything from that path again (a `false` will be
|
|
208
|
-
// key). Instead, we force a new path, by adding precompiled
|
|
209
|
-
// the module to load it.
|
|
220
|
+
// has tried unsuccessfully to load a module or read a package.json from a particular path,
|
|
221
|
+
// it will remember and not try to load anything from that path again (a `false` will be
|
|
222
|
+
// put into the cache for that cache key). Instead, we force a new path, by adding precompiled
|
|
223
|
+
// to the module path and use the absolute path to the module to load it.
|
|
210
224
|
opts.loadFrom = targetDir;
|
|
211
225
|
callback(true);
|
|
212
226
|
}
|