@oclif/core 2.5.0 → 2.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.
@@ -24,6 +24,7 @@ declare class Marker {
24
24
  module: string;
25
25
  method: string;
26
26
  scope: string;
27
+ stopped: boolean;
27
28
  private startMarker;
28
29
  private stopMarker;
29
30
  constructor(name: string, details?: Details);
@@ -7,6 +7,7 @@ class Marker {
7
7
  constructor(name, details = {}) {
8
8
  this.name = name;
9
9
  this.details = details;
10
+ this.stopped = false;
10
11
  this.startMarker = `${this.name}-start`;
11
12
  this.stopMarker = `${this.name}-stop`;
12
13
  const [caller, scope] = name.split('#');
@@ -20,6 +21,7 @@ class Marker {
20
21
  this.details = { ...this.details, ...details };
21
22
  }
22
23
  stop() {
24
+ this.stopped = true;
23
25
  perf_hooks_1.performance.mark(this.stopMarker);
24
26
  }
25
27
  measure() {
@@ -65,6 +67,11 @@ class Performance {
65
67
  static async collect() {
66
68
  if (!Performance.enabled)
67
69
  return;
70
+ if (Performance._results.length > 0)
71
+ return;
72
+ for (const marker of Object.values(Performance.markers).filter(m => !m.stopped)) {
73
+ marker.stop();
74
+ }
68
75
  return new Promise(resolve => {
69
76
  const perfObserver = new perf_hooks_1.PerformanceObserver(items => {
70
77
  for (const entry of items.getEntries()) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oclif/core",
3
3
  "description": "base library for oclif CLIs",
4
- "version": "2.5.0",
4
+ "version": "2.5.1",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/oclif/core/issues",
7
7
  "dependencies": {
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "devDependencies": {
38
38
  "@commitlint/config-conventional": "^12.1.4",
39
- "@oclif/plugin-help": "^5.2.5",
39
+ "@oclif/plugin-help": "^5.2.7",
40
40
  "@oclif/plugin-plugins": "^2.3.2",
41
41
  "@oclif/test": "^2.3.7",
42
42
  "@types/ansi-styles": "^3.2.1",