@backstage/create-app 0.4.18-next.1 → 0.4.20

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,5 +1,250 @@
1
1
  # @backstage/create-app
2
2
 
3
+ ## 0.4.20
4
+
5
+ ### Patch Changes
6
+
7
+ - e725bb812f: Remove SearchContextProvider from `<Root />`
8
+
9
+ The `SidebarSearchModal` exported from `plugin-search` internally renders `SearchContextProvider`, so it can be removed from `Root.tsx`:
10
+
11
+ ```diff
12
+ -import {
13
+ - SidebarSearchModal,
14
+ - SearchContextProvider,
15
+ -} from '@backstage/plugin-search';
16
+ +import { SidebarSearchModal } from '@backstage/plugin-search';
17
+
18
+ ... omitted ...
19
+
20
+ <SidebarGroup label="Search" icon={<SearchIcon />} to="/search">
21
+ - <SearchContextProvider>
22
+ - <SidebarSearchModal />
23
+ - </SearchContextProvider>
24
+ + <SidebarSearchModal />
25
+ </SidebarGroup>
26
+ ```
27
+
28
+ - c77c5c7eb6: Added `backstage.role` to `package.json`
29
+ - Updated dependencies
30
+ - @backstage/cli-common@0.1.7
31
+
32
+ ## 0.4.19
33
+
34
+ ### Patch Changes
35
+
36
+ - 22f4ecb0e6: Switched the `file:` dependency for a `link:` dependency in the `backend` package. This makes sure that the `app` package is linked in rather than copied.
37
+
38
+ To apply this update to an existing app, make the following change to `packages/backend/package.json`:
39
+
40
+ ```diff
41
+ "dependencies": {
42
+ - "app": "file:../app",
43
+ + "app": "link:../app",
44
+ "@backstage/backend-common": "^{{version '@backstage/backend-common'}}",
45
+ ```
46
+
47
+ - 1dd5a02e91: **BREAKING:** Updated `knex` to major version 1, which also implies changing out
48
+ the underlying `sqlite` implementation.
49
+
50
+ The old `sqlite3` NPM library has been abandoned by its maintainers, which has
51
+ led to unhandled security reports and other issues. Therefore, in the `knex` 1.x
52
+ release line they have instead switched over to the [`@vscode/sqlite3`
53
+ library](https://github.com/microsoft/vscode-node-sqlite3) by default, which is
54
+ actively maintained by Microsoft.
55
+
56
+ This means that as you update to this version of Backstage, there are two
57
+ breaking changes that you will have to address in your own repository:
58
+
59
+ ## Bumping `knex` itself
60
+
61
+ All `package.json` files of your repo that used to depend on a 0.x version of
62
+ `knex`, should now be updated to depend on the 1.x release line. This applies in
63
+ particular to `packages/backend`, but may also occur in backend plugins or
64
+ libraries.
65
+
66
+ ```diff
67
+ - "knex": "^0.95.1",
68
+ + "knex": "^1.0.2",
69
+ ```
70
+
71
+ Almost all existing database code will continue to function without modification
72
+ after this bump. The only significant difference that we discovered in the main
73
+ repo, is that the `alter()` function had a slightly different signature in
74
+ migration files. It now accepts an object with `alterType` and `alterNullable`
75
+ fields that clarify a previous grey area such that the intent of the alteration
76
+ is made explicit. This is caught by `tsc` and your editor if you are using the
77
+ `@ts-check` and `@param` syntax in your migration files
78
+ ([example](https://github.com/backstage/backstage/blob/master/plugins/catalog-backend/migrations/20220116144621_remove_legacy.js#L17)),
79
+ which we strongly recommend.
80
+
81
+ See the [`knex` documentation](https://knexjs.org/#Schema-alter) for more
82
+ information about the `alter` syntax.
83
+
84
+ Also see the [`knex` changelog](https://knexjs.org/#changelog) for information
85
+ about breaking changes in the 1.x line; if you are using `RETURNING` you may
86
+ want to make some additional modifications in your code.
87
+
88
+ ## Switching out `sqlite3`
89
+
90
+ All `package.json` files of your repo that used to depend on `sqlite3`, should
91
+ now be updated to depend on `@vscode/sqlite3`. This applies in particular to
92
+ `packages/backend`, but may also occur in backend plugins or libraries.
93
+
94
+ ```diff
95
+ - "sqlite3": "^5.0.1",
96
+ + "@vscode/sqlite3": "^5.0.7",
97
+ ```
98
+
99
+ These should be functionally equivalent, except that the new library will have
100
+ addressed some long standing problems with old transitive dependencies etc.
101
+
102
+ ## 0.4.19-next.0
103
+
104
+ ### Patch Changes
105
+
106
+ - 22f4ecb0e6: Switched the `file:` dependency for a `link:` dependency in the `backend` package. This makes sure that the `app` package is linked in rather than copied.
107
+
108
+ To apply this update to an existing app, make the following change to `packages/backend/package.json`:
109
+
110
+ ```diff
111
+ "dependencies": {
112
+ - "app": "file:../app",
113
+ + "app": "link:../app",
114
+ "@backstage/backend-common": "^{{version '@backstage/backend-common'}}",
115
+ ```
116
+
117
+ - 1dd5a02e91: **BREAKING:** Updated `knex` to major version 1, which also implies changing out
118
+ the underlying `sqlite` implementation.
119
+
120
+ The old `sqlite3` NPM library has been abandoned by its maintainers, which has
121
+ led to unhandled security reports and other issues. Therefore, in the `knex` 1.x
122
+ release line they have instead switched over to the [`@vscode/sqlite3`
123
+ library](https://github.com/microsoft/vscode-node-sqlite3) by default, which is
124
+ actively maintained by Microsoft.
125
+
126
+ This means that as you update to this version of Backstage, there are two
127
+ breaking changes that you will have to address in your own repository:
128
+
129
+ ## Bumping `knex` itself
130
+
131
+ All `package.json` files of your repo that used to depend on a 0.x version of
132
+ `knex`, should now be updated to depend on the 1.x release line. This applies in
133
+ particular to `packages/backend`, but may also occur in backend plugins or
134
+ libraries.
135
+
136
+ ```diff
137
+ - "knex": "^0.95.1",
138
+ + "knex": "^1.0.2",
139
+ ```
140
+
141
+ Almost all existing database code will continue to function without modification
142
+ after this bump. The only significant difference that we discovered in the main
143
+ repo, is that the `alter()` function had a slightly different signature in
144
+ migration files. It now accepts an object with `alterType` and `alterNullable`
145
+ fields that clarify a previous grey area such that the intent of the alteration
146
+ is made explicit. This is caught by `tsc` and your editor if you are using the
147
+ `@ts-check` and `@param` syntax in your migration files
148
+ ([example](https://github.com/backstage/backstage/blob/master/plugins/catalog-backend/migrations/20220116144621_remove_legacy.js#L17)),
149
+ which we strongly recommend.
150
+
151
+ See the [`knex` documentation](https://knexjs.org/#Schema-alter) for more
152
+ information about the `alter` syntax.
153
+
154
+ Also see the [`knex` changelog](https://knexjs.org/#changelog) for information
155
+ about breaking changes in the 1.x line; if you are using `RETURNING` you may
156
+ want to make some additional modifications in your code.
157
+
158
+ ## Switching out `sqlite3`
159
+
160
+ All `package.json` files of your repo that used to depend on `sqlite3`, should
161
+ now be updated to depend on `@vscode/sqlite3`. This applies in particular to
162
+ `packages/backend`, but may also occur in backend plugins or libraries.
163
+
164
+ ```diff
165
+ - "sqlite3": "^5.0.1",
166
+ + "@vscode/sqlite3": "^5.0.7",
167
+ ```
168
+
169
+ These should be functionally equivalent, except that the new library will have
170
+ addressed some long standing problems with old transitive dependencies etc.
171
+
172
+ ## 0.4.18
173
+
174
+ ### Patch Changes
175
+
176
+ - 5bd0ce9e62: chore(deps): bump `inquirer` from 7.3.3 to 8.2.0
177
+ - f27f5197e2: Apply the fix from `0.4.16`, which is part of the `v0.65.1` release of Backstage.
178
+ - 2687029a67: Update backend-to-backend auth link in configuration file comment
179
+ - 24ef62048c: Adds missing `/catalog-graph` route to `<CatalogGraphPage/>`.
180
+
181
+ To fix this problem for a recently created app please update your `app/src/App.tsx`
182
+
183
+ ```diff
184
+ + import { CatalogGraphPage } from '@backstage/plugin-catalog-graph';
185
+
186
+ ... omitted ...
187
+
188
+ </Route>
189
+ <Route path="/settings" element={<UserSettingsPage />} />
190
+ + <Route path="/catalog-graph" element={<CatalogGraphPage />} />
191
+ </FlatRoutes>
192
+ ```
193
+
194
+ - ba59832aed: Permission the `catalog-import` route
195
+
196
+ The following changes are **required** if you intend to add permissions to your existing app.
197
+
198
+ Use the `PermissionedRoute` for `CatalogImportPage` instead of the normal `Route`:
199
+
200
+ ```diff
201
+ // packages/app/src/App.tsx
202
+ ...
203
+ + import { PermissionedRoute } from '@backstage/plugin-permission-react';
204
+ + import { catalogEntityCreatePermission } from '@backstage/plugin-catalog-common';
205
+
206
+ ...
207
+
208
+ - <Route path="/catalog-import" element={<CatalogImportPage />} />
209
+ + <PermissionedRoute
210
+ + path="/catalog-import"
211
+ + permission={catalogEntityCreatePermission}
212
+ + element={<CatalogImportPage />}
213
+ + />
214
+ ```
215
+
216
+ - cef64b1561: Added `tokenManager` as a required property for the auth-backend `createRouter` function. This dependency is used to issue server tokens that are used by the `CatalogIdentityClient` when looking up users and their group membership during authentication.
217
+
218
+ These changes are **required** to `packages/backend/src/plugins/auth.ts`:
219
+
220
+ ```diff
221
+ export default async function createPlugin({
222
+ logger,
223
+ database,
224
+ config,
225
+ discovery,
226
+ + tokenManager,
227
+ }: PluginEnvironment): Promise<Router> {
228
+ return await createRouter({
229
+ logger,
230
+ config,
231
+ database,
232
+ discovery,
233
+ + tokenManager,
234
+ });
235
+ }
236
+ ```
237
+
238
+ - e39d88bd84: Switched the `app` dependency in the backend to use a file target rather than version.
239
+
240
+ To apply this change to an existing app, make the following change to `packages/backend/package.json`:
241
+
242
+ ```diff
243
+ "dependencies": {
244
+ - "app": "0.0.0",
245
+ + "app": "file:../app",
246
+ ```
247
+
3
248
  ## 0.4.18-next.1
4
249
 
5
250
  ### Patch Changes
@@ -125,11 +370,18 @@
125
370
  }
126
371
  ```
127
372
 
373
+ The `.fromConfig` of the `DefaultCatalogCollator` also now takes a `tokenManager` as a parameter.
374
+
375
+ ```diff
376
+ - collator: DefaultCatalogCollator.fromConfig(config, { discovery }),
377
+ + collator: DefaultCatalogCollator.fromConfig(config, { discovery, tokenManager }),
378
+ ```
379
+
128
380
  - a0d446c8ec: Replaced EntitySystemDiagramCard with EntityCatalogGraphCard
129
381
 
130
382
  To make this change to an existing app:
131
383
 
132
- Add `@backstage/plugin-catalog-graph` as a `dependency` in `packages/app/package.json`
384
+ Add `@backstage/plugin-catalog-graph` as a `dependency` in `packages/app/package.json` or `cd packages/app && yarn add @backstage/plugin-catalog-graph`.
133
385
 
134
386
  Apply the following changes to the `packages/app/src/components/catalog/EntityPage.tsx` file:
135
387
 
package/dist/index.cjs.js CHANGED
@@ -55,91 +55,91 @@ ${chalk__default["default"].red(`${error}`)}
55
55
  }
56
56
  }
57
57
 
58
- var version$G = "0.4.18-next.1";
58
+ var version$G = "0.4.20";
59
59
 
60
- var version$F = "0.1.6-next.1";
60
+ var version$F = "0.1.8";
61
61
 
62
- var version$E = "0.10.6-next.0";
62
+ var version$E = "0.10.8";
63
63
 
64
- var version$D = "0.1.5-next.0";
64
+ var version$D = "0.1.7";
65
65
 
66
- var version$C = "0.5.5";
66
+ var version$C = "0.7.0";
67
67
 
68
- var version$B = "0.9.10";
68
+ var version$B = "0.10.0";
69
69
 
70
- var version$A = "0.13.1-next.1";
70
+ var version$A = "0.14.0";
71
71
 
72
- var version$z = "0.1.13";
72
+ var version$z = "0.1.14";
73
73
 
74
- var version$y = "0.5.2-next.0";
74
+ var version$y = "0.5.3";
75
75
 
76
- var version$x = "0.8.7-next.1";
76
+ var version$x = "0.8.9";
77
77
 
78
- var version$w = "0.6.0";
78
+ var version$w = "0.6.1";
79
79
 
80
- var version$v = "0.2.0";
80
+ var version$v = "0.2.1";
81
81
 
82
- var version$u = "0.1.20-next.0";
82
+ var version$u = "0.1.22";
83
83
 
84
- var version$t = "0.2.4-next.0";
84
+ var version$t = "0.2.5";
85
85
 
86
- var version$s = "0.2.14";
86
+ var version$s = "0.2.15";
87
87
 
88
- var version$r = "0.7.1-next.0";
88
+ var version$r = "0.7.3";
89
89
 
90
- var version$q = "0.3.23-next.0";
90
+ var version$q = "0.3.25";
91
91
 
92
- var version$p = "0.9.0-next.1";
92
+ var version$p = "0.10.1";
93
93
 
94
- var version$o = "0.7.11-next.1";
94
+ var version$o = "0.8.0";
95
95
 
96
- var version$n = "0.1.2-next.0";
96
+ var version$n = "0.1.3";
97
97
 
98
- var version$m = "0.6.13-next.1";
98
+ var version$m = "0.6.15";
99
99
 
100
- var version$l = "0.21.2-next.1";
100
+ var version$l = "0.21.4";
101
101
 
102
- var version$k = "0.2.9-next.0";
102
+ var version$k = "0.2.11";
103
103
 
104
- var version$j = "0.8.0-next.0";
104
+ var version$j = "0.8.2";
105
105
 
106
- var version$i = "0.2.36-next.0";
106
+ var version$i = "0.2.38";
107
107
 
108
- var version$h = "0.3.28-next.0";
108
+ var version$h = "0.3.30";
109
109
 
110
- var version$g = "0.4.34-next.0";
110
+ var version$g = "0.4.36";
111
111
 
112
- var version$f = "0.2.36-next.0";
112
+ var version$f = "0.2.38";
113
113
 
114
- var version$e = "0.4.1-next.0";
114
+ var version$e = "0.4.3";
115
115
 
116
- var version$d = "0.4.0";
116
+ var version$d = "0.5.0";
117
117
 
118
- var version$c = "0.3.0";
118
+ var version$c = "0.3.1";
119
119
 
120
- var version$b = "0.4.2-next.1";
120
+ var version$b = "0.5.0";
121
121
 
122
- var version$a = "0.2.17-next.1";
122
+ var version$a = "0.2.19";
123
123
 
124
- var version$9 = "0.1.20-next.1";
124
+ var version$9 = "0.1.22";
125
125
 
126
- var version$8 = "0.12.1-next.1";
126
+ var version$8 = "0.12.3";
127
127
 
128
- var version$7 = "0.15.23-next.1";
128
+ var version$7 = "0.16.0";
129
129
 
130
- var version$6 = "0.6.1-next.0";
130
+ var version$6 = "0.7.0";
131
131
 
132
- var version$5 = "0.4.1-next.1";
132
+ var version$5 = "0.4.3";
133
133
 
134
- var version$4 = "0.4.5";
134
+ var version$4 = "0.4.6";
135
135
 
136
- var version$3 = "0.5.4-next.0";
136
+ var version$3 = "0.5.6";
137
137
 
138
- var version$2 = "0.13.2-next.1";
138
+ var version$2 = "0.13.4";
139
139
 
140
- var version$1 = "0.13.2-next.0";
140
+ var version$1 = "0.13.4";
141
141
 
142
- var version = "0.3.18-next.0";
142
+ var version = "0.3.20";
143
143
 
144
144
  const packageVersions = {
145
145
  "@backstage/app-defaults": version$F,
package/package.json CHANGED
@@ -1,11 +1,14 @@
1
1
  {
2
2
  "name": "@backstage/create-app",
3
3
  "description": "A CLI that helps you create your own Backstage app",
4
- "version": "0.4.18-next.1",
4
+ "version": "0.4.20",
5
5
  "private": false,
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
9
+ "backstage": {
10
+ "role": "cli"
11
+ },
9
12
  "homepage": "https://backstage.io",
10
13
  "repository": {
11
14
  "type": "git",
@@ -21,16 +24,16 @@
21
24
  "backstage-create-app": "bin/backstage-create-app"
22
25
  },
23
26
  "scripts": {
24
- "build": "backstage-cli build --outputs cjs",
25
- "lint": "backstage-cli lint",
26
- "test": "backstage-cli test",
27
- "clean": "backstage-cli clean",
27
+ "build": "backstage-cli package build",
28
+ "lint": "backstage-cli package lint",
29
+ "test": "backstage-cli package test",
30
+ "clean": "backstage-cli package clean",
28
31
  "prepack": "node scripts/prepack.js",
29
32
  "postpack": "node scripts/postpack.js",
30
33
  "start": "nodemon --"
31
34
  },
32
35
  "dependencies": {
33
- "@backstage/cli-common": "^0.1.6",
36
+ "@backstage/cli-common": "^0.1.7",
34
37
  "chalk": "^4.0.0",
35
38
  "commander": "^6.1.0",
36
39
  "fs-extra": "9.1.0",
@@ -57,5 +60,5 @@
57
60
  "dist",
58
61
  "templates"
59
62
  ],
60
- "gitHead": "d6da97a1edeb21fcefc682d91916987ba9f3d89a"
63
+ "gitHead": "4805c3d13ce9bfc369e53c271b1b95e722b3b4dc"
61
64
  }
@@ -28,10 +28,7 @@ import {
28
28
  Settings as SidebarSettings,
29
29
  UserSettingsSignInAvatar,
30
30
  } from '@backstage/plugin-user-settings';
31
- import {
32
- SidebarSearchModal,
33
- SearchContextProvider,
34
- } from '@backstage/plugin-search';
31
+ import { SidebarSearchModal } from '@backstage/plugin-search';
35
32
  import {
36
33
  Sidebar,
37
34
  sidebarConfig,
@@ -84,9 +81,7 @@ export const Root = ({ children }: PropsWithChildren<{}>) => (
84
81
  <Sidebar>
85
82
  <SidebarLogo />
86
83
  <SidebarGroup label="Search" icon={<SearchIcon />} to="/search">
87
- <SearchContextProvider>
88
- <SidebarSearchModal />
89
- </SearchContextProvider>{' '}
84
+ <SidebarSearchModal />
90
85
  </SidebarGroup>
91
86
  <SidebarDivider />
92
87
  <SidebarGroup label="Menu" icon={<MenuIcon />}>
@@ -14,7 +14,7 @@
14
14
  "migrate:create": "knex migrate:make -x ts"
15
15
  },
16
16
  "dependencies": {
17
- "app": "file:../app",
17
+ "app": "link:../app",
18
18
  "@backstage/backend-common": "^{{version '@backstage/backend-common'}}",
19
19
  "@backstage/backend-tasks": "^{{version '@backstage/backend-tasks'}}",
20
20
  "@backstage/catalog-model": "^{{version '@backstage/catalog-model'}}",
@@ -40,7 +40,7 @@
40
40
  "pg": "^8.3.0",
41
41
  {{/if}}
42
42
  {{#if dbTypeSqlite}}
43
- "sqlite3": "^5.0.1",
43
+ "@vscode/sqlite3": "^5.0.7",
44
44
  {{/if}}
45
45
  "winston": "^3.2.1"
46
46
  },