swup / fragment-plugin

A swup plugin for dynamically replacing containers based on rules 🧩
https://swup-fragment-plugin.netlify.app
MIT License
16 stars 1 forks source link

fix: compatibility with swup 4.6.0 #72

Closed hirasso closed 7 months ago

hirasso commented 7 months ago

Description

Drive-By

Checks

github-actions[bot] commented 7 months ago

Playwright test results

passed  12 passed

Details

stats  12 tests across 1 suite
duration  28.5 seconds
commit  e14793a

hirasso commented 7 months ago

Regarding my comment from above: I've removed the backwards-compatibility code and bumped the swup peer dependency to 4.6.0. I guess that should do it, right? I hope I'll ever wrap my head around these kinds of things...

daun commented 7 months ago

@hirasso I think it needs both the peer dependency as well as the requires key in the plugin itself. That's how we did that in the body class and head plugins, for example here.

hirasso commented 7 months ago

Aaah right, the requires property! Thanks!

daun commented 7 months ago

With just the peer dependency, it could still accept the wrong combination depending on how and with which npm version a project is configured.