0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-03-10 23:01:26 -05:00
astro/packages
Matthew Phillips 84e94cc85c
Prevent rerunning scripts already ran in router (#12985)
* Prevent rerunning scripts already ran in router

In a long session you might navigate between several pages, some contain
the script and some not, but nevertheless the script should run a total
of 1 time.

This also helps with smaller bundled scripts in production, where some
are inlined.

* Add changeset

* better key

* more concise

* review changes

* move stuff around

* fix types

* take Martin's suggestion

* run detection when executing scripts

* adds an e2e test for data-astro-rerun

* fix support for data-astro-rerun

---------

Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com>
2025-03-03 09:35:14 -05:00
..
astro Prevent rerunning scripts already ran in router (#12985) 2025-03-03 09:35:14 -05:00
astro-prism [ci] release (#12567) 2024-12-03 10:56:34 +00:00
astro-rss fix(deps): update dependency fast-xml-parser to v5 (#13300) 2025-02-27 13:41:27 +00:00
create-astro [ci] release (#13244) 2025-02-24 14:49:05 +01:00
db [ci] release (#13318) 2025-02-27 13:26:41 +00:00
integrations fix: generate correct responsive srcsets on Vercel (#13351) 2025-03-03 14:32:04 +00:00
internal-helpers [ci] release (#13318) 2025-02-27 13:26:41 +00:00
markdown/remark [ci] release (#13318) 2025-02-27 13:26:41 +00:00
studio fix(deps): update all non-major dependencies (#13074) 2025-01-31 14:34:32 +00:00
telemetry chore: reduce severity 2025-02-06 14:46:33 +00:00
underscore-redirects feat(routing): external redirects (#12979) 2025-01-29 11:53:40 +00:00
upgrade [ci] release (#13337) 2025-02-28 16:59:28 +00:00