@promster/metrics 15.5.0 → 15.5.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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var once = require('lodash.once');
5
+ var _function = require('es-toolkit/function');
6
6
  var Prometheus = require('prom-client');
7
7
  var merge = require('merge-options');
8
8
  var prometheusGcStats = require('@chainsafe/prometheus-gc-stats');
@@ -29,7 +29,6 @@ function _interopNamespace(e) {
29
29
  return Object.freeze(n);
30
30
  }
31
31
 
32
- var once__default = /*#__PURE__*/_interopDefault(once);
33
32
  var Prometheus__namespace = /*#__PURE__*/_interopNamespace(Prometheus);
34
33
  var merge__default = /*#__PURE__*/_interopDefault(merge);
35
34
  var url__default = /*#__PURE__*/_interopDefault(url);
@@ -43,7 +42,7 @@ const skipMetricsInEnvironment = options => options.detectKubernetes === true &&
43
42
  // This is the `globalRegistry` provided by the `prom-client`
44
43
  // We could create multiple registries with `new Prometheus.registry()`.
45
44
  const defaultRegister = Prometheus__namespace.register;
46
- const configure = once__default["default"](options => {
45
+ const configure = _function.once(options => {
47
46
  const shouldSkipMetricsInEnvironment = skipMetricsInEnvironment(options);
48
47
  if (!shouldSkipMetricsInEnvironment) {
49
48
  Prometheus__namespace.collectDefaultMetrics(options);
@@ -79,7 +78,7 @@ createGcMetrics.defaultOptions = defaultOptions$4;
79
78
  const defaultOptions$3 = {
80
79
  disableGcMetrics: false
81
80
  };
82
- const createGcObserver = once__default["default"]((_metrics, options) => () => {
81
+ const createGcObserver = _function.once((_metrics, options) => () => {
83
82
  prometheusGcStats.gcStats(defaultRegister, {
84
83
  collectionInterval: options.gcCollectionInterval,
85
84
  prefix: options.metricPrefix
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var once = require('lodash.once');
5
+ var _function = require('es-toolkit/function');
6
6
  var Prometheus = require('prom-client');
7
7
  var merge = require('merge-options');
8
8
  var prometheusGcStats = require('@chainsafe/prometheus-gc-stats');
@@ -29,7 +29,6 @@ function _interopNamespace(e) {
29
29
  return Object.freeze(n);
30
30
  }
31
31
 
32
- var once__default = /*#__PURE__*/_interopDefault(once);
33
32
  var Prometheus__namespace = /*#__PURE__*/_interopNamespace(Prometheus);
34
33
  var merge__default = /*#__PURE__*/_interopDefault(merge);
35
34
  var url__default = /*#__PURE__*/_interopDefault(url);
@@ -43,7 +42,7 @@ const skipMetricsInEnvironment = options => options.detectKubernetes === true &&
43
42
  // This is the `globalRegistry` provided by the `prom-client`
44
43
  // We could create multiple registries with `new Prometheus.registry()`.
45
44
  const defaultRegister = Prometheus__namespace.register;
46
- const configure = once__default["default"](options => {
45
+ const configure = _function.once(options => {
47
46
  const shouldSkipMetricsInEnvironment = skipMetricsInEnvironment(options);
48
47
  if (!shouldSkipMetricsInEnvironment) {
49
48
  Prometheus__namespace.collectDefaultMetrics(options);
@@ -79,7 +78,7 @@ createGcMetrics.defaultOptions = defaultOptions$4;
79
78
  const defaultOptions$3 = {
80
79
  disableGcMetrics: false
81
80
  };
82
- const createGcObserver = once__default["default"]((_metrics, options) => () => {
81
+ const createGcObserver = _function.once((_metrics, options) => () => {
83
82
  prometheusGcStats.gcStats(defaultRegister, {
84
83
  collectionInterval: options.gcCollectionInterval,
85
84
  prefix: options.metricPrefix
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promster/metrics",
3
- "version": "15.5.0",
3
+ "version": "15.5.1",
4
4
  "description": "Metrics utilities used by all other server integrations",
5
5
  "keywords": [
6
6
  "continousdelivery",
@@ -33,18 +33,16 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@chainsafe/prometheus-gc-stats": "1.0.2",
36
- "lodash.memoize": "4.1.2",
37
- "lodash.once": "4.1.1",
36
+ "es-toolkit": "1.46.1",
38
37
  "merge-options": "3.0.4",
39
38
  "tslib": "2.8.1",
40
39
  "url-value-parser": "2.2.0"
41
40
  },
42
41
  "devDependencies": {
43
- "@types/lodash.once": "4.1.9",
44
42
  "@types/node": "24.12.2",
45
43
  "prom-client": "15.1.3",
46
44
  "typescript": "6.0.3",
47
- "@promster/types": "15.5.0"
45
+ "@promster/types": "15.5.1"
48
46
  },
49
47
  "peerDependencies": {
50
48
  "prom-client": "13.x.x || 14.x || 15.x"