Migration instructions for breaking changes in @adobe/aem-lib.
Note: This guide is for projects that manually update aem.js.
3.0.0 (19/02/2026)
The decorateButtons function has been completely removed. (view removal)
Why: Button decoration is presentation logic that belongs in customizable project code, not in a shared library.
Related: adobe/aem-boilerplate#585
If you upgrade aem.js to v3.x:
- Imports of
decorateButtonswill fail - Calls to
decorateButtons()will fail - Links will not get button CSS classes (
.button,.button-container,.primary,.secondary)
If you're not manually upgrading aem.js, nothing breaks.
Option 1: Use the new implementation (Recommended)
New opt-in pattern where authors format links to indicate button intent.
- Copy new
decorateButtonstoscripts.js: View code - Update imports to reference
scripts.jsinstead ofaem.js - Optional: Adopt new button styles: View styles
- Important: Plain links will NOT auto-buttonize. If your content relies on auto-buttonization, you'll need to update your content. Authors must format links to create buttons:
- Bold = Primary button
- Italic = Secondary button
- Bold + italic = Accent button
- Plain link = Stays a link
Option 2: Use the old implementation
Keeps everything working exactly as before.
- Copy old
decorateButtonstoscripts.js: View code - Update imports to reference
scripts.jsinstead ofaem.js - No other changes needed (CSS and content stay the same)
Option 3: Remove button decoration
- Remove all imports of
decorateButtons - Remove all calls to
decorateButtons() - No other changes needed (links stay as links, button CSS won't apply)
- See boilerplate PR #585 for implementation details
- Open an issue