inline_svg
inline_svg copied to clipboard
Add support to Shakapacker
Shakapacker is the official, actively maintained successor to Webpacker.
Shakapacker v7 changed the spelling of Webpacker to Shakapacker in
the entire project, but still provided backward compatibility for
Webpacker spelling.
v8 dropped the deprecated spelling
This commit also:
- Checks if
Shakapackeris defined; if not, it falls back onWebpacker. - Uses the scope resolution operator to resolve at top-level scope
- Checks
protocolinstead ofhttps?because the former is available from Webpacker 3 and the latter is not available anymore in Shakapacker >= 8
Refs:
- shakacode/shakapacker#414
- shakacode/shakapacker#429
- shakacode/shakapacker#486
Close jamesmartin#156
@tagliala Looks good to me. Just need a maintainer to have a look and review.
Thanks.
I have two successful builds on Shakapacker 7 and 8 at:
- https://github.com/diowa/icare/actions/runs/9256714063
- https://github.com/diowa/icare/actions/runs/9256838181
A proper solution would be to create a new app with Shakapacker 8 and make an integration test here, as per #159, but this would require to fix the test apps repo
I have a working build against Rails 7.1 / Shakapacker 8: https://github.com/tagliala/inline_svg/actions/runs/9549035858
I've removed the old test against webpacker because of python 2.7 and deprecations.
Please let me know if you need some help or if I should fork
Please let me know if you need some help or if I should fork
Thanks for your work so far. Sorry for the delayed responses, I was away on vacation and then work trips. Let's get CI working properly and then get this merged.
Hi,
Let's get CI working properly and then get this merged.
I did not invest time in webpacker (it should have been upgraded from v4 to v5 in the rails 6 branch), so this is expected to fail against the CI like it is failing now
#159 is based on this PR and should make the CI pass agains Rails 7.1 / Shakapacker 8
If you are interested, I can make a PR to drop compatibility with legacy Rails and Ruby versions
If you are interested, I can make a PR to drop compatibility with legacy Rails and Ruby versions
Sounds good. Let's do that. 👍
Friendly bump.
The first steps would be to merge:
- #157
- jamesmartin/inline_svg_test_app#24
- jamesmartin/inline_svg_test_app#25
- jamesmartin/inline_svg_test_app#26
Then this PR can be merged because it is not breaking (and it is tested in #159 against Shakapacker)
Then, after a rebase and some changes to the target repo in actions, it will be possible to merge:
- jamesmartin/inline_svg#159
To have a working CI.
At that point, it would be possible to release a minor version with proper Shakapacker 7+ support.
After the minor release, it would be possible to consider to drop old Ruby and Rails support and go for 2.0. I would entirely drop webpacker support for 2.0
Thanks, this is on my TODO list.
Thanks, please let me know if you need help and what strategy you decide, everything works for me
Thanks for your patience, @tagliala. I'm pushing forward with the plan to properly support Shakapacker v8 moving forward and also to drop support for end-of-life Rails versions in an incoming v2.0 of this gem.