@parca/profile 0.16.130 → 0.16.131

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 CHANGED
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.16.131](https://github.com/parca-dev/parca/compare/@parca/profile@0.16.130...@parca/profile@0.16.131) (2023-03-06)
7
+
8
+ **Note:** Version bump only for package @parca/profile
9
+
6
10
  ## 0.16.130 (2023-03-06)
7
11
 
8
12
  **Note:** Version bump only for package @parca/profile
@@ -45,12 +45,17 @@ export function ProfileSelectionFromParams(expression, from, to, mergeFrom, merg
45
45
  expression !== undefined) {
46
46
  // TODO: Refactor parsing the query and adding matchers
47
47
  var query_1 = Query.parse(expression);
48
- ParseLabels(labels !== null && labels !== void 0 ? labels : ['']).forEach(function (l) {
49
- var _a = query_1.setMatcher(l.name, l.value), newQuery = _a[0], changed = _a[1];
50
- if (changed) {
51
- query_1 = newQuery;
52
- }
53
- });
48
+ if (labels !== undefined) {
49
+ ParseLabels(labels !== null && labels !== void 0 ? labels : ['']).forEach(function (l) {
50
+ var hasLabels = labels.length > 0 && labels.filter(function (val) { return val !== ''; }).length > 0;
51
+ if (hasLabels) {
52
+ var _a = query_1.setMatcher(l.name, l.value), newQuery = _a[0], changed = _a[1];
53
+ if (changed) {
54
+ query_1 = newQuery;
55
+ }
56
+ }
57
+ });
58
+ }
54
59
  return new MergedProfileSelection(parseInt(mergeFrom), parseInt(mergeTo), query_1, filterQuery);
55
60
  }
56
61
  return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parca/profile",
3
- "version": "0.16.130",
3
+ "version": "0.16.131",
4
4
  "description": "Profile viewing libraries",
5
5
  "dependencies": {
6
6
  "@parca/client": "^0.16.65",
@@ -45,5 +45,5 @@
45
45
  "access": "public",
46
46
  "registry": "https://registry.npmjs.org/"
47
47
  },
48
- "gitHead": "2eb0e54d2fdb21adfd76f91deef4d8ab33362cac"
48
+ "gitHead": "d60fe1c35d044d0ab89c15b6717fd6615cc4bd3a"
49
49
  }
@@ -82,12 +82,17 @@ export function ProfileSelectionFromParams(
82
82
  ) {
83
83
  // TODO: Refactor parsing the query and adding matchers
84
84
  let query = Query.parse(expression);
85
- ParseLabels(labels ?? ['']).forEach(l => {
86
- const [newQuery, changed] = query.setMatcher(l.name, l.value);
87
- if (changed) {
88
- query = newQuery;
89
- }
90
- });
85
+ if (labels !== undefined) {
86
+ ParseLabels(labels ?? ['']).forEach(l => {
87
+ const hasLabels = labels.length > 0 && labels.filter(val => val !== '').length > 0;
88
+ if (hasLabels) {
89
+ const [newQuery, changed] = query.setMatcher(l.name, l.value);
90
+ if (changed) {
91
+ query = newQuery;
92
+ }
93
+ }
94
+ });
95
+ }
91
96
 
92
97
  return new MergedProfileSelection(parseInt(mergeFrom), parseInt(mergeTo), query, filterQuery);
93
98
  }