0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00
Commit graph

5534 commits

Author SHA1 Message Date
Arsh
33583e8b31
fix(rendering): prevent removal of necessary <astro-slot> elements (#10317)
* fix(rendering): prevent removal of necessary `<astro-slot>` elements

* add test

* add changeset

* missed a spot

* adjust test

* assume `supportsAstroStaticSlot`

* bring back accidentally removed `markHTMLString` call
2024-03-07 21:55:03 +05:30
Houston (Bot)
3de48e8f62
[ci] release (#10354)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-07 15:31:00 +00:00
Emanuele Stoppa
8ce9fffd44
fix(routing): regression on partial dynamic routes (#10355)
* fix(routing): regression on partial dynamic routes

* Update .changeset/eight-spoons-nail.md

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>

---------

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2024-03-07 14:48:39 +00:00
Arsh
4eab7f4ac3 [ci] format 2024-03-07 14:46:00 +00:00
Arsh
f33cce8f6c
fix(Astro global): parity with ctx.site (#10325)
* move `createResult()` into `RenderContext`

* `Astro.site`-`ctx.site` parity

* shared `clientAdress()` implementation

* remove base from `manifest.site`

* astro global tests

* add api context tests

* add changeset

* flaky test

* error on `Astro.response.headers` reassignment
2024-03-07 14:44:53 +00:00
Ross Robino
fdd5bf277e
fix: client prerender fallback (#10295)
* fix: client prerender fallback

* Use Speculation Rules prefetch as prerender fallback instead of link tag, improve changeset

* Update .changeset/warm-spoons-fetch.md

---------

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2024-03-07 13:31:30 +00:00
Ming-jun Lu
d121311a3f
Fix an issue where getCollection might return undefined (#10356)
* Fix an issue where `getCollection` might return `undefined`

* Add changeset
2024-03-07 13:30:42 +00:00
Emanuele Stoppa
f973aa9110
fix(toolbar): add anchor element to interactive elements (#10343)
* fix(toolbar): add anchor element to interactive elements

* chore: apply better logic

* add test
2024-03-07 11:18:09 +00:00
Houston (Bot)
e88eeb0337
[ci] release (#10351)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-06 23:54:18 -08:00
Luiz Ferraz
393ad9b2aa
Include virtual declaration in package (#10350)
* Include virtual declaration in package

* Update .changeset/good-rats-bathe.md

---------

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2024-03-06 17:00:22 -06:00
Houston (Bot)
c793f194c9
[ci] release (#10344)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-06 11:07:43 -05:00
Bryce Russell
74cf1af86e
Fix cli package resolution for @astrojs/db (#10338) 2024-03-06 23:37:08 +08:00
Matthew Phillips
a2e9b2b936
Fixes loading .ts configs in astro:db (#10342) 2024-03-06 09:50:02 -05:00
Houston (Bot)
1d9fb15a2d
[ci] release (#10341)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-06 08:53:27 -05:00
Ben Holmes
a60861c960
fix: move db ambient types to separate module (#10340)
* fix: move ambient types to separate modue

* chore: changeset
2024-03-06 08:30:45 -05:00
Houston (Bot)
038201fbae
[ci] release (#10337)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-05 16:58:48 -08:00
Fred K. Schott
f2e60a9675
Revert bad release (#10336)
* Revert "[ci] release (#10332)"

This reverts commit dd3935b31c.

* Revert "[ci] set `--tag` on release (#10323)"

This reverts commit 50215ae731.
2024-03-05 16:47:15 -08:00
Houston (Bot)
dd3935b31c
[ci] release (#10332)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-05 16:26:25 -08:00
Fred K. Schott
e1477bb3d6 [ci] format 2024-03-05 19:45:27 +00:00
Fred K. Schott
24bc169070
add back data loss confirmation handling (#10330) 2024-03-05 14:44:19 -05:00
Arsh
2809d13600 [ci] format 2024-03-05 15:57:04 +00:00
Arsh
507b4ac246
fix(rendering): allow render instructions to propagate while rendering slots (#10316)
* fix(rendering): allow render instructions to propagate while rendering slots

* add test

* add changeset

* undo changes to `playwright.config.js`
2024-03-05 21:25:48 +05:30
Phk
439155c36e [ci] format 2024-03-05 15:22:07 +00:00
Phk
9e76abc58b
fix: fixed an error in the vue component editor (#10293)
* fix: fixed an error in the vue component editor(https://github.com/withastro/language-tools/issues/758)

* chore: format code

* chore: change import path
2024-03-05 15:20:44 +00:00
Florian Lefebvre
29cbb88afd
chore(vercel): update @vercel/nft (#10305)
* chore(vercel): update @vercel/nft

* Update slimy-berries-mate.md
2024-03-05 15:17:35 +00:00
Bjorn Lu
8526ca3967
Update turbo test dependsOn (#10329)
* Update turbo test dependsOn

* Update mdx timeout
2024-03-05 15:16:55 +00:00
Matthew Phillips
57bded3057
Add minimal @astrojs/db readme (#10331) 2024-03-05 08:36:37 -05:00
Bohdan Yaroslavtsev
5fe98599a3
fix broken link in code examples (#10322) 2024-03-05 15:23:33 +08:00
Arsh
3c0b854ac6
chore: delete core/endpoint/index.ts (#10324) 2024-03-05 15:14:13 +08:00
Houston (Bot)
d1700cf731
[ci] release (#10314)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-04 13:17:06 -05:00
Florian Lefebvre
69ce70bb24 [ci] format 2024-03-04 16:49:05 +00:00
Florian Lefebvre
992537e79f
fix(astro): static entrypoints build with path with several '.astro' (#10302)
* fix(astro): static entrypoints build with path with several '.astro'

* feat: improve replacement logic

* fix: logic

* chore: improve changeset

* chore: move test

* Update util.ts

* Update .changeset/stale-ducks-protect.md

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>

---------

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-03-04 16:48:01 +00:00
Luiz Ferraz
347d3629b8 [ci] format 2024-03-04 16:41:42 +00:00
Luiz Ferraz
819d20a89c
Fix dynamic prerender conflict (#10298)
* Reproduce issues

* Handle inconsistency between static, dynamic and rest routes

* Add extra test cases

* Add changeset

* Revert unrelated changes

* Update lockfile
2024-03-04 16:40:32 +00:00
Arsh
c99bbd09af [ci] format 2024-03-04 15:46:23 +00:00
Arsh
19ecccedaa
workaround(node ssr): cancellation support for renderToAsyncIterable (#10319)
* workaround(node ssr): cancellation support for renderToAsyncIterable

* add changeset

* Update .changeset/nice-pets-tie.md
2024-03-04 21:15:13 +05:30
Arsh
9076dc821c [ci] format 2024-03-04 14:56:42 +00:00
Arsh
9deb919ff9
fix(i18n): prevent overwriting 404.astro (#10281)
* fix(i18n): prevent overwriting 404.astro

* add changeset

* add tests

* adjust unit test
2024-03-04 20:25:41 +05:30
Ben Holmes
78ddfadbf9
fix: reference base types (#10315)
* fix: reference root types

* chore: changeset

* chore: stray console log
2024-03-04 09:14:56 -05:00
Arsh
6407897643 [ci] format 2024-03-04 11:45:33 +00:00
Arsh
9ba3e2605d
fix(build): skip only the configured redirects (#10279)
* fix(build): allow redirect responses to output files

* add changeset

* add test
2024-03-04 11:44:34 +00:00
Houston (Bot)
5afc8f2088
[ci] release (#10306)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-04 03:09:24 -08:00
Fred K. Schott
725f83fdb9
small fix to an incorrect check (#10300) 2024-03-04 03:01:20 -08:00
Fred K. Schott
cb00c8b692
fix package json types (#10313) 2024-03-04 02:59:41 -08:00
Fred K. Schott
51393a729b [ci] format 2024-03-04 10:51:57 +00:00
Fred K. Schott
93ec9e264a
add new migrations system (#10312) 2024-03-04 02:50:58 -08:00
Sandeep Dilip
718eed704a [ci] format 2024-03-03 16:00:18 +00:00
Sandeep Dilip
4bc360cd5f
fix(#8625): smooth scrolling in SPA mode on iOS (#10235)
* fix(#8625): smooth scrolling in SPA mode on iOS

* perf(router): run cb every 200ms only when scolling

* refactor(router): suggested changes and fixes

Suggested changes:
- change interval time from 200 to 50ms
- initialize `last*` vars together with the call to `setInterval()`
- clear interval when scroll positions stop changing, independent of
  history state

Additional changes:
- remove unused `throttle()` function
- move guarded block to inside `onScrollEnd()` since using history
  navigation will trigger our "popstate" callback and fire additional
  "scroll" and "scrollend" events, causing redundant expensive calls to
  `replaceState()`

* adds changeset

---------

Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com>
2024-03-03 16:59:19 +01:00
Houston (Bot)
2db9031a9f
[ci] release (#10292)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-02 00:42:07 -08:00
Ben Holmes
25fe5bd040 [ci] format 2024-03-02 00:31:00 +00:00
Ben Holmes
3488be9b59
finalize WIP API (#10280)
* feat: no more readable / writable

* fix: table typegen

* wip: move data seeding

* chore: add scripts to basics

* feat: data() -> seed file

* refactor: ensure precedence of file name

* feat: db execute command

* fix: test imports

* chore: remove old readable error tests

* feat: support local db with `db execute`

* refactor: remove integrations from test for now

* chore: stray comment

* chore: remove `table` config object

* feat: `db.batch`!

* refactor: move migrations/ inside db/

* fix: move ticketing-example to seed file

* fix: disable foreign keys when recreating tables

* refactor: standardize migrations dir

* feat: move to db/config.ts

* feat: file watching for db/config.ts dependencies

* feat: remove unsafeDisableStudio

* chroe: remove bad import

* feat: parse config.ts from cli

* chore: remove async from localDatabaseClient

* fix: update recipes config and seed

* chore: update unit tests

* chore: update tests to dev server

* refactor: collectionToTable -> asDrizzleTable

* chore: tidy up collection -> table error states

* refactor: regexp -> endsWith

* feat: pretty error inserting into table

* refactor: try/catch -> catch()

* feat: expose utils for integration seed files

* fix: add config import to db client modules

* fix: just use generic "seeding database" error

* chore: remove unused link args

* fix: migration queries im,port

* chore: remove irrelevant glob/ example

* feat: format migration file path

* feat: support all config file names

* chore: remove db.batch() for now

* chore: remove `db` object

* core: remove unused integration file

* chore: changeset

* fix: foreign key empty error message

* chore: remove old TODO

* fix: bad context reference

* refactor: seedDev -> seedLocal

* wip: throw some console logs at github

* wip: avoid seeding astro:db imported by seed file

* wip: use anything in db/

* refactor: only seed when loaded within srcDir

* refactor: avoid resolution when not seeding

* chore: remove logs

* refactor: seed within create local db client

* refactor: use normalizePath

* wip: logs

* wip: logs

* refactor: early return

* chore: more logs

* refactor: no batch

* fix: use beforeAll

* refactor: move all tests to base block

* wip: log dev server starting

* chore: remove logs

* wip: demo ready

* chore: remove duplicate recreateTables() call

* Revert "wip: demo ready"

This reverts commit 37585ce5cb.

* refactor: beforeEach to isolate dev servers

* chore: remove useBundledDbUrl

* refactor: naming and seed scope

* chore: remove stray console logs

* wip: fix windows file import

* wip: try fileURLToPath

* Revert "wip: try fileURLToPath"

This reverts commit 46fd65d61a.

* Revert "wip: fix windows file import"

This reverts commit 1a669ea646.

* refactor: dir -> directory

* refactor: move execute file to cli

* refactor: remove seed.dev convention

* wip: attempt fileURLToPath

* wip: debug the file exists

* fix: use mjs??

* chore: remove duplicate seedLocal

* chore: remove log check

* refactor: use in memory db for tests

* chore: clean up test comment

* fix: avoid file writes for db setup on in memory db

* chore: bump db changeset to minor

---------

Co-authored-by: Nate Moore <nate@astro.build>
2024-03-01 19:29:55 -05:00
Erika
4b6e2fb69b [ci] format 2024-03-01 15:29:39 +00:00
Erika
a548a3a99c
fix(markdoc & mdx): Proxy crimes (#10278)
* fix(markdoc & mdx): Proxy cimes

* chore: changeset
2024-03-01 15:48:38 +01:00
Houston (Bot)
87a3d51f2c
[ci] release (#10286)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-01 12:10:51 +00:00
Erika
5e3e74b61d
fix(audits): Don't warn about loading on data URIs (#10275) 2024-03-01 11:41:43 +01:00
Erika
d5277df5a4
fix(node): Safely create requests (#10285)
* fix(node): Wrap request creation in try catch

* chore: changeset
2024-03-01 10:26:28 +00:00
Houston (Bot)
afd41cc28b
[ci] release (#10265)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-01 10:31:12 +01:00
Erika
a3ebfad0cc [ci] format 2024-03-01 09:24:22 +00:00
Erika
07f89429a1
fix(assets): Solidify Node endpoint (#10284)
* fix(assets): Solidify Node endpoint

* chore: changeset
2024-03-01 10:23:07 +01:00
Satanshu Mishra
df05138ebe [ci] format 2024-03-01 08:33:27 +00:00
Satanshu Mishra
b47dcaa259
fix(node): listen on 0.0.0.0 if server.host is set to true (#10282)
Co-authored-by: Arsh <69170106+lilnasy@users.noreply.github.com>
Co-authored-by: Kevin Zuniga Cuellar <46791833+kevinzunigacuellar@users.noreply.github.com>
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-03-01 09:32:22 +01:00
Arsh
560a593418 [ci] format 2024-02-29 18:39:09 +00:00
Arsh
e556151603
fix(dev): cosider base when special-casing /_image (#10274)
* fix(dev): cosider `base` when special-casing `/_image`

* add changeset

* adjust tests

* Apply suggestions from code review

* add test
2024-03-01 00:08:01 +05:30
Fred K. Schott
3757a212c0 [ci] format 2024-02-29 05:27:46 +00:00
Fred K. Schott
c2e7b9847e
update login flow to support Brave (#10258) 2024-02-28 21:26:19 -08:00
Fred K. Schott
e86b81a671 [ci] format 2024-02-29 05:26:11 +00:00
Fred K. Schott
2ecead463d
improve link command (#10257) 2024-02-28 21:25:02 -08:00
Martin Trapp
2af8e9621f [ci] format 2024-02-28 15:53:13 +00:00
Martin Trapp
9bdbed723e
Adds auto completion of astro: events when adding or removing event listeners on document (#10263) 2024-02-28 16:52:08 +01:00
Bjorn Lu
f6fc18cc61
Update Vite to latest (#10259) 2024-02-28 23:20:17 +08:00
Houston (Bot)
e56c428f3b
[ci] release (#10236)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-28 13:17:40 +00:00
Furkan Erdem
e252f5b2f3 [ci] format 2024-02-28 13:09:56 +00:00
Furkan Erdem
57655a99db
fix(i18n): localised index pages are overwritten (#10250)
* fix(i18n): localised index pages are overwritten

* chore: add changeset

* chore: add pnpm lock
2024-02-28 13:08:49 +00:00
Emanuele Stoppa
8ae5d99534
fix: change strategy for route caching (#10248)
* fix: change strategy for route caching

* use route and component as cache key
2024-02-28 11:59:50 +00:00
Ming-jun Lu
9b00de0a76
Fix TypeScript type definitions for Code component (#10251)
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-02-28 10:43:24 +08:00
Martin Trapp
fb773c9161
Removes morph animations when setting transition:animate=none (#10247)
* Removes morph animations when setting transition:animate=none

* Apply suggestions from code review

---------

Co-authored-by: Arsh <69170106+lilnasy@users.noreply.github.com>
2024-02-27 22:46:32 +05:30
Emanuele Stoppa
08cdd0919d
chore: import sort astro package (#10245)
* chore: import sort source code, exception for the `astro` package

* fix import sorting bug

* chore: import sorting for the `astro` package
2024-02-27 16:19:34 +00:00
Erika
dbb0d0bd28
Fix Svelte editor tooling not working under relaxed TypeScripts projects (#10244)
* fix(svelte): Add TypeScript as a peer dep

* Update .changeset/gold-baboons-drum.md
2024-02-27 16:25:59 +01:00
Emanuele Stoppa
6bf102aebe [ci] format 2024-02-27 11:16:47 +00:00
Emanuele Stoppa
2dd00a0024
chore: import sort source code, exception for the astro package (#10242)
* chore: import sort source code, exception for the `astro` package

* fix import sorting bug

* Update packages/integrations/lit/server.js

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>

---------

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
2024-02-27 11:15:27 +00:00
Ming-jun Lu
9c21a9df6b
Improve the message of MiddlewareCantBeLoaded for clarity (#10239)
* Improve the message of `MiddlewareCantBeLoaded` for clarity

* Add changeset
2024-02-27 07:17:51 +00:00
Martin Trapp
03242c6c22 [ci] format 2024-02-26 16:06:09 +00:00
Martin Trapp
ade9759cae
Warn when view transitions run on a prefer-reduced-motion device (#10222)
* Warn when view transitions run on a prefere-reduced-motion device

* ViewTransitions.astro aktualisieren

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>

---------

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-02-26 17:04:57 +01:00
Houston (Bot)
6012163d8f
[ci] release (#10218)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-26 15:33:39 +00:00
James Ross
e64bd0740b
fix: better assetsInlineLimit runtime type checking (#10154)
* fix: string assetsInlineLimit

* fix: better handle NaN values for `assetsInlineLimit`

* chore: prettier

* chore: simplify for requested changes

* chore: update changeset

* chore: remove tests

* chore: simplify function

* Apply suggestions from code review

---------

Co-authored-by: Arsh <69170106+lilnasy@users.noreply.github.com>
2024-02-26 20:12:42 +05:30
Ben Holmes
aa45eb9fa6
fix: correct remote url (#10223)
* fix: get correct url

* chore: changeset

* fix: respect runtime env
2024-02-26 08:44:43 -05:00
Erika
1eadb1c529
fix(toolbar): Make it so every built-in app can be closed by outside clicks (#10220)
* fix(toolbar): Make it so every built-in app can be closed by outside clicks

* chore: changeset

* test: add tests

* test: fix test

* ci: don't run bundle-size on dev-toolba
2024-02-26 13:38:19 +00:00
Ming-jun Lu
ae2a10e1a7
Fix an issue where Vercel adapter may create functions for prerendered routes (#10231)
* fix: fix an issue where Vercel adapter may create functions for prerendered routes

* test: update test cases in `split.test.js`

* chore: add changeset

* refactor: apply suggested changes from code review

* Apply suggestions from code review

---------

Co-authored-by: Arsh <69170106+lilnasy@users.noreply.github.com>
2024-02-26 18:58:49 +05:30
Matthew Phillips
bc2bf460ea [ci] format 2024-02-26 08:39:20 +00:00
Matthew Phillips
afcb9d3311
Fix hydration scripts missing from dynamic slot usage (#10219) 2024-02-26 08:38:11 +00:00
Matthew Phillips
fd7453bc0d [ci] format 2024-02-26 08:37:43 +00:00
Matthew Phillips
4db82d9c7d
Prevent errors in rendering from crashing server (#10221)
* Prevent errors in rendering from crashing server

* Add changeset

* Make the reject an error

* Simplify

* Update .changeset/breezy-pears-admire.md

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>

---------

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-02-26 08:36:43 +00:00
前端子鱼
84502b4190
fix: svelte 5 mount/hydrate api change. (#10224) 2024-02-26 16:10:47 +08:00
Arsh
8d5ea2df5d [ci] format 2024-02-24 11:36:15 +00:00
Arsh
8fb32f390d
prevent warning: Astro.request.headers is not available in "static" output mode (#10196) 2024-02-24 17:05:16 +05:30
Ben Holmes
5d4ff093a2
Improved error logging from config (#10207)
* fix: better error messaging on seed()

* chore: collection -> table for errors

* chore: changeset
2024-02-23 17:01:33 -05:00
Arsh
eb8bffe67a [ci] format 2024-02-23 15:27:44 +00:00
Arsh
6aa660ae7a
fix(dev): remove params for prerendered pages (#10199)
* fix(dev): remove params for prerendered pages

* add test

* add changset

* deduplicate param removal

* format

* adjust tests
2024-02-23 20:56:34 +05:30
Houston (Bot)
3de7b2c7ec
[ci] release (#10213)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-23 09:31:55 -05:00
Matthew Phillips
a013182d32
Fixes edge middleware calling nested routes (#10215) 2024-02-23 09:13:10 -05:00