Eric Park
3acc65444c
fix: match index files only by using entire basename ( #12815 )
...
* fix: match index files only by using entire basename
The previous code would cause file names like `index.xml.ts` to be
treated as index files, when they aren't (the file basename excluding
the extension `.ts` is `index.xml`, and `index` should be the index
file). To match index files only, match the entire first half of the
basename when splitting by the last occurrence of the period/file
extension delimiter.
Pedantically this might not be correct -- i.e. some file extensions
actually span multiple delimiters, like index.tar.gz. But in that case
it's not an index file as well, so I think this is fine.
Fixes #12675
* Add changeset
2025-01-05 19:57:53 +00:00
Chris Kanich
fbac92f8bd
fix: clone session data on .set() ( #12883 )
...
* fix: clone session data on .set()
* weird race condition, +1 test for URL() thing
* cleanup
* ensure directory exists before using fs-lite sessions
* minor wording change
* alternate ensure-dir-exists implementation
* await session persistence before returning response
* update changeset
* formatting
* two changesets
2025-01-05 19:54:41 +00:00
Bjorn Lu
73a078835e
Fix sourcemap warning in server islands plugin ( #12877 )
2025-01-03 22:43:22 +08:00
renovate[bot]
cbd9bab89f
fix(deps): update dependency @preact/signals to v2 ( #12811 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-03 20:32:00 +08:00
renovate[bot]
047589dbd4
fix(deps): update dependency @astrojs/node to v9 ( #12687 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-03 20:30:07 +08:00
renovate[bot]
e2dc04bfee
chore(deps): update dependency undici to v7 ( #12580 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-03 20:29:09 +08:00
renovate[bot]
5997af826f
fix(deps): update dependency htmlparser2 to v10 ( #12857 )
...
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-03 20:17:23 +08:00
Matt Kane
d7e97a775d
fix: add render() to stub content type defs ( #12884 )
...
* fix: add render() to stub content type defs
* Better wording
2025-01-03 12:01:33 +00:00
Bjorn Lu
6bbb3f5e5e
Bump vitest to v3 beta ( #12876 )
2025-01-03 16:55:53 +08:00
Matt Kane
a6a4a66f10
[ci] format
2025-01-02 19:49:55 +00:00
Matt Kane
579bd93794
fix: wait for content layer sync before starting dev server ( #12818 )
...
* fix: wait for content layer sync before starting dev server
* Load config earlier
* Wait for fs flush
* Add delay
* Test utils fixes
* Ignore files in dotastro
* Wait for loading config
* Fix test
* Defer watching data store
2025-01-02 19:49:02 +00:00
sinskiy
7b5dc6f0f1
fix: add noindex to server island headers ( #12827 )
...
* fix: add noindex to server island headers
* test: check if server island has noindex header
* chore: changeset
* refactor: set X-Robots-Tag: noindex in handler
* fix tests
---------
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2025-01-02 15:20:23 +00:00
Houston (Bot)
161df286c3
[ci] release ( #12801 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-01-02 13:29:02 +00:00
Emanuele Stoppa
7fb21844df
fix: injected route entrypoint ( #12816 )
2025-01-02 13:26:55 +00:00
Emanuele Stoppa
f12f1118bc
fix: missing log ( #12814 )
2025-01-02 13:26:35 +00:00
Matt Kane
e109002c3d
fix: pass emulated entry to getCollection filter function ( #12875 )
...
* fix: pass emulated entry to getCollection filter function
* Add test
2025-01-02 12:16:57 +00:00
Emanuele Stoppa
ac00c64ee7
[ci] format
2025-01-02 11:56:54 +00:00
Emanuele Stoppa
524c855075
fix(core): add error log for server islands ( #12768 )
...
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
Co-authored-by: Matt Kane <m@mk.gg>
2025-01-02 11:55:48 +00:00
Matt Kane
892dd9f6cd
fix: pass cookie options to delete ( #12820 )
2025-01-02 11:19:09 +00:00
Chris Kanich
440d8a54f7
fix: session regeneration ( #12864 )
...
Co-authored-by: Matt Kane <m@mk.gg>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2025-01-02 10:39:17 +00:00
Amine Ilidrissi
8809b85747
Fix Vue & Svelte server renderer types ( #12776 )
...
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2025-01-02 09:56:07 +00:00
Matt Kane
96c4b92533
fix: make reference()
a sync transform ( #12781 )
2025-01-02 09:49:20 +00:00
Chloe Arciniega
ebe2aa95c7
fix(@astrojs/rss): revert incorrect Content-Type header applied for RSS XML file ( #12829 )
...
* fix: revert content-type changes
* chore: changeset
2024-12-26 08:52:34 +00:00
Scott Davis
1fab2f2ef6
patch: update partytown dependencies ( #12822 )
2024-12-24 11:21:20 +00:00
Louis Escher
5ab724c633
[ci] format
2024-12-23 12:21:38 +00:00
Louis Escher
70a9f0b984
Fix server island script breaking when charset is added to content-type ( #12810 )
2024-12-23 12:20:39 +00:00
Emanuele Stoppa
98f9e833a5
fix(toolbar): assign label to icons ( #12734 )
2024-12-20 15:23:35 +00:00
Matt Kane
7b0cb852f6
fix: better logs for invalid content config ( #12798 )
...
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
2024-12-20 15:08:43 +00:00
Houston (Bot)
5f4c543609
[ci] release ( #12790 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-20 12:10:36 +00:00
Matt Kane
739dbfba42
fix(deps): upgrade Vite ( #12799 )
2024-12-20 12:01:14 +00:00
Hiromasa Fujimori
f3d83854aa
update comment in packages/astro/src/types/public/common.ts ( #12782 )
2024-12-20 07:17:39 +00:00
Matt Kane
49cc5d7266
[ci] format
2024-12-19 16:49:51 +00:00
Matt Kane
f632b94527
fix: pass raw frontmatter to when parsing markdown in glob loader ( #12789 )
2024-12-19 16:49:01 +00:00
Emanuele Stoppa
5e9d1bcf80
chore: move files to .mjs
( #12765 )
2024-12-19 14:24:00 +00:00
Matt Kane
73b6c8b1b3
chore: fix links in session errors ( #12787 )
2024-12-19 12:28:36 +00:00
Houston (Bot)
3f557b2e32
[ci] release ( #12762 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-19 12:23:46 +00:00
Emanuele Stoppa
4353fc5ccf
fix: correctly return 404.astro in i18n ( #12764 )
2024-12-19 11:22:25 +00:00
Matt Kane
45005a581d
[ci] format
2024-12-19 11:12:01 +00:00
Matt Kane
1ec5b44ce3
chore(deps): update unstorage and use new syntax ( #12783 )
2024-12-19 11:10:55 +00:00
Florian Lefebvre
45c3f33387
[ci] format
2024-12-18 14:41:43 +00:00
Florian Lefebvre
c9d51107d0
feat(actions): getActionPath() ( #12721 )
...
* feat(actions): getActionPath()
* feat: take trailing slash into account
* fix
* fix
* Update wise-boxes-develop.md
* Apply suggestions from code review
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
* Update .changeset/wise-boxes-develop.md
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
---------
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-12-18 14:37:52 +00:00
Matt Kane
36c1e0697d
fix: clear the content layer cache when the Astro config changes ( #12767 )
...
* fix: clear the content layer cache when the Astro config changes
* Use deterministic-object-hash
* Switch back to safe-stringify
* Whitespace
2024-12-18 14:01:56 +00:00
Matt Kane
a581c152fc
[ci] format
2024-12-18 13:57:45 +00:00
Matt Kane
a94e309ebf
[ci] format
2024-12-18 13:56:42 +00:00
Matt Kane
b4fec3c7d1
Sessions API ( #12441 )
...
* wip: experimental sessions
* feat: adds session options (#12450 )
* feat: add session config
* chore: add session config docs
* Fix
* Expand doc
* Handle schema
* Remove example
* Format
* Lock
* Fix schema
* Update packages/astro/src/types/public/config.ts
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update packages/astro/src/types/public/config.ts
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Add link to Sessions RFC in config.ts
* Move session into experimental
---------
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Lock
* feat: prototype session support (#12471 )
* feat: add session object
* Add tests and fix logic
* Fixes
* Allow string as cookie option
* wip: implement sessions (#12478 )
* feat: implement sessions
* Add middleware
* Action middleware test
* Support URLs
* Remove comment
* Changes from review
* Update test
* Ensure test file is run
* ci: changeset base
* ci: exit from changeset pre mode
* Lockfile
* Update base
* fix: use virtual import for storage drivers (#12520 )
* fix: use virtual import for storage drivers
* Don't try to resolve anythign in build
* Fix test
* Polyfill node:url
* Handle custom drivers directly
* No need for path
* Update packages/astro/src/core/session.ts
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
---------
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
* Fix jsdoc
* fix: set default storage path
* Update changeset config for now
* Revert config workaround
* Lock
* Remove unneeded ts-expect-error directive
* fix: [sessions] import storage driver in manifest (#12654 )
* wip
* wip
* Export manifest in middleware
* Changeset conf
* Pass session to edge middleware
* Support initial session data
* Persist edge session on redirect
* Remove middleware-related changes
* Refactor
* Remove vite plugin
* Format
* Simplify import
* Handle missing config
* Handle async resolution
* Lockfile
* feat(sessions): implement ttl and flash (#12693 )
* feat(sessions): implement ttl and flash
* chore: add unit tests
* Make set arg an object
* Add more tests
* Add test fixtures
* Add comment
* Remove session.flash for now (#12745 )
* Changeset
* Apply suggestions from code review
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
---------
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
2024-12-18 13:55:49 +00:00
oliverlynch
3dc02c57e4
feat(assets): Use entity-tags to revalidate cached remote images ( #12426 )
...
* feat(assets): Store etag to refresh cached images without a full download
* Seperate loading and revalidating functions
* Add changeset
* Updates based on requested changes
* Wording changes, use stale cache on failure to revalidate
* Add If-Modified-Since as cache revalidation method
* Update .changeset/red-poems-pay.md
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
---------
Co-authored-by: Matt Kane <m@mk.gg>
Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
2024-12-18 13:20:12 +00:00
Ariel K
ca3ff1504a
docs: Fix typos in config.ts ( #12769 )
...
- Replace `ie` with `e.g.`, as we're dealing with examples
- Use brackets to match the styles of previous lines
2024-12-18 11:46:36 +00:00
Alberto Matías Vega
8da2318551
fix: invoke vite.build with up to date configuration during astro:build:setup hook when target is "client" ( #12763 )
...
Co-authored-by: Alberto Matías <alberto.matias@bestsecret.com>
2024-12-17 13:40:36 +00:00
Chris Swithinbank
483da89cf6
Adds types for ?url&inline
& ?url&no-inline
import queries ( #12758 )
...
* Add types for Vite inline/no-inline import queries
* Add changeset
* Remove plain `?no-inline` type
* Update changeset
2024-12-17 11:50:51 +00:00
Houston (Bot)
3ff00a6655
[ci] release ( #12759 )
...
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-12-16 22:02:50 -05:00