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

644 commits

Author SHA1 Message Date
renovate[bot]
48b85c13dd
fix(deps): update all non-major dependencies (#11765)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-19 16:09:05 +08:00
Houston (Bot)
0109690c3b
[ci] release (#11734)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-16 00:34:37 +08:00
Houston (Bot)
91d36fa36b
[ci] release (#11719)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-15 16:06:43 +01:00
Houston (Bot)
40a1b3002c
[ci] release (#11699)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-15 10:48:37 +01:00
Matt Kane
a79a8b0230
Content Layer (#11360)
* Empty commit

* Changeset

* feat: add Content Layer loader (#11334)

* wip

* wip

* wip

* Update demo

* Add meta

* wip

* Add file loader

* Add schema validation

* Remove log

* Changeset

* Format

* Lockfile

* Fix type

* Handle loading for data store JSON

* Use rollup util to import JSON

* Fix types

* Format

* Add tests

* Changes from review

* fix: sync content layer in dev (#11365)

* wip

* wip

* wip

* Update demo

* Add meta

* wip

* Add file loader

* Add schema validation

* Remove log

* Changeset

* Format

* Lockfile

* Fix type

* Handle loading for data store JSON

* Use rollup util to import JSON

* Fix types

* Format

* Add tests

* Changes from review

* Sync content layer in dev

* feat: add typegen for loaders (#11358)

* fix: watch for content layer changes (#11371)

* fix: watch for content layer changes

* Add test

* feat: adds simple loader (#11386)

* wip

* Add simple loader

* Fix type guard

* Tighten loader schema

* Add loader function to type

* Reinstall vitest

* feat: add glob loader (#11398)

* feat: add glob loader

* Enable watching and fix paths

* Store the full entry object, not just data

* Add generateId support

* Fix test

* Rename loaders to sync

* Refacctor imports

* Use getEntry

* Format

* Fix import

* Remove type from output

* Windows path

* Add test for absolute path

* Update lockfile

* Debugging windows

* Allow file URL for base dir

* Reset time limit

* feat: add markdown rendering to content layer (#11440)

* feat: add glob loader

* Enable watching and fix paths

* Store the full entry object, not just data

* Add generateId support

* Fix test

* Rename loaders to sync

* Refacctor imports

* Use getEntry

* Format

* Fix import

* Remove type from output

* Windows path

* Add test for absolute path

* Update lockfile

* Debugging windows

* Allow file URL for base dir

* Reset time limit

* wip: add markdown rendering to content layer

* use cached entries

* CLean up types

* Instrument more of the build

* Add digest helper

* Add comments

* Make image extraction work

* feat: image support for content layer (#11469)

* wip

* wip

* Add image to benchmark

* Stub assets if missing

* Resolve assets in data

* Ignore virtual module

* Format

* rm log

* Handle images when using cached data

* Fix CCC

* Add a comment

* Changes from review

* Format

* Use relative paths for asset files

* Pass all md props to getImage

* Ensure dotastro dir exists

* Fix tests

* Changes from review

* Don't use temp array in getcollection

* Add error handling

* Format

* Handle paths that are already relative

* Dedupe sync runs

* Fix syncing in dev

* Changes from review

* Windows paths ftw

* feat(content-layer): support references in content layer (#11494)

* Support references in content layer

* Fix utf8 rendering

* Warn for invalid entries

* Fix test

* lol windows paths

* Remove assertion

* chore: fix content layer types (#11527)

* Add experimental_content type

* Fix import

* Make data store methods generic

* fix loader types

* Lockfile

* Clean content layer with `--force` (#11541)

* Clearn content layer with `--force`

* Add tests

* Document --force flag

* Fixes to content layer render types (#11558)

* Lockfile

* feat: use devalue to serialize content layer data (#11562)

* feat: use devalue to serialize content layer data

* Fix import

* Use devalue stringify

* Unused import

* Propagate error messages correctly

* Support --force flag in sync and dev (#11581)

* Support --force flag in sync and dev

* Fix test

* Separate render function and merge content layer types (#11579)

* Separate render function and merge content layer types

* Changes from review

* fix: clear content layer cache if config has changed (#11591)

* fix: clear content layer cache if config has changed

* Add test

* Watch config

* Change from review

* fix: skip glob files in content dir (#11622)

* fix: skip glob files in content dir

* Changes from review

* Log pattern

* Refactor content layer into shared instance (#11625)

* Refactor content layer into shared instance

* Clean up when testing

* Handle cleanup

* fix: support filters in content layer getCollection (#11631)

* Throw when using deprecated getEntryByX functions with content layer (#11637)

* Updates to content layer types and jsdocs (#11643)

* Add hot key to reload content layer (#11626)

* Add hot key to reload content layer

* Fix filename

* Remove cli message

* Update example

* Change key to "s"

* feat: handle simple mdx rendering (#11633)

* feat: handle simple mdx rendering

* cleanup

* feedback

* fix regression

* remove log

* flip condition

* update tests

* log collections to understand the error

* let's try this alternative

* try parallel test to understand the issue

* chore: use a new fixture to fix tests

* rebase and docs

* fix regressions

* remove old code

* address feedback

* rename param

* log error

* rebase

* chore: try a different cache dir to solve the error test

* fix invalidation of the module when there's no store available

* address suggestion

* run formatter

* update lock file

* Lint

* Add experimental content layer flag (#11652)

* Add experimental content layer flag

* Syntax and format

* Aside

* Format

* Reset content config between runs

* Update fixture

* Update terminology

* Lint

* wut

* Normalize render function return value (#11663)

* Add markdoc support to content layer (#11664)

* Add markdoc support to content layer

* Switch test to cheerio

* Update benchmarks

* update lock file

* Update content layer flag docs (#11682)

* Update content layer flag docs

* Apply suggestions from code review

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

* More markdoc

* Typo

* Apply suggestions from code review

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

* Update

---------

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

* Add changeset for content layer experimental release (#11644)

* Add changeset for content layer experimental release

* Update changeset

* Update .changeset/smooth-chicken-wash.md

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

---------

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

* feat: injectTypes (#11551)

* feat: make inline config 1st arg

* fix: run config done in sync

* feat: start working on injectTypes

* feat: write files

* feat: adapt core features

* feat: migrate db to injectTypes

* feat: special db handling

* feat: update settings instead of workarounds

* fix: create dotAstroDir

* feat: refactor sync tests

* fix: path

* fix: paths

* chore: add comments

* feat: overwrite content file if exists

* chore: remove unused db env related code

* feat: use dotAstroDir for settings

* chore: simplify astro env sync

* feat: use dotAstroDir for preferences

* feat: handle db in integration api

* chore: reorganize

* feat: format

* feat: add test

* Discard changes to examples/basics/astro.config.mjs

* Discard changes to examples/basics/package.json

* Discard changes to pnpm-lock.yaml

* chore: remove test files

* feat: update examples dts

* fix: dts

* chore: changesets

* fix: indentation

* Apply suggestions from code review

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

* Apply suggestions from code review

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

* chore: format

* Update packages/astro/src/integrations/hooks.ts

* Update .changeset/mean-horses-kiss.md

* feat: remove formatting

* feat: handle fs errors

* feat: remove astro:db special path handling

* feat: add fs error

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

* Update .changeset/mean-horses-kiss.md

* Update errors-data.ts

* Update .changeset/mean-horses-kiss.md

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

* Update .changeset/mean-horses-kiss.md

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

---------

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>

* Add file generation and flag for content intellisense (#11639)

* feat: add type to infer input type of collection

* refactor:

* feat: generate json schema for content too

* feat: generate a manifest of all the collections

* refactor: unnecessary type

* fix: only add content collections to manifest

* chore: changeset

* fix: generate file URLs

* fix: flag it properly

* fix: save in lower case

* docs: add jsdoc to experimental option

* nit: move function out

* fix: match vscode flag name

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

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

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

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

* Update serious-pumas-run.md

* test: add tests

* Add content layer support

* Apply suggestions from code review

* fix: test

* Update .changeset/serious-pumas-run.md

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

* Apply suggestions from code review

* Remove check for json

---------

Co-authored-by: Matt Kane <m@mk.gg>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* nit: use same filesystem error as injectTypes

* fix: code component was missing support for meta string (#11605)

* fix: code component was missing support for meta string

Fixed #11604

* Create odd-buttons-pay.md

* <Code>: add reference link for meta prop

* Apply suggestions from code review

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

* Update .changeset/odd-buttons-pay.md

* Update .changeset/odd-buttons-pay.md

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

---------

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>

* Deprecates exporting prerender with dynamic values (#11657)

* wip

* done i think

* Add changeset

* Use hook instead

* Reorder hooks [skip ci]

* Update .changeset/eleven-pens-glow.md

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

* Fix run

* Fix link

* Add link

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

* More accurate migration [skip ci]

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Sarah Rainsberger <sarah11918@users.noreply.github.com>

* Use node parseArgs instead of yargs-parser and arg (#11645)

* wip

* done

* Add changeset

* Format

* Update

* Fix houston

* Fix test

* Fix test

* [ci] format

* resolve conflict

---------

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
Co-authored-by: Julien Cayzac <jcayzac@users.noreply.github.com>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah11918@users.noreply.github.com>
Co-authored-by: Bjorn Lu <ematipico@users.noreply.github.com>
2024-08-14 11:49:19 +01:00
Houston (Bot)
6bb001476c
[ci] release (#11686)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-14 09:14:23 +01:00
renovate[bot]
315ec07e1b
fix(deps): update all non-major dependencies (#11674)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: bluwy <bjornlu.dev@gmail.com>
2024-08-13 22:29:37 +08:00
Houston (Bot)
8118120e91
[ci] release (#11654)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-09 17:49:10 -04:00
Houston (Bot)
6b99523c3f
[ci] release (#11602)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-08 07:52:00 -04:00
Houston (Bot)
2abbc281b3
[ci] release (#11590)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-02 09:18:47 -04:00
Houston (Bot)
4474887937
[ci] release (#11578)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-08-01 11:55:37 +02:00
renovate[bot]
750d5328c9
fix(deps): update all non-major dependencies (#11565)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-31 21:17:26 +08:00
Houston (Bot)
49db00444e
[ci] release (#11524)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-30 11:54:54 -04:00
renovate[bot]
536209aa74
fix(deps): update all non-major dependencies (#11522)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: bluwy <bjornlu.dev@gmail.com>
2024-07-23 11:43:14 +08:00
Houston (Bot)
a6c4e67544
[ci] release (#11504)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-19 10:06:49 -04:00
Houston (Bot)
745ce44dd3
[ci] release (#11492)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-18 23:30:35 +02:00
Houston (Bot)
aa05be3313
[ci] release (#11481)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-18 16:05:23 +01:00
Houston (Bot)
e30cf49ee4
[ci] release (#11442)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-17 14:47:16 +02:00
Houston (Bot)
75d118bf7f
[ci] release (#11409)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-03 18:03:29 -04:00
Houston (Bot)
571e184d5a
[ci] release (#11351)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-07-03 10:10:40 -04:00
renovate[bot]
e60aab9a9f
fix(deps): update all non-major dependencies (#11383)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: bluwy <bjornlu.dev@gmail.com>
2024-07-01 16:32:17 +08:00
Houston (Bot)
d7ae91c83c
[ci] release (#11346)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-26 21:09:08 +08:00
Houston (Bot)
d9e6190a0d
[ci] release (#11336)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-26 11:29:13 +02:00
Houston (Bot)
ce310f8292
[ci] release (#11297)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-24 12:49:52 -04:00
renovate[bot]
47e78d4752
fix(deps): update all non-major dependencies (#11318)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: bluwy <bjornlu.dev@gmail.com>
2024-06-24 22:33:33 +08:00
Houston (Bot)
58a321193e
[ci] release (#11276)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-20 11:58:37 +01:00
Houston (Bot)
83c565b36c
[ci] release (#11233)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-17 15:39:57 +02:00
renovate[bot]
68f1d0d13e
chore(deps): update all non-major dependencies (#11269)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-17 14:18:41 +08:00
Houston (Bot)
dd0145d28b
[ci] release (#11225)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-11 13:15:27 +01:00
Houston (Bot)
2da877bfe9
[ci] release (#11201)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-08 11:28:34 +02:00
Houston (Bot)
48d53094cd
[ci] release (#11186)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-06 11:02:22 -04:00
Houston (Bot)
587e75f47e
[ci] release (#11158)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-06-05 09:45:03 +02:00
Houston (Bot)
cdf89a16c8
[ci] release (#11140)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-27 06:58:19 -04:00
Houston (Bot)
4c7949d1ae
[ci] release (#11132)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-23 12:05:22 -04:00
Houston (Bot)
50775925f9
[ci] release (#11116)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-23 11:06:20 +01:00
Houston (Bot)
9ddd6387a7
[ci] release (#11086)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-22 09:40:11 +02:00
Houston (Bot)
8a80221e4c
[ci] release (#11085)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-17 12:01:27 +01:00
Houston (Bot)
4d32a8077b
[ci] release (#11053)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-16 18:00:58 +01:00
Houston (Bot)
5a48d53385
[ci] release (#11025)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-15 10:42:55 -04:00
Houston (Bot)
18b78ec881
[ci] release (#11019)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-13 07:29:41 -04:00
Houston (Bot)
0b8b6f98a2
[ci] release (#10993)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-09 14:20:24 -04:00
Houston (Bot)
e2cdd3c96b
[ci] release (#10985)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-09 22:40:23 +08:00
Houston (Bot)
770b9f06c3
[ci] release (#10944)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-09 11:06:49 +01:00
renovate[bot]
f9b6f4fc2f
chore(deps): update all non-major dependencies (#10958)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: bluwy <bjornlu.dev@gmail.com>
2024-05-09 15:20:13 +08:00
Houston (Bot)
9a231a4dd7
[ci] release (#10890)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-05-02 19:59:20 +08:00
Houston (Bot)
9876163406
[ci] release (#10865)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-25 11:28:32 +02:00
Houston (Bot)
a94046588c
[ci] release (#10842)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-23 19:30:37 -04:00
Houston (Bot)
7fda037b27
[ci] release (#10798)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-18 11:35:39 -04:00
Houston (Bot)
668d97319c
[ci] release (#10777)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-16 17:07:50 +01:00
Houston (Bot)
3ff6b403db
[ci] release (#10757)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-04-12 11:31:46 -04:00