@backstage/create-app 0.0.0-nightly-20220509024521 → 0.0.0-nightly-20220510022953

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
@@ -1,6 +1,6 @@
1
1
  # @backstage/create-app
2
2
 
3
- ## 0.0.0-nightly-20220509024521
3
+ ## 0.0.0-nightly-20220510022953
4
4
 
5
5
  ### Patch Changes
6
6
 
@@ -122,6 +122,43 @@
122
122
  ```
123
123
 
124
124
  - 806427545f: Added a link to the `${GITHUB_TOKEN}` to document how to generate a token
125
+ - 3a74e203a8: Implement highlighting matching terms in search results. To enable this for an existing app, make the following changes:
126
+
127
+ ```diff
128
+ // packages/app/src/components/search/SearchPage.tsx
129
+ ...
130
+ - {results.map(({ type, document }) => {
131
+ + {results.map(({ type, document, highlight }) => {
132
+ switch (type) {
133
+ case 'software-catalog':
134
+ return (
135
+ <CatalogSearchResultListItem
136
+ key={document.location}
137
+ result={document}
138
+ + highlight={highlight}
139
+ />
140
+ );
141
+ case 'techdocs':
142
+ return (
143
+ <TechDocsSearchResultListItem
144
+ key={document.location}
145
+ result={document}
146
+ + highlight={highlight}
147
+ />
148
+ );
149
+ default:
150
+ return (
151
+ <DefaultResultListItem
152
+ key={document.location}
153
+ result={document}
154
+ + highlight={highlight}
155
+ />
156
+ );
157
+ }
158
+ })}
159
+ ...
160
+ ```
161
+
125
162
  - d41f19ca2a: Bumped the `typescript` version in the template to `~4.6.4`.
126
163
 
127
164
  To apply this change to an existing app, make the following change to the root `package.json`:
@@ -135,7 +172,7 @@
135
172
  ```
136
173
 
137
174
  - Updated dependencies
138
- - @backstage/cli-common@0.0.0-nightly-20220509024521
175
+ - @backstage/cli-common@0.0.0-nightly-20220510022953
139
176
 
140
177
  ## 0.4.27-next.1
141
178
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@backstage/create-app",
3
3
  "description": "A CLI that helps you create your own Backstage app",
4
- "version": "0.0.0-nightly-20220509024521",
4
+ "version": "0.0.0-nightly-20220510022953",
5
5
  "private": false,
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -33,7 +33,7 @@
33
33
  "start": "nodemon --"
34
34
  },
35
35
  "dependencies": {
36
- "@backstage/cli-common": "^0.0.0-nightly-20220509024521",
36
+ "@backstage/cli-common": "^0.0.0-nightly-20220510022953",
37
37
  "chalk": "^4.0.0",
38
38
  "commander": "^9.1.0",
39
39
  "fs-extra": "10.1.0",
@@ -112,13 +112,14 @@ const SearchPage = () => {
112
112
  <SearchResult>
113
113
  {({ results }) => (
114
114
  <List>
115
- {results.map(({ type, document }) => {
115
+ {results.map(({ type, document, highlight }) => {
116
116
  switch (type) {
117
117
  case 'software-catalog':
118
118
  return (
119
119
  <CatalogSearchResultListItem
120
120
  key={document.location}
121
121
  result={document}
122
+ highlight={highlight}
122
123
  />
123
124
  );
124
125
  case 'techdocs':
@@ -126,6 +127,7 @@ const SearchPage = () => {
126
127
  <TechDocsSearchResultListItem
127
128
  key={document.location}
128
129
  result={document}
130
+ highlight={highlight}
129
131
  />
130
132
  );
131
133
  default:
@@ -133,6 +135,7 @@ const SearchPage = () => {
133
135
  <DefaultResultListItem
134
136
  key={document.location}
135
137
  result={document}
138
+ highlight={highlight}
136
139
  />
137
140
  );
138
141
  }