@plone/aurora 1.0.0-alpha.7 → 1.0.0-alpha.9

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
@@ -8,6 +8,22 @@
8
8
 
9
9
  <!-- towncrier release notes start -->
10
10
 
11
+ ## 1.0.0-alpha.9 (2026-09-16)
12
+
13
+ ### Documentation
14
+
15
+ - Update the root-loader how-to and the Prisma tutorial so `rootLoaderData` utilities return the `{ status, data }` envelope that the root loader unwraps and merges. @sneridagh [#169](https://github.com/plone/volto/issues/169)
16
+
17
+ ## 1.0.0-alpha.8 (2026-09-14)
18
+
19
+ ### Breaking
20
+
21
+ - The fixed wiring up the `rootLoaderData` utility envelope in the root loader provokes a breaking change for all `rootLoaderData` utilities so they must return a `{ status, data }` envelope (matching the PloneClient response shape), but the root loader spread the whole envelope onto the root loader data instead of merging each utility's `data`. It now merges `data`, so utilities that namespace their payload (for example `{ status, data: { likes: {...} } }`) are exposed correctly. @sneridagh
22
+
23
+ ### Bugfix
24
+
25
+ - Wire up the `rootLoaderData` utility envelope in the root loader. Utilities return a `{ status, data }` envelope (matching the PloneClient response shape), but the root loader spread the whole envelope onto the root loader data instead of merging each utility's `data`. It now merges `data`, so utilities that namespace their payload (for example `{ status, data: { likes: {...} } }`) are exposed correctly. Acting on `status` is left for a follow-up. @sneridagh
26
+
11
27
  ## 1.0.0-alpha.7 (2026-09-05)
12
28
 
13
29
  ### Internal
@@ -9,6 +9,13 @@ declare module '@plone/types' {
9
9
  interface UtilityTypeMap {
10
10
  client: () => PloneClientUtility;
11
11
  rootContentSubRequest: (args: LoaderUtilityArgs) => Promise<unknown>;
12
+ // A `rootLoaderData` utility returns a `{ status, data }` envelope — the
13
+ // same shape as a PloneClient response — so a utility that queries Plone
14
+ // can pass the response straight through. The root loader merges each
15
+ // utility's `data` into the root loader data (see `app/root.tsx`), so
16
+ // utilities should namespace their `data` under a unique key (for example
17
+ // `{ status, data: { likes: {...} } }`) to avoid clobbering others.
18
+ // NOTE: `status` is not acted upon yet (see TODO in `app/root.tsx`).
12
19
  rootLoaderData: (
13
20
  args: LoaderUtilityArgs,
14
21
  ) => Promise<{ status: number; data: unknown }>;
package/app/root.tsx CHANGED
@@ -77,9 +77,19 @@ export async function loader({ params, request, context }: Route.LoaderArgs) {
77
77
  site,
78
78
  locale,
79
79
  isAuthenticated: user !== null,
80
+ // Each `rootLoaderData` utility returns a `{ status, data }` envelope
81
+ // (see `config/types.ts`). Merge each utility's `data` into the root
82
+ // loader data; utilities namespace their `data` to avoid clobbering.
83
+ // TODO: act on `status` (e.g. propagate a non-2xx to the response).
80
84
  ...rootLoaderDataUtilitiesData
81
85
  .filter((item) => item)
82
- .reduce((acc, item) => ({ ...acc, ...item }), {}),
86
+ .reduce(
87
+ (acc, item) => ({
88
+ ...acc,
89
+ ...(item.data as Record<string, unknown>),
90
+ }),
91
+ {},
92
+ ),
83
93
  };
84
94
 
85
95
  return data(loaderData, {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@plone/aurora",
3
3
  "description": "Plone Aurora is the next-generation frontend for Plone CMS",
4
- "version": "1.0.0-alpha.7",
4
+ "version": "1.0.0-alpha.9",
5
5
  "maintainers": [
6
6
  {
7
7
  "name": "Plone Foundation",
@@ -45,19 +45,19 @@
45
45
  "react-i18next": "^15.4.1",
46
46
  "react-router": "8.2.0",
47
47
  "remix-i18next": "^8.0.0",
48
+ "@plone/blocks": "1.0.0-alpha.13",
48
49
  "@plone/agave": "1.0.0-alpha.6",
49
- "@plone/blocks": "1.0.0-alpha.12",
50
- "@plone/components": "5.0.0-alpha.2",
50
+ "@plone/cmsui": "1.0.0-alpha.6",
51
51
  "@plone/contents": "1.0.0-alpha.0",
52
- "@plone/cmsui": "1.0.0-alpha.5",
53
- "@plone/layout": "1.0.0-alpha.10",
52
+ "@plone/components": "5.0.0-alpha.2",
54
53
  "@plone/helpers": "2.0.0-alpha.7",
55
- "@plone/plate": "1.0.0-alpha.14",
56
- "@plone/publicui": "1.0.0-alpha.5",
57
- "@plone/theming": "1.0.0-alpha.6",
58
54
  "@plone/client": "2.0.0-alpha.5",
55
+ "@plone/layout": "1.0.0-alpha.10",
56
+ "@plone/registry": "4.0.0-alpha.2",
57
+ "@plone/theming": "1.0.0-alpha.6",
58
+ "@plone/publicui": "1.0.0-alpha.5",
59
59
  "@plone/react-router": "2.0.0-alpha.5",
60
- "@plone/registry": "4.0.0-alpha.2"
60
+ "@plone/plate": "1.0.0-alpha.15"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@babel/core": "^7.28.5",
@@ -78,7 +78,7 @@
78
78
  "vite-plugin-babel": "1.7.3",
79
79
  "vite-plugin-devtools-json": "^1.0.0",
80
80
  "vitest": "^4.1.0",
81
- "@plone/types": "3.0.0-alpha.3"
81
+ "@plone/types": "3.0.0-alpha.4"
82
82
  },
83
83
  "engines": {
84
84
  "node": ">=22.22.0"