@backstage/plugin-catalog-react 3.3.0-next.2 → 3.3.0
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 +34 -0
- package/dist/alpha.d.ts +6 -6
- package/package.json +22 -22
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# @backstage/plugin-catalog-react
|
|
2
2
|
|
|
3
|
+
## 3.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 6c74f3f: Added `getCatalogQuery` to `EntityFilter`, which lets filters express their backend constraints as a filter predicate. This supports logical operators such as `$any` and `$not`, as well as matchers like `$hasPrefix`, that cannot be expressed with `getCatalogFilters`. All builtin filters now implement it, and `getCatalogFilters` is deprecated. If a filter implements both, only `getCatalogQuery` is used.
|
|
8
|
+
|
|
9
|
+
The `EntityListProvider` and related components combine the predicates of all active filters into a `query`, and send it to the catalog backend alongside a `filter` built from any remaining legacy filters. When not paginating, entities are now fetched using `streamEntities` instead of `getEntities`, since the latter does not support predicate queries. Tests that mock `getEntities` to provide entities to an `EntityListProvider` need to mock `streamEntities` instead.
|
|
10
|
+
|
|
11
|
+
This requires a catalog backend from Backstage release 1.49 or later, which added support for predicate queries.
|
|
12
|
+
|
|
13
|
+
Since entities are now fetched using `queryEntities` also when not paginating, an `EntityOrderFilter` that orders by a field that some entities lack now excludes those entities from the result, consistent with paginated mode. Previously they were placed last.
|
|
14
|
+
|
|
15
|
+
Some builtin filters became more precise as part of this change:
|
|
16
|
+
|
|
17
|
+
- `EntityTagFilter` with multiple tags now requires all of them on the backend, matching its frontend behavior.
|
|
18
|
+
- `EntityUserFilter.starred` matches the full starred entity refs rather than just their names, and the starred count is computed by the backend.
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- c162b94: Fixed the catalog entity list re-writing the URL on every render, which spammed `history.replaceState` and crashed Safari with a `SecurityError`. The URL is now only updated when it actually changes.
|
|
23
|
+
- Updated dependencies
|
|
24
|
+
- @backstage/frontend-plugin-api@0.18.2
|
|
25
|
+
- @backstage/ui@0.19.0
|
|
26
|
+
- @backstage/catalog-client@1.16.3
|
|
27
|
+
- @backstage/core-compat-api@0.5.16
|
|
28
|
+
- @backstage/errors@1.3.2
|
|
29
|
+
- @backstage/filter-predicates@0.2.0
|
|
30
|
+
- @backstage/core-components@0.18.15
|
|
31
|
+
- @backstage/catalog-model@1.10.2
|
|
32
|
+
- @backstage/core-plugin-api@1.12.11
|
|
33
|
+
- @backstage/integration-react@1.2.23
|
|
34
|
+
- @backstage/plugin-permission-common@0.9.12
|
|
35
|
+
- @backstage/plugin-permission-react@0.5.6
|
|
36
|
+
|
|
3
37
|
## 3.3.0-next.2
|
|
4
38
|
|
|
5
39
|
### Minor Changes
|
package/dist/alpha.d.ts
CHANGED
|
@@ -104,11 +104,11 @@ declare const EntityCardBlueprint: _backstage_frontend_plugin_api.ExtensionBluep
|
|
|
104
104
|
}>;
|
|
105
105
|
inputs: {};
|
|
106
106
|
config: {
|
|
107
|
-
filter: FilterPredicate | undefined;
|
|
107
|
+
filter: string | FilterPredicate | undefined;
|
|
108
108
|
type: "content" | "info" | undefined;
|
|
109
109
|
};
|
|
110
110
|
configInput: {
|
|
111
|
-
filter?: FilterPredicate | undefined;
|
|
111
|
+
filter?: string | FilterPredicate | undefined;
|
|
112
112
|
type?: "content" | "info" | undefined;
|
|
113
113
|
};
|
|
114
114
|
dataRefs: {
|
|
@@ -160,14 +160,14 @@ declare const EntityContentBlueprint: _backstage_frontend_plugin_api.ExtensionBl
|
|
|
160
160
|
config: {
|
|
161
161
|
path: string | undefined;
|
|
162
162
|
title: string | undefined;
|
|
163
|
-
filter: FilterPredicate | undefined;
|
|
163
|
+
filter: string | FilterPredicate | undefined;
|
|
164
164
|
group: string | false | undefined;
|
|
165
165
|
icon: string | undefined;
|
|
166
166
|
};
|
|
167
167
|
configInput: {
|
|
168
168
|
path?: string | undefined;
|
|
169
169
|
title?: string | undefined;
|
|
170
|
-
filter?: FilterPredicate | undefined;
|
|
170
|
+
filter?: string | FilterPredicate | undefined;
|
|
171
171
|
group?: string | false | undefined;
|
|
172
172
|
icon?: string | undefined;
|
|
173
173
|
};
|
|
@@ -202,11 +202,11 @@ declare const EntityContentLayoutBlueprint: _backstage_frontend_plugin_api.Exten
|
|
|
202
202
|
inputs: {};
|
|
203
203
|
config: {
|
|
204
204
|
type: string | undefined;
|
|
205
|
-
filter: FilterPredicate | undefined;
|
|
205
|
+
filter: string | FilterPredicate | undefined;
|
|
206
206
|
};
|
|
207
207
|
configInput: {
|
|
208
208
|
type?: string | undefined;
|
|
209
|
-
filter?: FilterPredicate | undefined;
|
|
209
|
+
filter?: string | FilterPredicate | undefined;
|
|
210
210
|
};
|
|
211
211
|
dataRefs: {
|
|
212
212
|
filterFunction: _backstage_frontend_plugin_api.ConfigurableExtensionDataRef<(entity: Entity) => boolean, "catalog.entity-filter-function", {}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@backstage/plugin-catalog-react",
|
|
3
|
-
"version": "3.3.0
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "A frontend library that helps other Backstage plugins interact with the catalog",
|
|
5
5
|
"backstage": {
|
|
6
6
|
"role": "web-library",
|
|
@@ -73,20 +73,20 @@
|
|
|
73
73
|
"test": "backstage-cli package test"
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
|
-
"@backstage/catalog-client": "1.16.3
|
|
77
|
-
"@backstage/catalog-model": "1.10.2
|
|
78
|
-
"@backstage/core-compat-api": "0.5.16
|
|
79
|
-
"@backstage/core-components": "0.18.15
|
|
80
|
-
"@backstage/core-plugin-api": "1.12.11
|
|
81
|
-
"@backstage/errors": "1.3.2
|
|
82
|
-
"@backstage/filter-predicates": "0.
|
|
83
|
-
"@backstage/frontend-plugin-api": "0.18.2
|
|
84
|
-
"@backstage/integration-react": "1.2.23
|
|
85
|
-
"@backstage/plugin-permission-common": "0.9.12
|
|
86
|
-
"@backstage/plugin-permission-react": "0.5.6
|
|
87
|
-
"@backstage/types": "1.2.2",
|
|
88
|
-
"@backstage/ui": "0.19.0
|
|
89
|
-
"@backstage/version-bridge": "1.0.12",
|
|
76
|
+
"@backstage/catalog-client": "^1.16.3",
|
|
77
|
+
"@backstage/catalog-model": "^1.10.2",
|
|
78
|
+
"@backstage/core-compat-api": "^0.5.16",
|
|
79
|
+
"@backstage/core-components": "^0.18.15",
|
|
80
|
+
"@backstage/core-plugin-api": "^1.12.11",
|
|
81
|
+
"@backstage/errors": "^1.3.2",
|
|
82
|
+
"@backstage/filter-predicates": "^0.2.0",
|
|
83
|
+
"@backstage/frontend-plugin-api": "^0.18.2",
|
|
84
|
+
"@backstage/integration-react": "^1.2.23",
|
|
85
|
+
"@backstage/plugin-permission-common": "^0.9.12",
|
|
86
|
+
"@backstage/plugin-permission-react": "^0.5.6",
|
|
87
|
+
"@backstage/types": "^1.2.2",
|
|
88
|
+
"@backstage/ui": "^0.19.0",
|
|
89
|
+
"@backstage/version-bridge": "^1.0.12",
|
|
90
90
|
"@material-ui/core": "^4.12.2",
|
|
91
91
|
"@material-ui/icons": "^4.9.1",
|
|
92
92
|
"@material-ui/lab": "4.0.0-alpha.61",
|
|
@@ -104,12 +104,12 @@
|
|
|
104
104
|
"zod": "^4.0.0"
|
|
105
105
|
},
|
|
106
106
|
"devDependencies": {
|
|
107
|
-
"@backstage/cli": "0.36.7
|
|
108
|
-
"@backstage/core-app-api": "1.20.6
|
|
109
|
-
"@backstage/frontend-test-utils": "0.6.5
|
|
110
|
-
"@backstage/plugin-catalog-common": "1.2.1
|
|
111
|
-
"@backstage/plugin-scaffolder-common": "2.3.1
|
|
112
|
-
"@backstage/test-utils": "1.7.23
|
|
107
|
+
"@backstage/cli": "^0.36.7",
|
|
108
|
+
"@backstage/core-app-api": "^1.20.6",
|
|
109
|
+
"@backstage/frontend-test-utils": "^0.6.5",
|
|
110
|
+
"@backstage/plugin-catalog-common": "^1.2.1",
|
|
111
|
+
"@backstage/plugin-scaffolder-common": "^2.3.1",
|
|
112
|
+
"@backstage/test-utils": "^1.7.23",
|
|
113
113
|
"@testing-library/dom": "^10.0.0",
|
|
114
114
|
"@testing-library/jest-dom": "^6.0.0",
|
|
115
115
|
"@testing-library/react": "^16.0.0",
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"react-test-renderer": "^16.13.1"
|
|
124
124
|
},
|
|
125
125
|
"peerDependencies": {
|
|
126
|
-
"@backstage/frontend-test-utils": "0.6.5
|
|
126
|
+
"@backstage/frontend-test-utils": "^0.6.5",
|
|
127
127
|
"@types/react": "^17.0.0 || ^18.0.0",
|
|
128
128
|
"react": "^17.0.0 || ^18.0.0",
|
|
129
129
|
"react-dom": "^17.0.0 || ^18.0.0",
|