Commit graph

5327 commits

Author SHA1 Message Date
Emanuele Stoppa
c1ca84a8c1
ci: add workflow dispatch (#6386) 2023-03-01 14:02:35 +00:00
Bjorn Lu
f4937949d6
Refactor benchmark script (#6376)
* Add timer setting

* Setup benchmark code

* Setup memory benchmark

* Add compare function

* Add result preview

* Setup results preview

* Simplify script for CI

* Update CI

* Cleanup

* Temp remove fork guard

* Fix stuff

* Fix again

* Fix quotes

* Fix multiline output

* Simplify title

* Fix memory numbers

* Remove astro bin dir

* Fix gc

* Add repo guards

* Fix wrong call

* Set max space size

* Remove guard

* Bump memory a bit

* Organize neatly

* Update readme

* Try large md

* Try no gc

* Revert markdown and gc changes

* Test sha

* Try ref

* Try 128mb

* Set 256

* Add guard

* Apply suggestions from code review

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

* Add docs comment

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-03-01 08:46:06 +00:00
natemoo-re
045262ee99 [ci] format 2023-02-27 21:28:07 +00:00
Joaquín Sánchez
02a7266e3c
fix: don't mix Vite plugins when spawning temporary Vite server (#6368)
* fix: don't mix Vite plugins when spawning temporary Vite server

* chore: include command to `createVite` options

* chore: use `command` and exclude `preview`

* chore: add test

* fix(test): remove command check from apply fn

* chore: add hint about filtering vite plugins and command

* chore: apply suggestion

Co-authored-by: Ben Holmes <hey@bholmes.dev>

---------

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: Ben Holmes <hey@bholmes.dev>
2023-02-27 15:26:11 -06:00
Erika
95164bfdd2
Add a warning when using encoding in SSR and headers on objects in endpoints (#6358)
* fix(endpoints): Add a warning when trying to set encoding and headers in SSR

* fix(endpoint): Oops, it'd be great if it actually worked

* fix(endpoint): Fix import path

* fix(endpoint): Add link to docs

* Update packages/astro/src/core/endpoint/index.ts

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

* fix: don't output encoding warning if endpoint is pre-rendered

* Update packages/astro/src/core/endpoint/index.ts

* Update packages/astro/src/core/endpoint/index.ts

---------

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-02-27 12:07:13 -06:00
natemoo-re
ff2e4dac7b [ci] format 2023-02-27 16:11:41 +00:00
Nate Moore
754c5ca9aa
Respect original package.json indentation (#6375)
* fix(#6338): respect original indentation

* chore: add changeset
2023-02-27 10:09:54 -06:00
Houston (Bot)
71743aeca7
[ci] release (#6359)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-02-27 08:55:42 -05:00
bluwy
780c583b0e [ci] format 2023-02-26 01:53:18 +00:00
Vick Vasquez
67c58c48c7
fix: remove duplicate exit key from create template (#6360) 2023-02-26 09:51:26 +08:00
weakish
9f0ae4e6eb
Update doc link in non-html-pages example README (#6369) 2023-02-25 19:54:36 +01:00
Matthew Phillips
d94aae7765
Only apply head propagation in trees that need it (#6363) 2023-02-24 17:28:15 -05:00
Kacper Potyrała
c87c16cfad
Add missing flags to help action (#6352)
* add missing flags to help action

* add proper changeset

---------

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-02-24 16:17:28 -06:00
Nate Moore
4d75396362
enable ci for merge_group (#6361) 2023-02-24 13:57:02 -06:00
natemoo-re
b0aca3c66a [ci] format 2023-02-24 18:13:07 +00:00
Reece McDonald
26bf12ef3c
[Lit] render DSD attributes based on shadowRootOptions (#6351)
* [Lit] render DSD attributes based on `shadowRootOptions`

## Changes

- Update `@astrojs/lit`’s `server.js` to properly render elements with `delegatesFocus: false` set in their `shadowRootOptions`.
- Logic is based on `@lit-labs/ssr` [latest implementation as found here](b0c3f82ef0/packages/labs/ssr/src/lib/render-value.ts (L738))

## Testing

A test was added to ensure an element with `delegatesFocus` set to true has this attribute properly included in the rendered static markup.

* chore: add changeset
2023-02-24 12:10:56 -06:00
Emanuele Stoppa
5aa6580f77
fix: bump undici to v5.20.0 (#6355)
* fix: bump `undici` to v5.20.0

* fix(cookies): Hopefully the last time we mess with undici and cookies

* chore: add @astrojs/telemetry to changeset

---------

Co-authored-by: Princesseuh <princssdev@gmail.com>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-02-24 12:10:33 -06:00
Nate Moore
098341f17a
ci: don't pin pnpm/action-setup exactly (#6348) 2023-02-24 09:52:43 -06:00
Houston (Bot)
a848a723f6
[ci] release (#6287)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-02-23 14:50:11 -06:00
John Beene
de3d79e06b
fix: too many files opened for collections with many entries (#6313)
* fix: too many files opened for collections with many entries

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

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

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

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

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

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

---------

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-02-23 14:05:17 -06:00
Nate Moore
504c7bacb8
Use getSetCookie, if available (#6347)
* fix: use getSetCookie, if available

* fix: explicitly use entries

* fix(image): be defensive on node@18.14.1

* chore: update changeset

* ci: skip test in 18.14.1
2023-02-23 13:41:00 -06:00
Brian McManus
48b54d92ea
Fixes example README links to open in codespaces (#6346) 2023-02-23 11:20:19 -06:00
natemoo-re
178f74c9a7 [ci] format 2023-02-23 15:36:28 +00:00
Brian McManus
7da05febea
Enhanced Astro codespace support (#6288)
* Enhanced Astro codespace support

Enhances the base devcontainer and Dockerfile to provide a smoother
development experience out of the box for contributors.

Adds a devcontainer per example so that we can add buttons on astro.new
that will launch users straight into the appropriate example app.

* Cleanup devcontainers and pin base image

* Update .devcontainer/example-welcome-message.txt

Co-authored-by: Samruddhi Khandale <skhandale@microsoft.com>

---------

Co-authored-by: Samruddhi Khandale <skhandale@microsoft.com>
2023-02-23 09:34:37 -06:00
natemoo-re
eed2c85513 [ci] format 2023-02-23 15:22:22 +00:00
Raphael Bossek
075b87e8b7
Update MDX integration to es-module-lexer@1.1.1 (#6296)
* Update MDX integration to es-module-lexer@1.1.1

* Added missing pnpm-lock.yaml file

* Create lucky-flowers-wonder.md

---------

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-02-23 09:20:06 -06:00
Happydev
f91a7f376c
fix(content): ensure underscore ignores only child paths of the content directory. (#6330)
* test: add test fixture

* test: add cc config file

* migrate to unit test instead

* fix: only include child folders in ignore list

* chore: changeset
2023-02-23 09:19:33 -06:00
Chris Swithinbank
5e86b011dc
Improve portfolio example icon support (#6343) 2023-02-23 15:48:01 +01:00
Emanuele Stoppa
63dda6dedd
fix(astro): correctly change configuration when node adapter is added (#6333)
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-02-22 20:53:56 +00:00
matthewp
3b1871a726 [ci] format 2023-02-22 14:51:37 +00:00
wulinsheng123
ccd72e6bb4
fix #6020 (#6320) 2023-02-22 09:49:49 -05:00
Eric P Sheets
a9a40d05d6
fix(examples/docs): future-proof Discord link (#6325) 2023-02-21 16:31:28 -06:00
natemoo-re
79ef8c97a2 [ci] format 2023-02-21 16:50:11 +00:00
Miles Pernicious
7f61e8fe36
[create-astro] Execute the 'git' step as the final interaction (#6314)
* [create-astro] Execute the 'git' step as the final interaction

This ensures the initialized repository has all configuration
changes commited in the first commit

* Add changeset
2023-02-21 10:48:06 -06:00
李瑞丰
d0dbee872f
create-astro help info add --typescript flag (#6294)
* create-astro help info add --typescript flag

* changeset

* changeset
2023-02-21 10:33:52 -06:00
bluwy
f218188b25 [ci] format 2023-02-21 14:17:00 +00:00
Bjorn Lu
2eb73cb9d1
Use .mjs extension when building for netlify edge and vercel serverless (#6317) 2023-02-21 22:14:47 +08:00
Christofer J. Ekervhén
2a6d09e5d2
Fix import of type HTMLAttributes in blog example (#6322)
* Fix extend type HTMLAttributes in blog example

* Update examples/blog/src/components/HeaderLink.astro

Co-authored-by: Christofer J. Ekervhén <45903979+ChrisEke@users.noreply.github.com>

---------

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
2023-02-21 14:21:19 +01:00
Erika
5e26bc891c
fix(cookies): Update Undici to 5.20 and fix cookies behaviour (#6323)
* fix(cookies): Update Undici to 5.20 and fix cookies behaviour

* chore: changeset
2023-02-21 14:18:17 +01:00
Dan Jutan
d3df40af2e
Docs: Image README clarifications (#6290)
* hosted on other domains -> accessed by url

* these work like remote images

* including images in public

* Update packages/integrations/image/README.md

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

* Update packages/integrations/image/README.md

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

* Update packages/integrations/image/README.md

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

* Update packages/integrations/image/README.md

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

* Update packages/integrations/image/README.md

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

* Update packages/integrations/image/README.md

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

* reorder remote first

* Update packages/integrations/image/README.md

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

* Update packages/integrations/image/README.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>
2023-02-18 13:59:48 -05:00
Happydev
a156ecbb7f
fix(content-collections): warn about allowJs only when content directory exists (#6293)
* warn only when `content` directory exists

* chore: changeset
2023-02-18 09:24:33 -05:00
Erika
a8577278e0
Add documentation for unknown errors (#6285)
* feat(errors): Add documentation for unknown errors

* docs(errors): Misc refactors

* docs(errors): Remove unnecessary messages

* docs(errors): Add guidance around UnknownError

* Update packages/astro/src/core/errors/errors-data.ts

Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>

---------

Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>
2023-02-17 20:30:58 +01:00
vic1707
4fcefa34f9
update ChangeFreq to support typescript configurations with string literal (#6262)
* update `ChangeFreq`

* `pnpm exec changeset`

* use @Princesseuh suggested change

* Revert "use @Princesseuh suggested change"

This reverts commit a1e5660c25.

* use @Princesseuh suggested change and an `as`
2023-02-17 12:46:00 -06:00
Houston (Bot)
2e4ca0370a
[ci] release (#6279)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-02-17 13:44:15 -05:00
matthewp
ff70614083 [ci] format 2023-02-17 18:21:11 +00:00
Nate Moore
61113dd731
Fix prerendered page handling on Deno (#6284)
* fix(deno): handle prerendered pages

* test(deno): add prerender test

* fix: defensively access vite.build.rollupOptions.external

* fix(deno): support other formats of rollupOptions.external

* fix(deno): crawl prerendered files for match

* fix(deno): ignore deno error in server file

* fix(deno): cross-platform serve file
2023-02-17 13:19:19 -05:00
natemoo-re
ed92730925 [ci] format 2023-02-17 17:05:52 +00:00
Nate Moore
933c651fb1
Backwards compatible fix for --camelCase css vars in style attribute (#6268)
* fix(#6264): backward-compat fix for camelCase css vars in style

* chore: add changeset
2023-02-17 11:04:08 -06:00
Matthew Phillips
bb18010137
Pin undici (#6282) 2023-02-17 11:46:10 -05:00
matthewp
54166393be [ci] format 2023-02-17 16:00:41 +00:00