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

7644 commits

Author SHA1 Message Date
Houston (Bot)
1863727215 [ci] format 2024-03-13 05:53:52 +00:00
Houston (Bot)
b3dbb49058
[ci] update lockfile (#10234)
Co-authored-by: matthewp <matthewp@users.noreply.github.com>
Co-authored-by: bluwy <bjornlu.dev@gmail.com>
2024-03-13 13:52:42 +08:00
Houston (Bot)
0b0e244d1e
[ci] release (#10402)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-12 09:50:49 -04:00
Ben Holmes
a084d8cec6
feat: split config types to separate build (#10401)
* feat: split config types to separate build

* chore: changeset

* fix: drizzle property exports
2024-03-12 09:44:15 -04:00
Houston (Bot)
24ee74a37f
[ci] release (#10397)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-12 07:45:51 -04:00
Ben Holmes
41ca94e513
chore: remove drop table check for added table (#10396)
* chore: remove drop table check for added table

* chore: remove drop table from test

* chore: changeset
2024-03-12 07:30:45 -04:00
Ming-jun Lu
629c9d7c4d
Fix an issue where dev toolbar x-ray didn't escape props content (#10400)
* fix(toolbar): fix an issue where x-ray didn't escape props content

* test(toolbar): add a test case related to x-ray

* chore: add changeset
2024-03-12 12:30:11 +01:00
Matthew Phillips
a49892349e
Set new Astro Studio production URL (#10395) 2024-03-11 15:35:51 -07:00
Darius
c1ba369426 [ci] format 2024-03-11 22:07:55 +00:00
Darius
f76dcb769f
export DB types (#10374)
* export DB types

* refactor: move schemas to separate file

* chore: changeset

* chore: add typesVersions

---------

Co-authored-by: bholmesdev <hey@bholmes.dev>
2024-03-11 18:06:52 -04:00
Houston (Bot)
33bfe6ed05
[ci] release (#10383)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-11 16:09:08 -04:00
Ben Holmes
ae7dc5f692 [ci] format 2024-03-11 19:55:57 +00:00
Ben Holmes
236cdbb611
New CLI help reference for studio and db commands (#10390)
* feat: new, formatted astro db help

* feat: add "studio commands" section to cli

* chore: changeset

* Update packages/db/src/core/cli/print-help.ts

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>

* Update .changeset/thirty-bags-live.md

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>

---------

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
2024-03-11 15:54:49 -04:00
Martin Trapp
02aeb01cb8
Fixes broken transition types (#10392)
* Fixes broken transition types

* adds changeset

* adds changeset
2024-03-11 15:45:43 -04:00
Ben Holmes
9667ee990c
fix: remove runtime/config suggestion for db config exports (#10391)
* chore: remove runtime/config from package json

* fix: use relative path to dist

* chore: changeset

* Revert "fix: use relative path to dist"

This reverts commit 16c0cc296e.

* Revert "chore: remove runtime/config from package json"

This reverts commit c1b4678998.

* refactor: types null

* fix: exclude config.ts from tsc

* chore: update consts

* chore: comment on intellisense
2024-03-11 15:44:58 -04:00
Fred K. Schott
c9a1111275 [ci] format 2024-03-11 19:33:26 +00:00
Fred K. Schott
8a23ee530c
add handling for success=false responses (#10387) 2024-03-11 12:32:20 -07:00
Chris Swithinbank
d461eb760d
Add pkg: db to labelling automation (#10394) 2024-03-11 20:26:36 +01:00
Chris Swithinbank
6170122884 [ci] format 2024-03-11 19:09:04 +00:00
Chris Swithinbank
38abae47b5
Fix db for projects without a seed file or with integrations (#10385)
* Add fixture and tests for integration with no user db config

* Create database tables when integration seed files load

* Defer running seed function until all modules are loaded

* Update package name

* Add test & fixture for a project with no seed file

* `recreateTables()` from `seedLocal()` (and move it out of main runtime module)

* Fix typo after rebase

* FREEZE DON’T MOVE

* Move `seedLocal` export back to runtime

* Simplify seed file normalization

* Clean up test files

* Add build tests for no-seed and integration-only fixtures

* Add changeset
2024-03-11 20:07:53 +01:00
Matthew Phillips
cd5e8d4b93
Fix use of db.batch in Stackblitz (#10384)
* Fix use of db.batch in Stackblitz

* Update .changeset/rare-items-protect.md

---------

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2024-03-11 11:12:52 -04:00
Chris Swithinbank
8cceab587d
Use static imports for integration seed files in astro:db (#10381)
* Use static imports for integration seed files in `astro:db`

* Add changeset

* Add build test for integrations fixture

* chore: comment on top-level seed imports

* fix: random db id for tests

* fix: set db id from build before

* wip: remove reset on env variable

* wip: move random db id env to top of test file

* refactor: remove unlink from db startup

* chore: remove random db id completely??

---------

Co-authored-by: bholmesdev <hey@bholmes.dev>
2024-03-11 09:51:15 -04:00
Houston (Bot)
0e074fb390
[ci] release (#10365)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-03-11 10:25:30 +00:00
Fred K. Schott
41dca1e413
handle undefined snapshot from API (#10378) 2024-03-10 23:56:01 -07:00
Arsh
dfdf6b3a0b [ci] format 2024-03-08 16:40:20 +00:00
Arsh
dc87214141
feat: middleware and virtual routes (#10206)
* add test

* app

* dev

* api route -> page

* adjust test

* add changeset

* remove `any`

* DEFAULT_404_COMPONENT constant

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-03-08 22:09:12 +05:30
Bjorn Lu
8107a2721b
Treeshake unused Astro scoped styles (#10291) 2024-03-08 23:03:02 +08:00
Sarah Rainsberger
3faa1b8fce [ci] format 2024-03-08 14:06:26 +00:00
Sarah Rainsberger
580d333f25
[docs] update JSDoc for formatting in docs (#10372) 2024-03-08 14:05:28 +00:00
Erika
78bafc5d66
fix(tsconfigs): Add jsx: 'preserve' to the base template (#10368)
* fix(tsconfigs): Add `jsx: 'preserve'` to the base template

* chore: changeset
2024-03-08 13:45:43 +00:00
Zhang Zhipeng
b44f830a0e [ci] format 2024-03-08 13:11:08 +00:00
Zhang Zhipeng
1ea0a25b94
Add multiple cdn v2 (#10189)
* feat: add multiple cdn

* add multiple cdn test

* assetsPrefix not empty string

* add changeset

* simplify code

* change docs

* replace getFileExtension with node path.extname

* Adapt node extname

* multiple image test

* wip space

* update docs

* update docs, assetsPrefix type

* update docs

* update docs

* chore: update types and rename to `fallback`

* enhance changelog

* change docs

* update change defaultAeestsPrefix to fallback key test

* move utility to a new to avoid importing `node:path` inside vite plugins

* Update packages/astro/src/@types/astro.ts

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* Apply suggestions from code review

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* chore: address Bjorn's comments

* kill the variable

* kill the variable /2

* Fix CI fail

* Apply suggestions from code review

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* uniform code sample

* add `.` string for fit getAssetsPrefix

* Fix extension function

---------

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: bluwy <bjornlu.dev@gmail.com>
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
2024-03-08 13:10:07 +00:00
Bjorn Lu
d9336668e5 [ci] format 2024-03-08 13:04:14 +00:00
Bjorn Lu
e3f02f5fb1
Add experimental.directRenderScript option (#10102)
* Add `experimental.directRenderScript` option

* Support inlining scripts

* Use compiler preview release

* Address feedback

* Fix

* Add enable by default note

* Fix build

* Dedupe rendered scripts

* Fix test

* Update deps

* Update .changeset/cool-jobs-fetch.md

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* Update jsdoc

* Typo

* resolve merge conflicts

* Fix examples check fail

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-03-08 13:03:02 +00:00
StandardGage
c081adf998
Allow Code Component to have custom props and extra class styles (#9960)
* Create simple react element if element has no children

* Fix for when element has text

* add changeset

* Add additionalProps to Code component and ShikiHighlighter.highlight()

* Add changeset

* Create simple react element if element has no children

* Fix for when element has text

* add changeset

* Add additionalProps to Code component and ShikiHighlighter.highlight()

* Add changeset

* reverted accidental changes

* remove unnecessary parts

* Add HTMLAttributes type to additionalProps

* Update .changeset/calm-bags-deliver.md

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

* extend HTMLAtts instead

* add suggestions

* feat: address reviews

* chore: remove empty line

* feat: move attributes to options

---------

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-03-08 13:02:53 +00:00
Erika
01497f2bc2
fix(toolbar): Fixes some errors tests after merges brought up (#10371) 2024-03-08 12:48:44 +00:00
Bjorn Lu
9e1ef6f0c9
Fix mdx test fail with rehype-pretty-code (#10370) 2024-03-08 20:39:15 +08:00
Erika
de9911bbb5 [ci] format 2024-03-08 11:16:35 +00:00
Erika
5c7862a9fe
feat(audits): Add new UI (#10217)
* feat(audits): Add selected style for audits

* feat(audits): Fully add new style

* feat: new iteration

* chore: changeset

* feat: separate audits by category

* fred pass

* feat: new UI

* refactor: fix everything

* fix: recreate UI on further lints

* fix: remove unnecessary changes

* chore: lockfile

* fix: tryout for descriptions

* fix: remove change, will do in other PR

* Apply suggestions from code review

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* test: fix

* nit: format styles

---------

Co-authored-by: Fred K. Schott <fkschott@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-03-08 12:10:38 +01:00
Erika
c7edb22b4b [ci] format 2024-03-08 10:58:49 +00:00
Erika
2013e70bce
feat(audits): Handle mutations (#10268)
* feat(audits): Handle mutations

* chore: changeset

* nit: add comments
2024-03-08 11:56:23 +01:00
Oliver Speir
0204b7de37
Reload scripts (#9977)
* do not add astroExec if data-astro-reload attr exists

* add changeset

* Update .changeset/rare-coins-jump.md

Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com>

* change to data-astro-rerun

* Update .changeset/rare-coins-jump.md

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

* add example to changeset

---------

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com>
Co-authored-by: Happydev <81974850+MoustaphaDev@users.noreply.github.com>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2024-03-08 10:55:41 +00:00
Alexander Niebuhr
65692fa7b5
feat: experimental content collection JSON schemas (#10145)
* feat: experimental content collection JSON schemas

* solves review comments

* solves review comments

* updates changeset

* updates path

* fixes formatting

* removes unrelated changes

* adds test

* fixes lockfile

* chore: fixes package name

* improves code branching depth

* resolves docs comments

Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>

* Update packages/astro/src/content/types-generator.ts

* Update .changeset/slow-items-heal.md

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* Update packages/astro/src/@types/astro.ts

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

---------

Co-authored-by: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-03-08 10:54:51 +00:00
Matthew Phillips
9cd84bd19b
Allow islands to be re-rendered with new props on page transition (#10136)
* Allow islands to be re-rendered with new props on page transition

* Adjust the expected styles

* Restore test expectation

* Add changeset and final change

* linting

* Implement transition:persist-props behavior

* Fix lockfile

* Fix expectations

* App is hyrid

* Update .changeset/lovely-nails-cough.md

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* Update .changeset/lovely-nails-cough.md

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* Update .changeset/lovely-nails-cough.md

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-03-08 10:54:16 +00:00
Erika
3307cb34f1
Add new levels of notification for dev toolbar apps (#10252)
* Add new levels of notification

* feat: proper support

* chore: changeset

* fix: remove unrelated change

* test: add test

* feat: implement new icons

* fix: go back to previous layout

* fix: custom app number

---------

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2024-03-08 11:53:48 +01:00
Remco Haszing
a31bbd7ff8
fix(markdown): don’t generate mdast html nodes (#10104)
* fix(markdown): don’t generate mdast html nodes

`html` nodes from mdast are converted to `raw` hast nodes. These nodes
are then not processed by proper rehype plugins. Typically if a remark
plugin generates `html` nodes, this indicates it should have actually
been a rehype plugin.

This changes the remark plugins that generate `html` nodes into rehype
nodes. These were `remarkPrism` and `remarkShiki`.

Closes #9909

* Apply suggestions from code review

* refactor(mdx): move user defined rehype plugins after syntax highlighting

* fix(mdx): fix issue in mdx rehype plugin ordering

* docs: explain why html/raw nodes are avoided in changeset

This also includes some hints on what users could do to upgrade of they
rely on these nodes.

* Fix MDX rehype plugin ordering

* refactor(remark): restore remarkPrism and remarkShiki

They aren’t used anymore, but removing would be a breaking change.

* chore: mark deprecated

* Apply suggestions from code review

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* Update .changeset/thirty-beds-smoke.md

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

---------

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-03-08 10:53:39 +00:00
Bjorn Lu
5a9528741f
Move to shiki and stabilize dual themes support (#10130)
* Update to shiki

* Stabilize shikiConfig.experimentalThemes

* Add changeset

* Fix merge issues
2024-03-08 10:53:19 +00:00
Erika
959ca5f9f8
feat(toolbar): Allow every element to have every color (#10186)
* feat(toolbar): Allow every element to have every color

* chore: changeset

* fix: add validatio

* fix: ok but what happened even

* nit: cooler messages

* fix: toggles
2024-03-08 11:52:50 +01:00
Bjorn Lu
33616ba226
Update security flow to report on GitHub (#10328) 2024-03-08 09:58:29 +00:00
Bjorn Lu
03f79f005e
Fix check-merge workflow on PRs from forks (#10366) 2024-03-08 16:21:33 +08:00