@parca/profile 0.19.30 → 0.19.31
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 +4 -0
- package/dist/ProfileExplorer/index.d.ts.map +1 -1
- package/dist/ProfileExplorer/index.js +4 -12
- package/dist/ProfileSelector/useAutoQuerySelector.js +2 -2
- package/dist/ProfileSource.js +1 -1
- package/dist/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.js +3 -3
- package/package.json +6 -6
- package/src/ProfileExplorer/index.tsx +4 -19
- package/src/ProfileSelector/useAutoQuerySelector.ts +2 -2
- package/src/ProfileSource.tsx +1 -1
- package/src/ProfileView/components/ProfileFilters/useProfileFiltersUrlState.ts +3 -3
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.19.31](https://github.com/parca-dev/parca/compare/@parca/profile@0.19.30...@parca/profile@0.19.31) (2025-08-04)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @parca/profile
|
|
9
|
+
|
|
6
10
|
## 0.19.30 (2025-07-29)
|
|
7
11
|
|
|
8
12
|
**Note:** Version bump only for package @parca/profile
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ProfileExplorer/index.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAIjD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ProfileExplorer/index.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAC,kBAAkB,EAAC,MAAM,eAAe,CAAC;AAIjD,OAAO,EAAwC,KAAK,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAU9F,UAAU,oBAAoB;IAC5B,WAAW,EAAE,kBAAkB,CAAC;IAChC,WAAW,EAAE,GAAG,CAAC;IACjB,UAAU,EAAE,gBAAgB,CAAC;CAC9B;AAaD,eAAO,MAAM,sBAAsB,GAAI,YAAY,MAAM,GAAG,EAAE,KAAG,MAGhE,CAAC;AAiBF,eAAO,MAAM,iBAAiB,GAAI,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAiB5E,CAAC;AA4TF,QAAA,MAAM,eAAe,GAAI,2CAItB,oBAAoB,KAAG,GAAG,CAAC,OAkB7B,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -16,7 +16,7 @@ import { Provider } from 'react-redux';
|
|
|
16
16
|
import { DateTimeRange, KeyDownProvider, useParcaContext } from '@parca/components';
|
|
17
17
|
import { Query } from '@parca/parser';
|
|
18
18
|
import { createStore } from '@parca/store';
|
|
19
|
-
import { capitalizeOnlyFirstLetter,
|
|
19
|
+
import { capitalizeOnlyFirstLetter, safeDecode } from '@parca/utilities';
|
|
20
20
|
import { ProfileSelectionFromParams, SuffixParams } from '..';
|
|
21
21
|
import { useProfileTypes } from '../ProfileSelector';
|
|
22
22
|
import { useResetStateOnNewSearch } from '../ProfileView/hooks/useResetStateOnNewSearch';
|
|
@@ -57,14 +57,6 @@ export const filterEmptyParams = (o) => {
|
|
|
57
57
|
const filterSuffix = (o, suffix) => Object.fromEntries(Object.entries(o)
|
|
58
58
|
.filter(([key]) => !key.endsWith(suffix))
|
|
59
59
|
.map(([key, value]) => {
|
|
60
|
-
if (typeof value === 'string') {
|
|
61
|
-
// Only encode if not already encoded
|
|
62
|
-
return [key, isUrlEncoded(value) ? value : encodeURIComponent(value)];
|
|
63
|
-
}
|
|
64
|
-
if (Array.isArray(value)) {
|
|
65
|
-
// Only encode array values if not already encoded
|
|
66
|
-
return [key, value.map(v => (isUrlEncoded(v) ? v : encodeURIComponent(v)))];
|
|
67
|
-
}
|
|
68
60
|
return [key, value];
|
|
69
61
|
}));
|
|
70
62
|
const swapQueryParameters = (o) => {
|
|
@@ -131,9 +123,9 @@ const ProfileExplorerApp = ({ queryClient, queryParams, navigateTo, }) => {
|
|
|
131
123
|
from_a = sanitizedRange.from_a;
|
|
132
124
|
to_a = sanitizedRange.to_a;
|
|
133
125
|
if ((queryParams?.expression_a ?? '') !== '')
|
|
134
|
-
queryParams.expression_a =
|
|
126
|
+
queryParams.expression_a = safeDecode(expression_a);
|
|
135
127
|
if ((queryParams?.expression_b ?? '') !== '')
|
|
136
|
-
queryParams.expression_b =
|
|
128
|
+
queryParams.expression_b = safeDecode(expression_b);
|
|
137
129
|
const selectProfile = (p, suffix) => {
|
|
138
130
|
return navigateTo('/', {
|
|
139
131
|
...queryParams,
|
|
@@ -209,7 +201,7 @@ const ProfileExplorerApp = ({ queryClient, queryParams, navigateTo, }) => {
|
|
|
209
201
|
? {
|
|
210
202
|
merge_from_a: q.mergeFrom,
|
|
211
203
|
merge_to_a: q.mergeTo,
|
|
212
|
-
selection_a:
|
|
204
|
+
selection_a: q.expression,
|
|
213
205
|
}
|
|
214
206
|
: {};
|
|
215
207
|
return navigateTo('/',
|
|
@@ -39,12 +39,12 @@ export const useAutoQuerySelector = ({ selectedProfileName, profileTypesData, se
|
|
|
39
39
|
const sumBy = queryA.sumBy?.join(',');
|
|
40
40
|
let compareQuery = {
|
|
41
41
|
compare_a: 'true',
|
|
42
|
-
expression_a:
|
|
42
|
+
expression_a: queryA.expression,
|
|
43
43
|
from_a: queryA.from.toString(),
|
|
44
44
|
to_a: queryA.to.toString(),
|
|
45
45
|
time_selection_a: queryA.timeSelection,
|
|
46
46
|
compare_b: 'true',
|
|
47
|
-
expression_b:
|
|
47
|
+
expression_b: queryA.expression,
|
|
48
48
|
from_b: queryA.from.toString(),
|
|
49
49
|
to_b: queryA.to.toString(),
|
|
50
50
|
time_selection_b: queryA.timeSelection,
|
package/dist/ProfileSource.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
// See the License for the specific language governing permissions and
|
|
12
12
|
// limitations under the License.
|
|
13
13
|
import { useURLStateCustom } from '@parca/components';
|
|
14
|
-
import {
|
|
14
|
+
import { safeDecode } from '@parca/utilities';
|
|
15
15
|
import { isPresetKey } from './filterPresets';
|
|
16
16
|
// Compact encoding mappings
|
|
17
17
|
const TYPE_MAP = {
|
|
@@ -63,8 +63,8 @@ export const decodeProfileFilters = (encoded) => {
|
|
|
63
63
|
if (encoded === '' || encoded === undefined)
|
|
64
64
|
return [];
|
|
65
65
|
try {
|
|
66
|
-
//
|
|
67
|
-
const decodedString =
|
|
66
|
+
// Decode once since we fixed the double encoding issue
|
|
67
|
+
const decodedString = safeDecode(encoded);
|
|
68
68
|
return decodedString.split(',').map((filter, index) => {
|
|
69
69
|
const parts = filter.split(':');
|
|
70
70
|
// Handle preset filters (format: p:presetKey:value)
|
package/package.json
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@parca/profile",
|
|
3
|
-
"version": "0.19.
|
|
3
|
+
"version": "0.19.31",
|
|
4
4
|
"description": "Profile viewing libraries",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@floating-ui/react": "^0.27.12",
|
|
7
7
|
"@headlessui/react": "^1.7.19",
|
|
8
8
|
"@iconify/react": "^4.0.0",
|
|
9
9
|
"@parca/client": "0.17.3",
|
|
10
|
-
"@parca/components": "0.16.
|
|
10
|
+
"@parca/components": "0.16.354",
|
|
11
11
|
"@parca/dynamicsize": "0.16.65",
|
|
12
|
-
"@parca/hooks": "0.0.
|
|
12
|
+
"@parca/hooks": "0.0.99",
|
|
13
13
|
"@parca/icons": "0.16.72",
|
|
14
14
|
"@parca/parser": "0.16.79",
|
|
15
|
-
"@parca/store": "0.16.
|
|
16
|
-
"@parca/utilities": "0.0.
|
|
15
|
+
"@parca/store": "0.16.183",
|
|
16
|
+
"@parca/utilities": "0.0.106",
|
|
17
17
|
"@popperjs/core": "^2.11.8",
|
|
18
18
|
"@protobuf-ts/runtime-rpc": "^2.5.0",
|
|
19
19
|
"@storybook/preview-api": "^8.4.3",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"access": "public",
|
|
79
79
|
"registry": "https://registry.npmjs.org/"
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "f3fe191525193d9bdc41d811c009d9314bd98494"
|
|
82
82
|
}
|
|
@@ -19,12 +19,7 @@ import {QueryServiceClient} from '@parca/client';
|
|
|
19
19
|
import {DateTimeRange, KeyDownProvider, useParcaContext} from '@parca/components';
|
|
20
20
|
import {Query} from '@parca/parser';
|
|
21
21
|
import {createStore} from '@parca/store';
|
|
22
|
-
import {
|
|
23
|
-
capitalizeOnlyFirstLetter,
|
|
24
|
-
decodeMultipleEncodings,
|
|
25
|
-
isUrlEncoded,
|
|
26
|
-
type NavigateFunction,
|
|
27
|
-
} from '@parca/utilities';
|
|
22
|
+
import {capitalizeOnlyFirstLetter, safeDecode, type NavigateFunction} from '@parca/utilities';
|
|
28
23
|
|
|
29
24
|
import {ProfileSelection, ProfileSelectionFromParams, SuffixParams} from '..';
|
|
30
25
|
import {QuerySelection, useProfileTypes} from '../ProfileSelector';
|
|
@@ -98,14 +93,6 @@ const filterSuffix = (
|
|
|
98
93
|
Object.entries(o)
|
|
99
94
|
.filter(([key]) => !key.endsWith(suffix))
|
|
100
95
|
.map(([key, value]) => {
|
|
101
|
-
if (typeof value === 'string') {
|
|
102
|
-
// Only encode if not already encoded
|
|
103
|
-
return [key, isUrlEncoded(value) ? value : encodeURIComponent(value)];
|
|
104
|
-
}
|
|
105
|
-
if (Array.isArray(value)) {
|
|
106
|
-
// Only encode array values if not already encoded
|
|
107
|
-
return [key, value.map(v => (isUrlEncoded(v) ? v : encodeURIComponent(v)))];
|
|
108
|
-
}
|
|
109
96
|
return [key, value];
|
|
110
97
|
})
|
|
111
98
|
);
|
|
@@ -227,10 +214,8 @@ const ProfileExplorerApp = ({
|
|
|
227
214
|
from_a = sanitizedRange.from_a;
|
|
228
215
|
to_a = sanitizedRange.to_a;
|
|
229
216
|
|
|
230
|
-
if ((queryParams?.expression_a ?? '') !== '')
|
|
231
|
-
|
|
232
|
-
if ((queryParams?.expression_b ?? '') !== '')
|
|
233
|
-
queryParams.expression_b = decodeMultipleEncodings(expression_b);
|
|
217
|
+
if ((queryParams?.expression_a ?? '') !== '') queryParams.expression_a = safeDecode(expression_a);
|
|
218
|
+
if ((queryParams?.expression_b ?? '') !== '') queryParams.expression_b = safeDecode(expression_b);
|
|
234
219
|
|
|
235
220
|
const selectProfile = (p: ProfileSelection, suffix: string): void => {
|
|
236
221
|
return navigateTo('/', {
|
|
@@ -328,7 +313,7 @@ const ProfileExplorerApp = ({
|
|
|
328
313
|
? {
|
|
329
314
|
merge_from_a: q.mergeFrom,
|
|
330
315
|
merge_to_a: q.mergeTo,
|
|
331
|
-
selection_a:
|
|
316
|
+
selection_a: q.expression,
|
|
332
317
|
}
|
|
333
318
|
: {};
|
|
334
319
|
return navigateTo(
|
|
@@ -72,13 +72,13 @@ export const useAutoQuerySelector = ({
|
|
|
72
72
|
|
|
73
73
|
let compareQuery: Record<string, string> = {
|
|
74
74
|
compare_a: 'true',
|
|
75
|
-
expression_a:
|
|
75
|
+
expression_a: queryA.expression,
|
|
76
76
|
from_a: queryA.from.toString(),
|
|
77
77
|
to_a: queryA.to.toString(),
|
|
78
78
|
time_selection_a: queryA.timeSelection,
|
|
79
79
|
|
|
80
80
|
compare_b: 'true',
|
|
81
|
-
expression_b:
|
|
81
|
+
expression_b: queryA.expression,
|
|
82
82
|
from_b: queryA.from.toString(),
|
|
83
83
|
to_b: queryA.to.toString(),
|
|
84
84
|
time_selection_b: queryA.timeSelection,
|
package/src/ProfileSource.tsx
CHANGED
|
@@ -110,7 +110,7 @@ export class MergedProfileSelection implements ProfileSelection {
|
|
|
110
110
|
return {
|
|
111
111
|
merge_from: this.mergeFrom.toString(),
|
|
112
112
|
merge_to: this.mergeTo.toString(),
|
|
113
|
-
selection:
|
|
113
|
+
selection: this.query.toString(),
|
|
114
114
|
};
|
|
115
115
|
}
|
|
116
116
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
// limitations under the License.
|
|
13
13
|
|
|
14
14
|
import {useURLStateCustom, type ParamValueSetterCustom} from '@parca/components';
|
|
15
|
-
import {
|
|
15
|
+
import {safeDecode} from '@parca/utilities';
|
|
16
16
|
|
|
17
17
|
import {isPresetKey} from './filterPresets';
|
|
18
18
|
import {type ProfileFilter} from './useProfileFilters';
|
|
@@ -73,8 +73,8 @@ export const decodeProfileFilters = (encoded: string): ProfileFilter[] => {
|
|
|
73
73
|
if (encoded === '' || encoded === undefined) return [];
|
|
74
74
|
|
|
75
75
|
try {
|
|
76
|
-
//
|
|
77
|
-
const decodedString =
|
|
76
|
+
// Decode once since we fixed the double encoding issue
|
|
77
|
+
const decodedString = safeDecode(encoded);
|
|
78
78
|
|
|
79
79
|
return decodedString.split(',').map((filter, index) => {
|
|
80
80
|
const parts = filter.split(':');
|