@backstage/core-app-api 1.3.0-next.4 → 1.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.
Files changed (2) hide show
  1. package/CHANGELOG.md +70 -0
  2. package/package.json +7 -7
package/CHANGELOG.md CHANGED
@@ -1,5 +1,75 @@
1
1
  # @backstage/core-app-api
2
2
 
3
+ ## 1.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - e0d9c9559a: Added a new `AppRouter` component and `app.createRoot()` method that replaces `app.getRouter()` and `app.getProvider()`, which are now deprecated. The new `AppRouter` component is a drop-in replacement for the old router component, while the new `app.createRoot()` method is used instead of the old provider component.
8
+
9
+ An old app setup might look like this:
10
+
11
+ ```tsx
12
+ const app = createApp(/* ... */);
13
+
14
+ const AppProvider = app.getProvider();
15
+ const AppRouter = app.getRouter();
16
+
17
+ const routes = ...;
18
+
19
+ const App = () => (
20
+ <AppProvider>
21
+ <AlertDisplay />
22
+ <OAuthRequestDialog />
23
+ <AppRouter>
24
+ <Root>{routes}</Root>
25
+ </AppRouter>
26
+ </AppProvider>
27
+ );
28
+
29
+ export default App;
30
+ ```
31
+
32
+ With these new APIs, the setup now looks like this:
33
+
34
+ ```tsx
35
+ import { AppRouter } from '@backstage/core-app-api';
36
+
37
+ const app = createApp(/* ... */);
38
+
39
+ const routes = ...;
40
+
41
+ export default app.createRoot(
42
+ <>
43
+ <AlertDisplay />
44
+ <OAuthRequestDialog />
45
+ <AppRouter>
46
+ <Root>{routes}</Root>
47
+ </AppRouter>
48
+ </>,
49
+ );
50
+ ```
51
+
52
+ Note that `app.createRoot()` accepts a React element, rather than a component.
53
+
54
+ ### Patch Changes
55
+
56
+ - d3fea4ae0a: Internal fixes to avoid implicit usage of globals
57
+ - b05dcd5530: Move the `zod` dependency to a version that does not collide with other libraries
58
+ - b4b5b02315: Tweak feature flag registration so that it happens immediately before the first rendering of the app, rather than just after.
59
+ - 6870b43dd1: Fix for the automatic rewriting of base URLs.
60
+ - 203271b746: Prevent duplicate feature flag components from rendering in the settings when using <FeatureFlagged /> components
61
+ - 3280711113: Updated dependency `msw` to `^0.49.0`.
62
+ - 19356df560: Updated dependency `zen-observable` to `^0.9.0`.
63
+ - c3fa90e184: Updated dependency `zen-observable` to `^0.10.0`.
64
+ - 8015ff1258: Tweaked wording to use inclusive terminology
65
+ - 653d7912ac: Made `WebStorage` notify its subscribers when `localStorage` values change in other tabs/windows
66
+ - 63310e3987: Apps will now rewrite the `app.baseUrl` configuration to match the current `location.origin`. The `backend.baseUrl` will also be rewritten in the same way when the `app.baseUrl` and `backend.baseUrl` have matching origins. This will reduce the need for separate frontend builds for different environments.
67
+ - Updated dependencies
68
+ - @backstage/core-plugin-api@1.2.0
69
+ - @backstage/version-bridge@1.0.3
70
+ - @backstage/types@1.0.2
71
+ - @backstage/config@1.0.5
72
+
3
73
  ## 1.3.0-next.4
4
74
 
5
75
  ### Minor Changes
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@backstage/core-app-api",
3
3
  "description": "Core app API used by Backstage apps",
4
- "version": "1.3.0-next.4",
4
+ "version": "1.3.0",
5
5
  "publishConfig": {
6
6
  "access": "public",
7
7
  "main": "dist/index.esm.js",
@@ -32,10 +32,10 @@
32
32
  "start": "backstage-cli package start"
33
33
  },
34
34
  "dependencies": {
35
- "@backstage/config": "^1.0.5-next.1",
36
- "@backstage/core-plugin-api": "^1.2.0-next.2",
37
- "@backstage/types": "^1.0.2-next.1",
38
- "@backstage/version-bridge": "^1.0.3-next.0",
35
+ "@backstage/config": "^1.0.5",
36
+ "@backstage/core-plugin-api": "^1.2.0",
37
+ "@backstage/types": "^1.0.2",
38
+ "@backstage/version-bridge": "^1.0.3",
39
39
  "@types/prop-types": "^15.7.3",
40
40
  "prop-types": "^15.7.2",
41
41
  "react-use": "^17.2.4",
@@ -48,8 +48,8 @@
48
48
  "react-router-dom": "6.0.0-beta.0 || ^6.3.0"
49
49
  },
50
50
  "devDependencies": {
51
- "@backstage/cli": "^0.22.0-next.4",
52
- "@backstage/test-utils": "^1.2.3-next.4",
51
+ "@backstage/cli": "^0.22.0",
52
+ "@backstage/test-utils": "^1.2.3",
53
53
  "@testing-library/jest-dom": "^5.10.1",
54
54
  "@testing-library/react": "^12.1.3",
55
55
  "@testing-library/react-hooks": "^8.0.0",