0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00
Commit graph

52 commits

Author SHA1 Message Date
Florian Lefebvre
110fc01a5b
chore: remove unused imports (#12696) 2024-12-11 16:01:06 +01:00
Emanuele Stoppa
2ee8412bbc [ci] format 2024-12-03 17:04:13 +00:00
Emanuele Stoppa
9b5f3a702d
refactor: use vitest for benchmarks (#12605)
* refactor: use `vitest` for benchmarks

* increase timeout

* increase timeout

* Restore correct label
2024-12-03 17:03:24 +00:00
Emanuele Stoppa
2da81e53c3 Merge branch 'main' into next 2024-11-27 14:31:09 +00:00
Emanuele Stoppa
8b0e36ca91
chore: fix linting warnings (#12526) 2024-11-26 13:06:04 +00:00
bluwy
671f50c7d3 Merge branch 'main' into next 2024-11-15 19:37:28 +08:00
Emanuele Stoppa
e64ec5f9df
chore: breakdown of benchmarks (#12433) 2024-11-14 16:26:50 +00:00
bluwy
7db86cf2b7 Merge branch 'main' into next 2024-11-06 23:17:39 +08:00
Emanuele Stoppa
4c9a42c2da [ci] format 2024-11-06 12:34:13 +00:00
Emanuele Stoppa
ed5a9f1b75
chore: codspeed benchmark (#12347) 2024-11-06 12:33:14 +00:00
Bjorn Lu
493fe43cd3
Improve tinyexec errors (#12368) 2024-11-04 22:49:33 +08:00
bluwy
63b4ab95b9 Merge branch 'main' into next 2024-10-31 16:16:00 +08:00
renovate[bot]
ecc4402b3a
fix(deps): update all non-major dependencies (#12316)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-28 22:00:15 +08:00
Emanuele Stoppa
57dedbf28d Merge branch 'main' into next 2024-10-22 13:16:51 +01:00
renovate[bot]
2edcad1490
fix(deps): update all non-major dependencies (#12266)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-22 13:07:28 +01:00
bluwy
9fc86e543a Merge branch 'main' into next 2024-10-10 21:28:25 +08:00
Emanuele Stoppa
2a1536d091
chore: move lint rules to Biome (#12145)
* chore: move lint rules to Astro

* better suppression system

* revert

* format code

* address more linting files

* address more linting files
2024-10-08 10:12:40 +01:00
bluwy
e748c480a7 Merge branch 'main' into next 2024-10-01 11:21:48 +08:00
renovate[bot]
2594eb088d
fix(deps): update all non-major dependencies (#12003)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: bluwy <bjornlu.dev@gmail.com>
2024-09-26 14:57:59 +01:00
Matt Kane
c3dce8363b
Unflag content layer (#11911)
* Unflag content layer

* Lint

* More detailed changeset

* Update .changeset/heavy-seahorses-poke.md

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

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-09-04 09:40:46 +01:00
Alexander Niebuhr
11ebf3bd15
chore: move node and vercel to adapters repo (#11866) 2024-08-30 19:43:43 +02:00
Bjorn Lu
440a4be0a6
Use tinyexec (#11845) 2024-08-28 22:52:49 +08:00
renovate[bot]
26c63a2b07
fix(deps): update all non-major dependencies (#11837)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-28 10:45:45 +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
Viktor Szépe
a146cf1012
Fix typos (#10923) 2024-05-01 13:56:38 +08:00
renovate[bot]
8d5f3e8656
chore(deps): update all non-major dependencies (#10833)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: bluwy <bjornlu.dev@gmail.com>
2024-04-22 22:52:30 +08:00
Bjorn Lu
88ee63a3ba
Remove MDX processor on buildEnd (#10770) 2024-04-15 15:56:53 +08: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
Matthew Phillips
e34eeb146e [ci] format 2024-02-14 15:15:02 +00:00
Matthew Phillips
d469bebd7b
Improve Node.js performance using an AsyncIterable (#9614)
* Improve Node.js performance using an AsyncIterable

* Oops

* Get rid of extra abstraction

* Update .changeset/hip-cherries-behave.md

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

* Check if already resolved

* Resolve on done

* Get rid of unneeded "done"

* Done when length is zero

* Let errors resolve

* Update packages/astro/src/runtime/server/render/astro/render.ts

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

* Move doctype to top-level

* Document the new function

* Update .changeset/hip-cherries-behave.md

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

* Update .changeset/hip-cherries-behave.md

---------

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-02-14 10:14:05 -05:00
Bjorn Lu
153a5abb90
Remove deprecated features from Astro 3.0 (#9168) 2023-11-28 00:44:20 +08:00
Bjorn Lu
abf601233f
Update all dependencies (#9138)
Co-authored-by: delucis <delucis@users.noreply.github.com>
2023-11-21 12:09:19 +08:00
Bjorn Lu
c8976440ff
Prevent bumping peer deps (#8893) 2023-10-26 18:07:02 +08:00
Erika
4e395a6cab
config: migrate us to moduleResolution: 'node16' (#8519) 2023-09-13 16:49:22 +02:00
giovanni
535a458999
fix: remove duplicate import (#8393)
Co-authored-by: jesse <qfei.shao@gmail.com>
2023-09-04 18:42:46 +08:00
李瑞丰
8d12659ce8
Fix benchmark import path (#8389) 2023-09-04 11:19:53 +08:00
bluwy
6606245b35 [ci] format 2023-08-25 13:02:36 +00:00
Bjorn Lu
0ae3b7a7ba
Improve stress test benchmark (#8225) 2023-08-25 21:00:51 +08:00
Bjorn Lu
048846fd53
Update breaking dependencies (#8201) 2023-08-24 16:34:33 +08:00
Bjorn Lu
353dcb23e8
Update non-major dependencies (#8199) 2023-08-23 19:52:13 +08:00
Erika
148e61d249 feat: remove webapi in favor of a smaller polyfill (#7840)
* feat: remove webapi in favor of a smaller polyfill

* test: remove old test

* test: 🤦‍♀️

* chore: changeset
2023-08-08 11:01:45 +01:00
Erika
d0679a666f Remove support for Node 16 (#7780) 2023-08-08 11:01:33 +01:00
Erika
f14e48098a
nit: use node: prefix everywhere (#7692)
* nit: use `node:` prefix everywhere

* nit: fs/promises too

* test: workaround issue in node builtin detection
2023-07-18 02:17:59 +02:00
Bjorn Lu
255dead86f
Add CLI startup speed benchmark (#7617) 2023-07-10 23:43:01 +08:00
Bjorn Lu
f275d058fc
Update safe dependencies (#7430) 2023-06-21 21:09:49 +08:00
Houston (Bot)
06c527330a
[ci] release (#6914)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-04-27 22:12:14 +08:00
Bjorn Lu
00a0af7ed4
Move benchmark package and update changeset config (#6433) 2023-03-07 10:52:47 +08:00
bluwy
1aea58f14a [ci] format 2023-03-06 14:58:51 +00:00
Bjorn Lu
c5bac09a42
Add page render benchmark (#6415) 2023-03-06 22:55:44 +08:00
Bjorn Lu
13f6f591e3
Improve server-stress benchmark comment (#6405) 2023-03-03 11:55:31 +08:00