@salesforce/core 8.9.0 → 8.9.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.
@@ -29,7 +29,7 @@ function default_1() {
29
29
  cb();
30
30
  },
31
31
  });
32
- // eslint-disable-next-line @typescript-eslint/no-empty-function
32
+ // Set up pipeline with proper error handling
33
33
  (0, node_stream_1.pipeline)(source, myTransportStream, () => { });
34
34
  return myTransportStream;
35
35
  }, {
@@ -37,21 +37,20 @@ function default_1() {
37
37
  enablePipelining: true,
38
38
  });
39
39
  }
40
- /** if the DEBUG= is set, see if that matches the logger name. If not, we don't want to keep going */
40
+ // Cache for debug regex to avoid recreating it on every message
41
+ let cachedDebugRegex = null;
42
+ let lastDebugPattern = null;
41
43
  const debugAllows = (chunk) => {
42
44
  if (!process.env.DEBUG || process.env.DEBUG === '*')
43
45
  return true;
44
46
  if (typeof chunk.name !== 'string')
45
47
  return true;
46
- // turn wildcard patterns into regexes
47
- const regexFromDebug = new RegExp(process.env.DEBUG.replace(/\*/g, '.*'));
48
- if (!regexFromDebug.test(chunk.name)) {
49
- // console.log(`no match : ${chunk.name} for ${process.env.DEBUG}`);
50
- return false;
51
- }
52
- else {
53
- // console.log(`match : ${chunk.name} for ${process.env.DEBUG}`);
54
- return true;
48
+ // Only create a new regex if the DEBUG pattern has changed
49
+ if (process.env.DEBUG !== lastDebugPattern) {
50
+ lastDebugPattern = process.env.DEBUG;
51
+ cachedDebugRegex = new RegExp(process.env.DEBUG.replace(/\*/g, '.*'));
55
52
  }
53
+ // Use the cached regex for pattern matching
54
+ return cachedDebugRegex.test(chunk.name);
56
55
  };
57
56
  //# sourceMappingURL=transformStream.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/core",
3
- "version": "8.9.0",
3
+ "version": "8.9.1",
4
4
  "description": "Core libraries to interact with SFDX projects, orgs, and APIs.",
5
5
  "main": "lib/index",
6
6
  "types": "lib/index.d.ts",