Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: compatibility with swup 4.6.0 #72

Merged
merged 9 commits into from
Mar 26, 2024
Merged

fix: compatibility with swup 4.6.0 #72

merged 9 commits into from
Mar 26, 2024

Conversation

hirasso
Copy link
Member

@hirasso hirasso commented Mar 26, 2024

Description

  • Fix caching of foreign persisted fragments with swup 4.6.0.
  • Fix types for matchPath functions

Drive-By

  • Formatted also the tests, fixtures and readme.md

Checks

  • The PR is submitted to the master branch
  • The code was linted before pushing (npm run lint)
  • All tests are passing (npm run test)
  • New or updated tests are included

Copy link

github-actions bot commented Mar 26, 2024

Playwright test results

passed  12 passed

Details

stats  12 tests across 1 suite
duration  28.5 seconds
commit  e14793a

src/inc/handlers.ts Outdated Show resolved Hide resolved
@hirasso
Copy link
Member Author

hirasso commented Mar 26, 2024

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...

@hirasso hirasso requested a review from daun March 26, 2024 21:25
@daun
Copy link
Member

daun commented Mar 26, 2024

@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
Copy link
Member Author

hirasso commented Mar 26, 2024

Aaah right, the requires property! Thanks!

@daun
Copy link
Member

daun commented Mar 26, 2024

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

@hirasso hirasso merged commit 597c52e into master Mar 26, 2024
2 checks passed
@hirasso hirasso deleted the fix/tests branch March 26, 2024 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants