Skip to content
Merged
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: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

**`Ramstack.AlpineGear.js`** provides useful and convenient plugins for [Alpine.js](https://alpinejs.dev/).

The plugins require Alpine.js 3.15.12 or later.

## Included Plugins

**[@ramstack/alpinegear-bound](https://www.npmjs.com/package/@ramstack/alpinegear-bound)** ([README](https://github.com/rameel/ramstack.alpinegear.js/tree/main/src/plugins/bound))<br>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"test:vitest": "vitest run"
},
"peerDependencies": {
"alpinejs": "^3.13.0"
"alpinejs": "^3.15.12"
},
"devDependencies": {
"@conventional-changelog/git-client": "^3.2.0",
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions src/utilities/anchor_block.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ export function anchor_block(el, template, { addScopeToNode, cleanup, destroyTre
}
},
delete() {
// Not in mutateDom: Alpine before 3.14.2 removes nested x-if content
// and x-for items without destroying them, leaving that to its observer
el._r_block = null;
delete el._x_currentIfEl;
delete el._x_lastRenderedEl;
Expand Down
3 changes: 1 addition & 2 deletions tests/playwright/anchor-block.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ for (const [directive, block] of Object.entries(blocks)) {
await expect(page.locator("dt, dd")).toHaveText(["Term", "Description"]);
expect(await probe(1)).toEqual({ destroyed: [], effects: [0, 1], events: 1 });

// Alpine 3.14.2+ removes x-if and x-for clones this way, with its observer paused
// Alpine removes x-if and x-for clones this way, with its observer paused
await page.evaluate(() => Alpine.mutateDom(() => {
const anchor = document.querySelector("dl > template");
Alpine.destroyTree(anchor);
Expand Down Expand Up @@ -85,7 +85,6 @@ test("anchor block: removes nested x-if and x-for content", async ({ page }) =>

await expect(page.locator("b, i")).toHaveText(["1", "2", "3", "4"]);

// Alpine before 3.14.2 leaves destroying the removed clones to its observer
await set_data(page.locator("div"), { show: false });
await expect(page.locator("b, i")).toHaveCount(0);
});
Expand Down
Loading
Loading