Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .chachalog/.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.0
1.3.0
8 changes: 0 additions & 8 deletions .chachalog/B5LNULyZ.md

This file was deleted.

6 changes: 0 additions & 6 deletions .chachalog/BcOA3_X-.md

This file was deleted.

6 changes: 0 additions & 6 deletions .chachalog/Dp4sWq9L.md

This file was deleted.

10 changes: 0 additions & 10 deletions .chachalog/Hv3Qm8Lp.md

This file was deleted.

6 changes: 0 additions & 6 deletions .chachalog/Hy7dRc2w.md

This file was deleted.

10 changes: 0 additions & 10 deletions .chachalog/Kp7mQx2R.md

This file was deleted.

8 changes: 0 additions & 8 deletions .chachalog/NIF1LOWq.md

This file was deleted.

6 changes: 0 additions & 6 deletions .chachalog/Qe7vKp3T.md

This file was deleted.

5 changes: 0 additions & 5 deletions .chachalog/RFsycdD5.md

This file was deleted.

6 changes: 0 additions & 6 deletions .chachalog/Xk3uCdUu.md

This file was deleted.

10 changes: 0 additions & 10 deletions .chachalog/Z1H81Psm.md

This file was deleted.

16 changes: 0 additions & 16 deletions .chachalog/oFKFbxW6.md

This file was deleted.

12 changes: 0 additions & 12 deletions .chachalog/vdng1uYC.md

This file was deleted.

5 changes: 0 additions & 5 deletions .chachalog/yPTfYT6r.md

This file was deleted.

67 changes: 67 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# javascript-modules Changelog

## 1.3.0

### New Features

* `buildNodeUrl` now autocollects cache dependencies for the content it links to, preventing 404 errors when the linked content is renamed or moved. (#783, #810)

This mechanism is enabled by default but can be disabled on a per-view basis by setting `"cache.autocollectDependencies": "false"` in the view's properties, or on a per-call basis with the new `autocollectDependency: false` option in `buildNodeUrl`.

When a view links to more than 100 contents, a change in a folder that holds many of them also refreshes the view.

* Introduced `<JImage>` and `getImageProps` to render responsive images from an image node: `srcset` and `sizes` are derived from the image's intrinsic size, `alt` falls back to the image title, and `width` / `height` are set to prevent layout shifts. (#789)

On a default Jahia instance every candidate serves the original file. A DAM (Cloudinary, Keepeek) or an image resizer (Cloudimage) is required for the resizing to take effect.

* Added support for children in client-only islands: `<Island clientOnly>` now passes its children to the component. (#807)

Use `clientOnly="hide-children-while-loading"` to hide them until the component is loaded, for instance when they must only be displayed in a modal.

If an existing client-only component renders its `children`, the placeholder now ends up inside it, and it must match the type of the component's `children` prop.

* Bumped embedded dependencies. (#658, #664, #793)

| Dependency | From (JSM 1.2.0) | To (JSM 1.3.0) |
| ------------- | ---------------- | -------------- |
| devalue | 5.6.4 | 6.0.0 |
| i18next | 25.7.3 | 26.4.2 |
| react | 19.2.3 | 19.3.0 |
| react-dom | 19.2.3 | 19.3.0 |
| react-i18next | 16.5.0 | 17.0.14 |

We decided to upgrade i18next and react-i18next in a minor version because, as far as we're aware, the breaking changes remove deprecated features that were never put in place in recent codebases. If this assumption is incorrect, please reach out to us.

* Added an `absolute` option to `buildEndpointUrl`, `buildNodeUrl` and `buildModuleFileUrl`, which prefixes the URL with the server origin or with an origin passed as a string.

```jsx
<meta property="og:url" content={buildNodeUrl(currentNode, { absolute: true })} />
```

In preview and edit, Jahia removes the origin from a page URL in an `href` or `src` attribute, so use the URL in an attribute such as `content` there.

* Expose `JCRStoreProvider` in TypeScript types. (#790)

### Bug Fixes

* We have migrated our build pipelines and test suites to Vite 8 and Rolldown to ensure JS Modules work with the latest versions of this stack. (#668)

This is not a breaking change, we support all Vite versions from 6 to 8.

* Handle GraphQL subrequests correctly. (#681)

* `jahia-deploy` now fails when Jahia installs nothing, instead of printing `{}` and exiting successfully.

* `npm init @jahia/module` can now scaffold a project without a single prompt, which makes it usable from scripts, CI pipelines and coding agents: (#715)

```bash
npm init @jahia/module@latest my-module -- --template hello-world --yes
```

* Fixed client-only islands being hydrated instead of rendered in the browser, which logged a hydration error in the console for each island. (#807)

* `buildNodeUrl` default mode detection has been improved to preserve links within the editframe in `edit` mode. Other modes are unaffected. (#788)

* Fixed absolute areas with `readOnly="children"` so they can be edited on their owning page. (#679)

* `server.render.addCacheDependency({ uuid }, renderContext)` now correctly registers the dependency, instead of doing nothing. (#792)