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

5504 commits

Author SHA1 Message Date
Shoaib Khan
3007d24c98
chore: Migrate all packages/create-astro/test to node:test (#10084)
* chore: Migrate All packages/create-astro/test to node:test

* Some minor fix

* Requested Changes done

* Reopen

* Apply suggestions from code review

* let's test with concurrency

* chore: fix possible false positive tests

* todo test

* skip tests

* Apply suggestions from code review

---------

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-02-13 14:41:59 +00:00
Bjorn Lu
bd877d389a
Fix mocha run (#10100) 2024-02-13 22:25:30 +08:00
Ming-jun Lu
bcd9202228 [ci] format 2024-02-13 13:24:10 +00:00
Ming-jun Lu
37c75108e7
chore(@astrojs/vercel): migrate tests to node:test (#10010)
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-02-13 13:23:07 +00:00
Emanuele Stoppa
a326124f5a
test: move unit tests to use node:test (#10090)
* test: move some unit tests to use node:test

* add `before`

* address feedback

* remove mocha command

* fix test
2024-02-13 12:19:06 +00:00
Florian Lefebvre
2ffc5721bc
fix(vercel): trailing slash conflict (#10082) 2024-02-13 11:36:22 +00:00
Ming-jun Lu
77e784d6aa [ci] format 2024-02-13 11:29:20 +00:00
Ming-jun Lu
d9266c4467
Fix an issue where ReadableStream wasn't canceled in dev mode (#9971)
* Fix an issue where ReadableStream wasn't canceled in dev mode

* Add changeset

* add test

---------

Co-authored-by: lilnasy <69170106+lilnasy@users.noreply.github.com>
2024-02-13 11:28:14 +00:00
Emanuele Stoppa
bedb3b0930
test: mocha should ignore nodetest.js files during unit testing (#10093) 2024-02-12 15:51:03 +00:00
Arsh
071c329f25 [ci] format 2024-02-12 15:26:57 +00:00
Arsh
8106178043
qol(routing): improve endpoint error message (#10072)
* Clarify error messages in endpoint routing.

* add changeset
2024-02-12 20:55:46 +05:30
Houston (Bot)
7371e1b5fc
[ci] release (#10029)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-12 14:25:50 +00:00
Mohamed
1b528d2e50
chore: Migrate some astro-*.test.js to node:test (#10085)
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-02-12 14:09:45 +00:00
Marawan Mohamed
dac759798c
Fix and update shikiji core (#10063)
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-02-12 21:26:25 +08:00
Emanuele Stoppa
09a6273fe2
test: mocha should ignore *.nodetest.js files (#10088) 2024-02-12 13:03:22 +00:00
Shoaib Khan
2dbb6a3e08
chore: Migrate All packages/markdown/remark/tests to node:test (#10083)
* chore: Migrate All packages/markdown/remark/tests to node:test

* Some minor fixes
2024-02-12 12:25:29 +00:00
Atharva
b2a6ee5c81 [ci] format 2024-02-12 12:22:56 +00:00
Atharva
116cfb63e3
chore: migrate vue related tests to node:test (#10061)
* chore: migarte slots-vue.testjs to node

* chore: migrate vue-**.test.js to node:test

* fix: add missing imports, remove expect script
2024-02-12 12:21:47 +00:00
Mohamed
2a70113f7e
chore: Migrate ssr-*.test.js to node:test (#10053)
* chore: Migrate ssr-*.test.js to node:test

* revert Production function in ssr-error-pages

* revert ssr-error-pages.test.js

* fix: add missing path at ssr-split-manifest

---------

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-02-12 12:20:34 +00:00
Emanuele Stoppa
8f37cf72cb
test: move some unit tests to use node:test (#10070) 2024-02-09 15:46:03 +00:00
Arsh
0b5685a70f [ci] format 2024-02-09 15:23:05 +00:00
Arsh
1810309e65
fix(integration api): improve module resolution (#10060)
* fix(integration api): improve module resolution

* add changeset
2024-02-09 08:22:04 -07:00
Emanuele Stoppa
989ea63bb2
fix(i18n): regression where emitted URLs had // (#10067)
* fix(i18n): regression

* fix(i18n): regression

* fix bug regression

* remove double changeset
2024-02-09 14:58:09 +00:00
Mohamed
30acdcbb0d
chore: Migrate error-build-location.test.js to node:test (#10038)
* chore: Migrate error-build-location.test.js to node:test

* fix: remove unnecessary line

---------

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
2024-02-08 14:18:58 +01:00
ktym4a
c002236523
chore: Migrate custom-404-static.test.js to node:test (#10035) 2024-02-08 14:17:57 +01:00
ktym4a
eaf2fb6a71 [ci] format 2024-02-08 10:30:29 +00:00
ktym4a
ccb08ea7c8
chore: Migrate custom-404-implicit-rerouting.test.js to node:test (#10026) 2024-02-08 11:26:03 +01:00
voxel!()
a941de1d6d
chore: Migrate ssr-markdown.test.js to node:test (#10027) 2024-02-08 11:25:48 +01:00
voxel!()
3d32724003
chore: Migrate astro-markdown-url.test.js to node:test (#10028) 2024-02-08 11:25:35 +01:00
voxel!()
d67a23a3f0
chore: Migrate astro-markdown.test.js to node:test (#10031) 2024-02-08 11:25:14 +01:00
voxel!()
8555c2e3c7
chore: Migrate markdown.test.js to node:test (#10032) 2024-02-08 11:23:56 +01:00
ktym4a
ec0ac4a840
chore: Migrate custom-404-injected-from-dep.test.js to node:test (#10033) 2024-02-08 11:23:27 +01:00
ktym4a
3cc04fd3ec
chore: Migrate custom-404-injected.test.js to node:test (#10034) 2024-02-08 11:23:12 +01:00
ktym4a
283a822121
chore: Migrate custom-404-md.test.js to node:test (#10036) 2024-02-08 11:22:54 +01:00
Mohamed
a6b62254e4
chore: Migrate error-bad-js.test.js to node:test (#10037) 2024-02-08 11:22:40 +01:00
Mohamed
98e5f2202f
chore: Migrate error-non-error.test.js to node:test (#10039) 2024-02-08 11:21:53 +01:00
Mohamed
9e3487e13c
chore: Migrate html-component.test.js to node:test (#10040) 2024-02-08 11:21:38 +01:00
Mohamed
d65332af89
chore: Migrate html-escape-complex.test.js tonode:test (#10041) 2024-02-08 11:21:21 +01:00
Mohamed
3c0e2c728e
chore: Migrate html-escape.test.js to node:test (#10042) 2024-02-08 11:21:03 +01:00
Mohamed
aa7680e75e [ci] format 2024-02-08 10:20:36 +00:00
Mohamed
372c34b84b
chore: Migrate html-page.test.js to node:test (#10043) 2024-02-08 11:19:33 +01:00
Mohamed
648e714e3e
chore: Migrate html-slots.test.js to node:test (#10044) 2024-02-08 11:19:16 +01:00
Ming-jun Lu
c9cf8a93fb
chore: migrate static-build-code-component.test.js to node:test (#10045) 2024-02-08 11:18:51 +01:00
Ming-jun Lu
40c95b4436
chore: migrate static-build-dir.test.js to node:test (#10046) 2024-02-08 11:18:37 +01:00
Ming-jun Lu
0c246cc6dd
chore: migrate static-build-frameworks.test.js to node:test (#10047) 2024-02-08 11:18:10 +01:00
Ming-jun Lu
4e506e0659
chore: migrate static-build-page-dist-url.test.js to node:test (#10048) 2024-02-08 11:17:43 +01:00
Ming-jun Lu
2bff75282a
chore: migrate static-build-page-url-format.test.js to node:test (#10049) 2024-02-08 11:17:10 +01:00
Ming-jun Lu
322b2b6c72
chore: migrate static-build-vite-plugins.test.js to node:test (#10050) 2024-02-08 11:16:53 +01:00
Ming-jun Lu
aef8730f65
chore: migrate static-build.test.js to node:test (#10051) 2024-02-08 11:16:29 +01:00
ktym4a
92b6eb0ac2
chore: Migrate custom-404-html.test.js to node:test (#10025) 2024-02-08 11:14:48 +01:00
voxel!()
15b9e5a8c5
chore: Migrate astro-markdown-shiki.test.js to node:test (#10023) 2024-02-08 11:13:54 +01:00
voxel!()
7f0e5026e3
chore: Migrate astro-markdown-remarkRehype.test.js to node:test (#10021)
* migrate test

* remove old test
2024-02-08 11:12:59 +01:00
voxel!()
b05e6ac26a
chore: Migrate astro-markdown-plugins.test.js to node:test (#10020)
* migrate test

* remove old test

* Update packages/astro/test/astro-markdown-plugins.nodetest.js

* Update packages/astro/test/astro-markdown-plugins.nodetest.js

---------

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
2024-02-08 11:11:56 +01:00
voxel!()
191fd39708
chore: Migrate astro-markdown-frontmatter-injection.test.js to node:test (#10019)
* Add astro-markdown-frontmatter-injection.nodetest.js

* remove comment

* remove old test
2024-02-08 11:10:00 +01:00
Erika
14ce8a6ebf
feat(markdoc): Add support for using a custom component for images (#9958)
* feat(markdoc): Add support for using a custom component for images

* chore: changeset

* test: add test

* Update .changeset/shaggy-spies-sit.md

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

---------

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-02-08 07:54:40 +01:00
ktym4a
8fb67c81bb
Change view transitions rule (#9991)
* WIP: change view transitions rule

* Apply suggestions from code review

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

* add changeset

* Apply suggestions from code review

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

---------

Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com>
2024-02-07 23:49:10 +01:00
Houston (Bot)
ef00224a86
[ci] release (#10018)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-07 23:55:29 +05:30
Arsh
3fc76efb2a
fix(astro:content): include required type declarations (#10022)
* include types/content.d.ts

* add changeset

* Update .changeset/cool-walls-fail.md

Co-authored-by: Arsh <69170106+lilnasy@users.noreply.github.com>

---------

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2024-02-07 23:48:09 +05:30
StandardGage
20ca3154fb
Fix Issues with passing void elements to React with experimentalReactChildren flag set (#9849)
* Create simple react element if element has no children

* Fix for when element has text

* add changeset

* minor -> patch

---------

Co-authored-by: Arsh <69170106+lilnasy@users.noreply.github.com>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2024-02-07 23:38:44 +05:30
Arsh
9836dddf82 [ci] format 2024-02-07 16:10:36 +00:00
Arsh
0699f34d5c
feat(vercel): middleware verification (#9987)
* feat(vercel): verification for edge middleware

* add changeset

* Apply suggestions from code review

---------

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2024-02-07 21:39:39 +05:30
Emanuele Stoppa
9ef79173a6
chore: move i18n routing tests (#10002)
* chore: move i18n routing tests

* change some test

* ignore nodetest files

* let's try now

* rebase
2024-02-07 15:36:46 +00:00
Emanuele Stoppa
037e4f12dd
fix(i18n): don't consider URLs that start with the name of the defaut locale (#10016) 2024-02-07 14:42:51 +00:00
Houston (Bot)
fa9218e836
[ci] release (#10014)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-07 15:38:45 +01:00
Chris Swithinbank
e6b5306a7d
Move astro:content types declaration to manual ambient module (#10013)
* Move `astro:content` types declaration to manual ambient module

* Add changeset

---------

Co-authored-by: bluwy <bjornlu.dev@gmail.com>
2024-02-07 13:58:11 +00:00
Arsh
b07a3846f5 [ci] format 2024-02-07 13:37:44 +00:00
Arsh
e2fe51c828
feat(vercel): ISR (#9714)
* feat(vercel): isr

* bypass token

* exclusion of certain paths

* add test

* remove search params in dev mode

* Apply suggestions from code review

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>

* Apply suggestions from code review

* Apply suggestions from code review

* fix missing await

* escape src for regex

* cleanup

* revalidate -> expiration

* update type docs

* always exclude /_image

* add changeset

* Apply suggestions from code review

* always create serverless function for /_image

* Apply suggestions from code review

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

* Apply suggestions from code review

---------

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-02-07 19:06:37 +05:30
Markus Krogemann
88628a4f9e
Fix small typo in astro.ts (#10008) 2024-02-07 20:45:22 +08:00
Bjorn Lu
7596f0cd3b [ci] format 2024-02-07 12:44:35 +00:00
Bjorn Lu
436841e97e
Use eslint-plugin-regexp (#9993) 2024-02-07 20:43:19 +08:00
Ben Holmes
ce4283331f
Fix: support strict() on content collection schemas when slug is present (#10003)
* fix: use correct data object when parsing schema

* feat(test): add `strict()` to slug schema test

* chore: changeset

* docs: "Adds support for"

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

---------

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
2024-02-07 07:26:16 -05:00
Houston (Bot)
e4999083bf
[ci] release (#9973)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-06 16:28:12 +00:00
Emanuele Stoppa
18ac0940ea
fix(i18n): fix regression in current locale (#9998)
* fix(i18n): fix regression in current locale

* Update .changeset/shy-wolves-ring.md

* Update packages/astro/test/i18n-routing.test.js

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

* Update .changeset/six-fishes-beg.md

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

* fix test case

---------

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2024-02-06 16:13:15 +00:00
Happydev
c53a31321a
Revert "fix(compiler): Support dynamic slot names (#9605)" (#9999)
* Revert "fix(compiler): Support dynamic slot names (#9605)"

This reverts commit 8ce40a417c.

* chore: changeset

* Update .changeset/weak-pans-sit.md

* chore: bump compiler version

* fix failing test

We were expecting the source code to produce an error, but in
2.4.0 of the compiler, that generates valid code

---------

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
2024-02-06 16:44:02 +01:00
Matthew Phillips
56db6ae246 [ci] format 2024-02-06 14:57:32 +00:00
Matthew Phillips
81acac24a3
Fix HMR in MDX deps in Content Collections (#9956)
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
Co-authored-by: bluwy <bjornlu.dev@gmail.com>
2024-02-06 22:56:22 +08:00
Simon He
6e30bef652
chore: typo (#9988) 2024-02-06 17:28:15 +08:00
Bjorn Lu
44c72a4f6f
Fix flaky streaming test (#9985)
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2024-02-05 12:27:49 -06:00
Florian Lefebvre
1352f06838 [ci] format 2024-02-05 17:54:17 +00:00
Florian Lefebvre
3c0876cbed
feat(astro): improve astro:content types (#9906)
* feat: improve stro:content types

* fix: do not change tsconfig

* "astro/zod" -> "zod"

* `CollectionConfig` parameter extends `BaseSchema`

* fix: update import to zod

* feat: add fallbacks for every export

* Update .changeset/young-bulldogs-tickle.md

---------

Co-authored-by: lilnasy <69170106+lilnasy@users.noreply.github.com>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2024-02-05 11:53:18 -06:00
Alan Alickovic
5eb0597437
fix typo (#9964) 2024-02-05 21:02:50 +08:00
Florian Lefebvre
b3b9f280c5
fix(rss): use node assert instead of chai (#9980) 2024-02-05 10:13:54 +01:00
voxel!()
19df112cf7 [ci] format 2024-02-04 19:59:55 +00:00
voxel!()
4260ecf1ff
chore(@astrojs/rss): Migrate tests to node:test (#9939)
* Progressively add new tests (remove old later)

* Finalize tests

* Remove unused comments

* Assert that errors are not present and add jsdocs to util function

* Fix

* Remove mocha deps
2024-02-04 19:58:44 +00:00
Marco Campos
8b8f26fdf2
FIX: allow rss feeds to have an enclosure with length of 0 (#9967)
* fix: allow rss feeds to have an enclosure with length of 0

* chore: add changeset

* fix: typo on test

* fix: update changeset description

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

---------

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-02-04 20:42:26 +01:00
Houston (Bot)
57ab98f531
[ci] release (#9948)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-02 15:59:15 -05:00
Matthew Phillips
bc1742df94
Revert "Provide better ignores for Vercel's file tracer (#9885)" (#9955)
* Revert "Provide better ignores for Vercel's file tracer (#9885)"

This reverts commit 49e0c24d7f.

* Changeset
2024-02-02 15:43:30 -05:00
ktym4a
6c894af5ab
Fix: 404.html load correctly on preview (#9907)
* Move vite 404 middleware

* Add custom 404.html rendering test for preview routing

* add a changest

* add TODO comment
2024-02-02 22:28:08 +05:30
ktym4a
cd67dd0a4f
Add new test cases for non-UTF-8 and space file names (#9947) 2024-02-02 13:40:39 +00:00
Emanuele Stoppa
9f0d89fa7e
fix: don't log warning if i18nDomains isn't enabled (#9932)
* fix: don't log warning if  isn't enabled

* fix regression

---------

Co-authored-by: Arsh <69170106+lilnasy@users.noreply.github.com>
2024-02-02 13:40:00 +00:00
Atharva
a79db060b7
chore(@astrojs/underscore-redirects): use Node.js for testing (#9923)
* chore: migrate underscore-redirects tests to node

* fix: remove chai/mocha devDependencies

* Update packages/underscore-redirects/package.json

* update lockfile

---------

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-02-02 11:38:17 +00:00
Mohamed
8578159194 [ci] format 2024-02-02 11:18:39 +00:00
Mohamed
f4c2ba870e
chore(@astrojs/integrations/lit): use Node.js for testing (#9944) 2024-02-02 11:17:32 +00:00
voxel!()
587b373009 [ci] format 2024-02-02 11:16:26 +00:00
voxel!()
c1a3e80dfe
chore(telemetry): Migrate tests to node:test (#9886)
* Migrate Telemetry tests to node:test

* Remove fallback to chai

* Remove chai and mocha dependencies

* Fix trailing comma

* Fix pnpm-lock.yaml desync

* Add back old tests with progression

* Remove mocha tests again

* Remove trailing comma
2024-02-02 11:15:29 +00:00
Houston (Bot)
2ac371404d
[ci] release (#9926)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-01 17:15:45 -05:00
ktym4a
b176825b34
fix: route matching for encoded pathnames (#9934)
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2024-02-01 17:08:05 -05:00
Nate Moore
9d2fdb293d
Improve astro sync error handling (#9888)
* fix(#9711): improve `astro sync` error handling

* Update .changeset/healthy-jokes-deny.md

* update unit tests

---------

Co-authored-by: Arsh <69170106+lilnasy@users.noreply.github.com>
2024-02-01 16:59:14 -05:00
Arsh
756f9595e7 [ci] format 2024-02-01 21:49:11 +00:00
Arsh
1568afb78a
fix(middleware): load while retrieving ssr manifest for prerendering (#9938)
* fix(middleware): load while retrieving ssr manifest for prerendering

* add test

* add changeset
2024-02-01 16:46:42 -05:00
Fred K. Schott
055bd27d9d [ci] format 2024-02-01 21:26:08 +00:00
Fred K. Schott
5d08a69f83
fix semver check (#9937) 2024-02-01 16:25:11 -05:00
Arsh
4467441896
fix(NodeApp): fix responses with null bodies never completing (#9931)
* fix(NodeApp): fix responses with null bodies never completing

* add changeset

* add test

* chore(tests): restore correct assertions

* adjust incorrect test

* added Astro.redirect and Response.redirect test cases

* updated incorrect HTTP status

* adjust api-routes.test.js after cherry-pick

* bup markdoc test timeout

---------

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Friedemann Sommer <friedemannsommer@users.noreply.github.com>
2024-02-01 16:24:21 -05:00
Sarah Rainsberger
b956149b28
[docs] update typo in error message (#9929) 2024-02-01 12:39:30 -04:00
Chris Swithinbank
7e2c2c52f9
Fix indentation formatting in types JSDoc (#9927) 2024-02-01 16:51:29 +01:00
Kristian Binau
27ea080e24
fix: use publicDir & base for 'include your base in url' error message (#9841)
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
Co-authored-by: bluwy <bjornlu.dev@gmail.com>
2024-02-01 23:13:58 +08:00
Larry Ivan Villegas Costas
d52529e094
Add a name property for DetailsHTMLAttributes (#9918)
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-02-01 23:02:47 +08:00
Luiz Ferraz
54dbaebf50
fix(docs): Fix import in changelog example (#9924) 2024-02-01 13:58:32 +00:00
Emanuele Stoppa
8fb9624b08
fix(docs): add missing variant (#9922) 2024-02-01 11:29:37 +00:00
Emanuele Stoppa
b31a46673e
chore: fix alignment docs (#9920)
* chore: fix alignment docs

* apply Sarah suggestion
2024-02-01 10:29:07 +00:00
Houston (Bot)
2561c99598
[ci] release (#9904)
* [ci] release

* Update packages/astro/CHANGELOG.md

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

* Update packages/integrations/vercel/CHANGELOG.md

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

* Update packages/astro/CHANGELOG.md

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

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-02-01 10:04:19 +00:00
Arsh
d702d6ae50 [ci] format 2024-02-01 07:03:42 +00:00
Arsh
2f6d1faa6f
fix(NodeApp): end with "Internal server error" on mid-stream error (#9908)
* fix(NodeApp): end with "Internal server error" on mid-stream error

* add changeset

* add test

* Apply suggestions from code review

---------

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2024-02-01 07:02:40 +00:00
Nate Moore
aaedb848b1
Silently ignore adapters that don't export start() (#9911) 2024-01-31 13:51:56 -06:00
Matthew Phillips
520be8b113 [ci] format 2024-01-31 15:31:41 +00:00
Matthew Phillips
49e0c24d7f
Provide better ignores for Vercel's file tracer (#9885)
* Provide better ignores for Vercel's file tracer

* Improve the changeset
2024-01-31 10:30:35 -05:00
Fabian Kachlock
7be5f94dcf
fix: content types reference to config on windows (#9877)
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-01-31 23:28:23 +08:00
Atharva
38e40f1cc2
chore(@astrojs/vue): use Node.js for testing (#9901)
* chore: migrate vue tests to node

* chore: prune chai/mocha from package-lock
2024-01-31 14:58:44 +00:00
Matthew Phillips
694fd86739 [ci] format 2024-01-31 14:40:19 +00:00
Matthew Phillips
fad4f64aa1
Implements build.format: 'preserve' (#9764)
* Implements build.format: 'preserve'

* Restructure test

* Add a test for base

* Update .changeset/tame-flies-confess.md

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

* Add trailing slash + i18n testing

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

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

* Update .changeset/tame-flies-confess.md

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

* tiny punctuation/conjunction nit fixes

---------

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-01-31 14:39:20 +00:00
Oliver Speir
84c100dd33 [ci] format 2024-01-31 14:00:11 +00:00
Oliver Speir
d4b886141b
Allow images in content collections folder to be used without relative import prefix (#9755)
* adds the ./ prefix to the import statement for user

* remove accidental new line added

* add tests

* add changeset

* Update young-eyes-film.md

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

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-01-31 13:59:06 +00:00
Bjorn Lu
7d937c1589
Add CLI shortcuts (#9159)
* Add CLI shortcuts

* Update changeset

* Remove server urls shortcut

* feat: improve CLI shortcut formatting

* chore: remove unused import

* Cleanup

* Cleanup

---------

Co-authored-by: Nate Moore <nate@astro.build>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-01-31 13:57:34 +00:00
Erika
58f9e393a1
Add ComponentProps util (#9839)
* chore: changeset

* Update .changeset/cuddly-moons-hang.md

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>

---------

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2024-01-31 13:56:44 +00:00
Emanuele Stoppa
cddbec4619 [ci] format 2024-01-31 13:56:11 +00:00
Emanuele Stoppa
041fdd5c89
feat(i18n): domain support (#9143)
* i18n(domains): validation and updated logic (#9099)

* feat(i18n): domain with lookup table (#9112)

* chore: add changelog, fix types and enable experimental support in node/vercel

* rebase and update lock file

* chore: fix failing test

* Apply suggestions from code review

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by:  Matthew Phillips <matthew@skypack.dev>

* Update .changeset/tidy-carrots-jump.md

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

* wip

* chore: rebase, conflicts and tests

* update lock file

* chore: correct configuration

* chore: correct configuration

* fix: regressions

* chore: fix conflicts and add more tests

* chore: add more validation

* chore: more tests and add more restrictions

* fix changeset

* change and revert adapters

* add another restriction

* lock file update

* 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: Bjorn Lu <bjornlu.dev@gmail.com>

* wat

* fix syntax error

* fix config example

* Fix for #9673 (#9680)

* Fix for #9673

* 🦋 add changeset file

* Update breezy-plants-smoke.md

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

* ️ simplified normalizeConfigPath

---------

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

* Fix env var replacement for export const prerender (#9807)

* feat(alpinejs): allow customizing the Alpine instance (#9751)

* feat(alpinejs): allows customzing the Alpine instance

* chore: add e2e tests

* fix: rename script

* Update index.ts

* fix: lockfile

* [ci] format

* chore: use correct lock file

* chore: rebase

* fix regressions in tests

* fix regressions in tests

* fix build

* add description

* fix missing types

* chore: fix tests, again :D

* eslint

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

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>

* chore: address feedback

* chore: fix regressions

* chore: refactor naming

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

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

* chore: address feedback

* update lock file

* chore: infer routing from options, not strategy

* merge from main

* merge from main

* Experimental support in vercel adapter

* 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 .changeset/tidy-carrots-jump.md

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

* better changesets

* Updates both experimental.i18nDomains and i18ndomains for experimental strategy

* fix link syntax

* consistent tabs/spaces

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

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

* apply suggestion

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Lou Cyx <git@lou.cx>
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
Co-authored-by: Florian Lefebvre <ematipico@users.noreply.github.com>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2024-01-31 13:55:03 +00:00
Houston (Bot)
43391ac60d
[ci] release (#9879)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-31 10:40:01 +00:00
ktym4a
bfc145b778
chore(@astrojs/markdoc): use Node.js for testing (#9897) 2024-01-31 10:37:39 +00:00
Ming-jun Lu
8dc7b39a62
chore(@astrojs/sitemap): migrate tests to node:test (#9892)
* chore(@astrojs/sitemap): migrate tests to `node:test`

* chore(@astrojs/sitemap): remove `chai` and `mocha` from devDependencies
2024-01-31 09:47:33 +00:00
Emanuele Stoppa
1c4a263d8f
Revert "chore(@astrojs/integrations/sitemap): use Node.js for testing (#9891)" (#9900)
This reverts commit 82de54979e.
2024-01-31 09:47:21 +00:00
Alex Nguyen
11d5e52710
migrate MDX tests (#9894) 2024-01-31 08:37:34 +00:00
Mohamed
6dbafb8f5f [ci] format 2024-01-31 08:32:27 +00:00
Mohamed
82de54979e
chore(@astrojs/integrations/sitemap): use Node.js for testing (#9891) 2024-01-31 08:31:12 +00:00
voxel!()
4349254376
chore(@astrojs/integrations/react) Migrate tests to node:test for @astrojs/react (#9899)
* Migrate Telemetry tests to node:test

* Remove fallback to chai

* Remove chai and mocha dependencies

* Fix trailing comma

* Fix pnpm-lock.yaml desync

* Add back old tests with progression

* Convert tests to node:test

* Remove unused dependencies

* Remove artifact changes

* Revert more artifacts

* Fix more
2024-01-31 08:29:26 +00:00
Arsh
84e9935a91 [ci] format 2024-01-31 06:08:21 +00:00
Arsh
37369550ab
fix(dev): prevent comma-separating multiple Set-Cookie headers (#9884)
* fix(dev): prevent comma-separating multiple Set-Cookie headers

* add changeset

* add test
2024-01-31 06:07:25 +00:00
Nate Moore
a8383173da [ci] format 2024-01-30 23:17:37 +00:00
Nate Moore
13c3b712c7
Improves YAML error handling consistency (#9882)
* fix: improves yaml error handling consistency

* chore: add changeset
2024-01-30 17:16:31 -06:00
Arsh
70ae19d500 [ci] format 2024-01-30 17:17:06 +00:00
Arsh
a40a0ff588
fix(ssg): consider trailingSlash for url (#9878)
* fix(ssg): consider trailingSlash for url

* add changeset
2024-01-30 22:46:10 +05:30
Friedemann Sommer
e9027f194b
Fix endpoint response with immutable header (#9876)
* add test

* added runtime endpoint test for `new Response`

* added `try..catch` for reroute directive handling
Fixes #9871

* added changeset

* replaced `try..catch` with HTTP status code check
based on the suggestion of @lilnasy

* updated changeset description

* added more tests for the endpoint reroute header

* fixed grammar  in `renderEndpoint` comment

* updated endpoint tests to check for the reroute directive header in lower-case

* updated changeset description
2024-01-30 22:45:26 +05:30
Houston (Bot)
3a50cbf6ed
[ci] release (#9843)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-30 15:41:06 +00:00
Furkan Erdem
202d3fbaa9
chore(@astrojs/integrations/tailwind): use Node.js for testing (#9875)
* chore(@astrojs/integrations/tailwind): use Node.js for testing

* chore: update pnpm lock
2024-01-30 15:17:32 +00:00
Emanuele Stoppa
bcc504dae0
chore: add rule switch-exhaustiveness-check (#9867)
* chore: add rule `switch-exhaustiveness-check`

* apply feedback

* routing is always defined
2024-01-30 08:35:08 +00:00
ktym4a
44c957f893
Fix a bug that Japanese files were not displayed correctly. (#9866)
* Fix: Fix a bug that Japanese files were not displayed correctly.

* chore: generate change description

* Update .changeset/cool-colts-watch.md

* add test case for non-UTF-8 file name

---------

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
2024-01-29 16:42:44 +00:00
Arsh
a994d609b3 [ci] format 2024-01-29 15:44:12 +00:00
Arsh
0a06d87a1e
fix(i18n): use define to deliver config to virtual module (#9838)
* fix(i18n): use import.meta.env to deliver config to virtual module

* add changeset

* prevent destructing i18n config unless enabled

* use defined variable instead

* Update packages/astro/src/i18n/vite-plugin-i18n.ts

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

---------

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2024-01-29 21:13:14 +05:30
Emanuele Stoppa
00ba9f1947
fix(i18n): compute current locale from route instead of request (#9865)
* fix(i18n): compute current locale from route instead of request

* Update .changeset/large-kangaroos-camp.md

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

---------

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2024-01-29 14:47:40 +00:00
Chris Swithinbank
70fdf1a5c6
Expose ContentConfig type from astro:content (#9840)
* Expose `ContentConfig` type from `astro:content`

* Add changeset
2024-01-27 06:44:37 +00:00
Houston (Bot)
a407eb5ac2
[ci] release (#9837)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-26 17:33:19 -06:00
Erika
1885cea308
fix(toolbar): Fix loading third-party apps using absolute paths (#9834)
* fix(toolbar): Fix loading third-party apps using absolute paths

* chore: changeset

* fix: pass entrypoint correctly

* Update .changeset/real-lamps-design.md

---------

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2024-01-26 17:22:56 -06:00
Tugrul Ates
e4370e9e9d
fix(audit): mark widget roles as interactive (#9825)
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2024-01-26 16:41:23 -06:00
Emanuele Stoppa
a3df9d83ca
fix(core): don't noop shared modules (#9828)
* fix(core): don't noop shared modules

* address feedback

* add test

* changeset

* check astro pages

* address feedback

---------

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2024-01-26 17:17:32 +00:00
Houston (Bot)
8281ebddaa
[ci] release (#9802)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-26 13:30:42 +00:00
liruifengv
bd880e8437
fix: fix transition:name can be unicode (#9822)
* fix: fix `transition:name` can be unicode

* delete prefix -

* use for func

* add changeset

* Update .changeset/cold-bobcats-shave.md

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

* fix review issue

* fix review issue

* add comment

* add \ to regex

* fix some issue

* delete unused import

* remove a rule

* remove valid rule --

* Update transition.ts

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

* Update transition.ts

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

* Update transition.ts

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

* Update transition.ts

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

* Update transition.ts

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

* Update transition.ts

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

* Update transition.ts

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

* format

* use cssesc to escape name

* test: add e2e test

* add charset for layout

* use the raw value for e2e test

* use cssesc instead of toValidIdent

* uncomment

---------

Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2024-01-26 10:44:54 +01:00
Arsh
00e6adb033 [ci] format 2024-01-25 19:39:17 +00:00
Arsh
dc75180aa6
refactor: singular middleware (#9776)
* per-route middleware -> singular middleware

* add changeset

* emit middleware.mjs only when user middleware exists

* Apply suggestions from code review
2024-01-26 01:08:15 +05:30
Arsh
b2197a2bee [ci] format 2024-01-25 18:09:42 +00:00
Arsh
f3d22136e5
fix(dev): dont reroute endpoint responses (#9830)
* fix(dev): dont reroute endpoint responses

* factor out header name as a const

* add test case

* add changeset
2024-01-25 18:06:30 +00:00
Nate Moore
e5276f097b
Remove create-astro version cache (#9817)
* fix(create-astro): remove version cache

* fix(create-astro): select typescript first

* chore(create-astro): remove unused import
2024-01-25 11:56:16 -06:00
Emanuele Stoppa
d777adc5ca [ci] format 2024-01-25 16:18:40 +00:00
Emanuele Stoppa
fc21a3c306
chore(@astrojs/node): use Node.js for testing (#9758)
* chore(@astrojs/node): use Node.js for testing

* revert file

* address feedback

* feedback

* Run tests in a single process (#9823)

* Run tests in a single process

* Make test less flaky

* chore: remove module

---------

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2024-01-25 16:17:31 +00:00
Erika
d688954c5a
fix(errors): Add more information to some error messages (#9818)
* fix(errors): Add more information to some error messages

* chore: changeset

* Apply suggestions from code review

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

---------

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-01-25 10:45:53 -05:00
Marvin
6206fa91e5 [ci] format 2024-01-25 10:24:46 +00:00
Marvin
a12196d6b5
feat(node): add trailingSlash support (#9080)
* feat(node): add trailing slash support

* add changeset

* test(node): add base route test in trailing-slash.js

detected an infinite loop in base path when trailingSlash: never

* fix(node): avoid infinite redirect when trailingSlash: never

* address test failures after rebase pt.1

* address test failures after rebase pt.2

---------

Co-authored-by: lilnasy <69170106+lilnasy@users.noreply.github.com>
2024-01-25 10:23:27 +00:00
Jacob Lamb
53f1c95717
Fix: update doc links (#9804)
* Fix: update doc links

* More links

* Remove docs line
2024-01-25 10:18:06 +00:00
Florian Lefebvre
57ab578bc7 [ci] format 2024-01-24 22:25:03 +00:00
Florian Lefebvre
c820defe65
chore(alpinejs): add e2e test (#9812)
* fix(rss): rssSchema definition to allow calling standard zod object methods

* fix: condition

* chore(alpinejs): add e2e test

* Discard changes to .changeset/mighty-icons-try.md

---------

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2024-01-24 16:23:45 -06:00
Florian Lefebvre
54acb6aeb4 [ci] format 2024-01-24 22:21:53 +00:00
Florian Lefebvre
fecba30a1a
fix(create-astro): @astrojs/check and typescript addition (#9813)
* fix(create-astro): @astrojs/check and typescript addition

* Update packages/create-astro/src/actions/typescript.ts

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>

* Update packages/create-astro/src/messages.ts

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>

* fix: remove useless block

---------

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2024-01-24 16:20:47 -06:00
Sarah Rainsberger
edb5437058
[docs] reorder items for configuration reference page (#9815)
* docs-config-ref-order

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

Co-authored-by: Reuben Tier <64310361+TheOtterlord@users.noreply.github.com>

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

Co-authored-by: Reuben Tier <64310361+TheOtterlord@users.noreply.github.com>

---------

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: Reuben Tier <64310361+TheOtterlord@users.noreply.github.com>
2024-01-24 16:20:25 -06:00
Erika
2a44c8f932
feat: Add telemetry for toolbar apps (#9816)
* feat: server side event

* feat: send events to server

* fix: use proper event

* fix: remove unnecessary changes

* chore: changeset

* Update .changeset/spicy-tips-remember.md

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

* fix: use id

---------

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-01-24 15:13:51 -05:00
Arsh
3435b7f1e1
fix(vercel): make Astro.cookies work again (#9809)
* addCookieHeaders

* add changeset
2024-01-24 22:47:33 +05:30
Arsh
919bbe4a89 [ci] format 2024-01-24 15:42:42 +00:00
Arsh
267c5aa2c7
refactor: unsplit astro:i18n module (#9790)
* unsplit virtual module

* add changeset

* elaborate on Unreachable exception

* i18nNotEnabled error
2024-01-24 21:11:26 +05:30
Florian Lefebvre
60136f9c56 [ci] format 2024-01-24 14:44:08 +00:00
Florian Lefebvre
1153331cbb
feat(alpinejs): allow customizing the Alpine instance (#9751)
* feat(alpinejs): allows customzing the Alpine instance

* chore: add e2e tests

* fix: rename script

* Update index.ts

* fix: lockfile
2024-01-24 14:43:03 +00:00
Bjorn Lu
b3f313138b
Fix env var replacement for export const prerender (#9807) 2024-01-24 14:42:24 +00:00
Lou Cyx
5d7db1dbb0
Fix for #9673 (#9680)
* Fix for #9673

* 🦋 add changeset file

* Update breezy-plants-smoke.md

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

* ️ simplified normalizeConfigPath

---------

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-01-24 14:40:02 +00:00
William Killerud
457e8b6422
fix(rss): apply refinement at the point of parsing (#9797) 2024-01-24 13:37:06 +08:00
Houston (Bot)
eaf483fe73
[ci] release (#9785)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-23 19:27:10 -05:00
Luiz Ferraz
d7543d4e1b [ci] format 2024-01-24 00:24:13 +00:00
Luiz Ferraz
5b29550996
Fix regression on dynamic sibling trees and index inside rest parameter folders (#9786)
* fix: Fix regression on dynamic sibling trees and index inside rest parameter folders

* Add extra test scenarios

* Make `/[foo].astro` also win over `/[foo]/[...rest].astro`

* Make `/[foo].astro` also win over `/[foo]/[...rest].astro`

* Update tests

* Remove commented out code

* Update .changeset/six-shrimps-glow.md

* Fix sorting cycle

---------

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2024-01-23 19:23:10 -05:00
cin
659087be1a [ci] format 2024-01-23 23:47:45 +00:00
cin
e6945bcf23
Fix .html file escaping (#9606)
* fix: escape bug

* chore: add changeset

* fix: add test case

* fix: add test case

* fix: ut bug

* fix: ut bug

* Update .changeset/metal-garlics-exercise.md

* fix(html): properly handle escape sequences

* Update .changeset/metal-garlics-exercise.md

Co-authored-by: Happydev <81974850+MoustaphaDev@users.noreply.github.com>

* fix(html): properly handle attributes with escaped characters

* chore: improve tests

* chore: update lockfile

* chore: update changeset

* Update packages/astro/src/vite-plugin-html/transform/index.ts

---------

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Nate Moore <nate@astro.build>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: Happydev <81974850+MoustaphaDev@users.noreply.github.com>
2024-01-23 17:46:28 -06:00
Oliver Speir
f04b563039 [ci] format 2024-01-23 23:19:35 +00:00
Oliver Speir
df37366556
MDX remark image props (#9753)
* rearrange plugins and add props to Image component

* add tests and update lockfile

* add changeset

* re-rearrange plugin order, gfm/smartypants then user defined then image related then shiki/prism

* make more generic

* add more/better tests

* remove unused logger

---------

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
2024-01-23 18:18:09 -05:00
Steven Benner
2e58904cd4 [ci] format 2024-01-23 23:17:58 +00:00
Steven Benner
ccc05d5401
Fix build failure when image file name includes special characters (#9781)
The latest version of `vite-plugin-markdown` uses a regular
expression that includes the file path via string concatenation.
However the file path is not escaped for use in a regular
expressions. So if a markdown document includes a reference to an
image file name which includes certain special characters it will
cause the build to fail.

This patch escapes regex special characters in the file path string
being injected into the regular expression. While I found that not
all special characters will cause this problem, it seems safer to
simply escape all regex specials. I also added test to verify this.

Related to: Commit 165cfc154b

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
2024-01-23 18:16:56 -05:00
Tugrul Ates
e22cb8b10c
fix: accept the 'switch' aria role during a11y checks (#9792)
* fix: accept the 'switch' aria role during a11y checks

* add changeset

---------

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
2024-01-23 16:31:39 -05:00
Arsh
17f27e7ceb [ci] format 2024-01-23 14:04:53 +00:00
Arsh
075706f26d
refactor: remove endpoint handling infra (#9775)
* remove endpoint handling infra

* add changeset
2024-01-23 19:33:51 +05:30
Stefano
9aa7a5368c
fix: vite security issue (#9773) 2024-01-23 20:48:20 +08:00
Houston (Bot)
bfd30041cf
[ci] release (#9772)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-22 18:37:25 -05:00
Arsh
3a233c9ea2 [ci] format 2024-01-22 23:35:50 +00:00
Arsh
05adaaa2d2
fix(vercel): edge middleware (#9585)
* create vercel edge middleware

remove getVercelOutput

* handle node built-in modules

* edge function to node fetch

* adjust tests

* add test

* add changeset

* function paths as constants

* ensure node built-in modules are namespaced with `node:`

* x-astro-path as constant

* appease linter

* add comments for ASTRO_PATH_HEADER and ASTRO_LOCALS_HEADER

---------

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2024-01-23 05:04:48 +05:30
Matthew Phillips
a50926a6b6 [ci] format 2024-01-22 23:33:47 +00:00
Matthew Phillips
6c5f42d308
Change way args are passed to cli packages (#9774) 2024-01-22 18:32:50 -05:00
Erika
eed0e8757c
fix: handle error at load for apps (#9768)
* fix: handle error at load for apps

* Revert "fix: handle error at load for apps"

This reverts commit df9e98a8c4.

* fix: handle errors in load and init

* chore: changeset

* fix: build
2024-01-22 15:37:03 -05:00
Houston (Bot)
2b5f1d6be8
[ci] release (#9728)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-22 15:11:07 -05:00
Degreat
2f81cffa9d
normalize class property (#9723)
* normalize class property

* Add changeset

* properly type return value

* normalize styles, rename function

* properly describe change

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

---------

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-01-22 20:00:00 +00:00
Nate Moore
ad01642517 [ci] format 2024-01-22 19:38:14 +00:00
Nate Moore
80d87fb3ef
Add new top-level passthrough config option (#9767)
* feat: add db as top-level config value

* merge

* add passthrough db command

* refactor: remove extra changes

* docs: update type info

* chore: remove changeset
2024-01-22 13:37:16 -06:00
Emanuele Stoppa
1fba85681e
fix: add missing attribute to button (#9762)
* fix: add missing attribute to button

* feedback
2024-01-22 19:05:31 +00:00
Emanuele Stoppa
3ecb3ef643
fix(i18n): pass build.format when computing the redirect (#9739)
* fix(i18n): pass `build.format` when computing the direct

* Update .changeset/fifty-pots-greet.md

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

* update tests

* add more tests

---------

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-01-22 13:28:31 +00:00
Tak Tran
cfc02c7440 [ci] format 2024-01-22 12:09:16 +00:00
Tak Tran
73d7440200
Fix dot files not being copied over on non-root builds (#9740) (#9741)
* Fix dot files not being copied over on non-root builds (#9740)

When running `astro build` outside of where the astro files are, dotfiles are not copied over because the `includeDotfiles` parameter is not passed in.

* update changeset

* Update changeset description

---------

Co-authored-by: Arsh <69170106+lilnasy@users.noreply.github.com>
2024-01-22 12:07:59 +00:00
Florian Lefebvre
7356336d18
fix(rss): rssSchema definition to allow calling standard zod object methods (#9746)
* fix(rss): rssSchema definition to allow calling standard zod object methods

* fix: condition
2024-01-22 12:07:29 +00:00
Bjorn Lu
d0742bcfda [ci] format 2024-01-20 11:00:50 +00:00
Bjorn Lu
a505190933
Make @astrojs/markdown-remark browser-safe (#9738) 2024-01-20 18:59:40 +08:00
Bjorn Lu
53c69dcc82
Fix @astrojs/markdown-remark bundling for non-node runtimes (#9736) 2024-01-19 22:38:33 +08:00
Blede
8d2e5db096
fix getRelativeLocaleUrl when redirectToDefaultLocale is false (#9730)
* fix getRelativeLocaleUrl when redirectToDefaultLocale is false

* Added tests

* Fixed getLocaleRelativeUrlList
2024-01-19 14:02:23 +00:00
Bjorn Lu
ea6cbd06a2
Refactor style-only HMR cache and performance (#9712)
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2024-01-19 16:44:17 +08:00
Happydev
8ce40a417c
fix(compiler): Support dynamic slot names (#9605)
* chore: try new compiler version

* update mergeSlots function

* chore: update lock file

* add tests

* simplify `mergeSlots` code

* update compiler version

* update lock file

* fix failing test

We were expecting the source code to produce an error, but in
2.4.0 of the compiler, that generates valid code

* chore: changeset

* chore: update deps

---------

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: Nate Moore <nate@astro.build>
2024-01-18 13:56:49 -06:00
Martin Trapp
07f13e6650 [ci] format 2024-01-18 19:39:57 +00:00
Martin Trapp
9e01f9cc1e
makes the output of 'astro preferences list' more verbose (#9381)
* makes astro preference list more verbose

* adds changeset

* refactor: improve global flag language

* Update .changeset/selfish-donuts-approve.md

---------

Co-authored-by: Nate Moore <nate@astro.build>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2024-01-18 13:38:46 -06:00
Houston (Bot)
138ae524ec
[ci] release (#9727)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-18 12:04:07 -06:00
Luiz Ferraz
8bc3b66d4d [ci] format 2024-01-18 18:01:46 +00:00
Luiz Ferraz
a4b696def3
Fix regression in the routing priority of index routes (#9726)
* fix: Fix regression in the routing priority of index routes

* chore: Add changeset

* Update .changeset/smart-rules-train.md

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

---------

Co-authored-by: Matthew Phillips <matthew@matthewphillips.info>
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-01-18 12:58:39 -05:00
Bjorn Lu
259c30e7fc
Fix eslint warnings (#9721)
* Fix eslint warnings

* Revert endpoint changes to be safe
2024-01-18 15:54:28 +00:00
Houston (Bot)
2292d0b580
[ci] release (#9709)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-18 10:30:19 +00:00
Bjorn Lu
7e1db8b4ce
Avoid vite 5.1 warning (#9719) 2024-01-18 16:38:49 +08:00
Sarah Rainsberger
0fa8557de4 [ci] format 2024-01-17 15:57:42 +00:00
Sarah Rainsberger
3ff704c0b6
[docs] fix syntax error, avoid a Markdown table (#9713) 2024-01-17 11:56:36 -04:00
André Alves
b325fada56
@astrojs/sitemap: Fixes generated URLs when using a base with a SSR adapter (#9704)
* Fix base path formatting for ssr adapters

* Update .changeset/curly-seals-count.md

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

---------

Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-01-17 13:33:23 +00:00
Luiz Ferraz
96bfc4be76 [ci] format 2024-01-17 13:29:35 +00:00
Luiz Ferraz
fd17f4a40b
Implement priority overrides for injected routes and redirects (#9439)
* Implement priority overrides for injected routes and redirects

* Fix ordering for route specificity

* Don't mix rules on tests

* Detailed collision detection

* Add changeset

* Remove TODO

* Add comments to clarify default values

* Update terminology

* Revert unrelated changes

* WIP

* Refactor

* Fix typo and typing

* chore: default to legacy

* chore: use experimental flag instead of option

* fix: do not throw an error on collisions

* chore: fix regression

* chore: use `continue` instead of `return`

* chore: fix tests but one

* chore: Update test

* chore: Change remaining new error to warning

* chore: Test collision warnings

* docs: Update docs of new config

* docs: Improve changesets

* chore: rename experimental flag

* chore: update changeset and docs

* Sarah editing pass

* nit: Align Markdown table

* defined definitions!

Co-authored-by: Luiz Ferraz <luiz@lferraz.com>

* added logging info to docs for experimental flag

* Yan final boss review

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

* chore: Update flag name in tests

* chore: Update flag name in tests

---------

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Yan Thomas <61414485+Yan-Thomas@users.noreply.github.com>
2024-01-17 13:28:18 +00:00
Emanuele Stoppa
efadef206f [ci] format 2024-01-17 13:26:47 +00:00
Emanuele Stoppa
f1a6126806
feat(i18n): disable redirect to default language (#9638)
* feat(i18n): disable redirect

* feat(i18n): add option to disable redirect to default language

* chore: add schema validation

* docs

* changeset

* Update packages/astro/src/core/config/schema.ts

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

* chore: address feedback

* fix test

* Update .changeset/cyan-grapes-suffer.md

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

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

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

* Fix discord fetch code (#9663)

* Force re-execution of Partytown's head snippet on view transitions (#9666)

* Remove the header script before a view transition takes place to force a reload on the next page

* Add changeset

* Save another char

* [ci] format

* fix(assets): Implement all hooks in the passthrough image service (#9668)

* fix(assets): Implement all hooks in the passthrough image service

* chore: changeset

* refactor(toolbar): Rename every internal reference of overlay/plugins to toolbar/apps (#9647)

* refactor(toolbar): Rename every internal reference of overlay/plugins to toolbar/apps

* refactor: rename vite plugin

* fix: update import

* nit: add setting fallback

* Disable file watcher for internal one-off vite servers (#9665)

* Use node:test and node:assert/strict (#9649)

* [ci] format

* fix(i18n): emit an error when the index isn't found (#9678)

* fix(i18n): emit an error when the index isn't found

* changeset

* Update .changeset/proud-guests-bake.md

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

* rename

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

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

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>

* feat(i18n): add option to disable redirect to default language

* chore: rebase

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

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

* lock file update

---------

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com>
Co-authored-by: Martin Trapp <martrapp@users.noreply.github.com>
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
Co-authored-by: Bjorn Lu <bluwy@users.noreply.github.com>
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-01-17 13:25:44 +00:00
Oliver Speir
bc2edd4339 [ci] format 2024-01-17 13:14:53 +00:00
Oliver Speir
165cfc154b
Allow remark plugins to affect getImage call for .md files (#9566)
* pass hProperties to getImage for optimized imgs

* fix to allow multiple images to have hProps added

* update test to reflect new expected result

* add comment back in

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

* add srcset

* works on multiple images

* fix tests, fix images.ts type and remove console logs

* add warning back to images.ts again lol

* update changeset to be user oriented

* Update calm-socks-shake.md

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

* pass alt through getImage

* added fixture and test

* update lockfile

* fix lockfile again (had installed an extra package during testing and had sharp33 installed)

* update test to reflect passing alt through getImage

---------

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-01-17 13:13:31 +00:00
Degreat
e9a72d9a91
Bump shikiji, use transformers API, expose transformers API (#9643)
* Bump shikiji, use transformers API, expose transformers API

* update astro config schema

* include shikiji-core

* Use default import

* address css-variables theme

* Remove shikiji markdoc

* Improve schema transformers handling

* Fix tests

* Update changeset

* bump shikiji version

* Update .changeset/six-scissors-worry.md

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

* Update wording

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

---------

Co-authored-by: bluwy <bjornlu.dev@gmail.com>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-01-17 13:13:05 +00:00
Ben Holmes
8521ff77fb
[Content collections] Remove "unsupported file type" warning (#9671)
* feat: remove "unsupported file type" warning for CC

* chore(test): remove unsupported file type unit

* chore: remove unused imports

* chore: changeset

* chore: changeset edits

* edit: add note on underscores to exclude content

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

* edit: front-load "removes the requirement"

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

---------

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-01-17 13:12:37 +00:00
Ross Robino
a5f1682347
feat: add experimental client prerender (#9644)
* feat: add experimental client prerender

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

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

* docs: add more details about effects of the feature

* add changeset

* add tests

* edit jsdoc and changeset with suggestions

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

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

* Update packages/astro/src/prefetch/index.ts

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

* Update .changeset/sixty-dogs-sneeze.md

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

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

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

* Update .changeset/sixty-dogs-sneeze.md

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

* Update .changeset/sixty-dogs-sneeze.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: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
2024-01-17 13:11:58 +00:00
Emanuele Stoppa
9680cf2780 [ci] format 2024-01-17 13:11:46 +00:00
Emanuele Stoppa
d6edc75408
Adapter enhancements (#9661)
* quality of life updates for `App` (#9579)

* feat(app): writeResponse for node-based adapters

* add changeset

* Apply suggestions from code review

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

* Apply suggestions from code review

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

* add examples for NodeApp static methods

* unexpose createOutgoingHttpHeaders from public api

* move headers test to core

* clientAddress test

* cookies test

* destructure renderOptions right at the start

---------

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

* Fallback node standalone to localhost (#9545)

* Fallback node standalone to localhost

* Update .changeset/tame-squids-film.md

* quality of life updates for the node adapter (#9582)

* descriptive names for files and functions

* update tests

* add changeset

* appease linter

* Apply suggestions from code review

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>

* `server-entrypoint.js` -> `server.js`

* prevent crash on stream error (from PR 9533)

* Apply suggestions from code review

Co-authored-by: Luiz Ferraz <luiz@lferraz.com>

* `127.0.0.1` -> `localhost`

* add changeset for fryuni's fix

* Apply suggestions from code review

* Apply suggestions from code review

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

---------

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: Luiz Ferraz <luiz@lferraz.com>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>

* chore(vercel): delete request response conversion logic (#9583)

* refactor

* add changeset

* bump peer dependencies

* unexpose symbols (#9683)

* Update .changeset/tame-squids-film.md

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

---------

Co-authored-by: Arsh <69170106+lilnasy@users.noreply.github.com>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: Luiz Ferraz <luiz@lferraz.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-01-17 13:10:43 +00:00
Oliver Speir
3a4d5ec800
Update a11y.ts (#9567)
* improve error message and allow for aria-label, aria-labelledby, img alt and svg title

* add checks for input

* Update packages/astro/src/runtime/client/dev-overlay/plugins/audit/a11y.ts

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

* Update .changeset/orange-trainers-learn.md

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

---------

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2024-01-17 13:10:08 +00:00
Bjorn Lu
1539e04a8e
Simplify HMR for circular imports and CSS (#9706) 2024-01-17 11:27:21 +08:00
Houston (Bot)
6c64b149f8
[ci] release (#9669)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-16 11:45:09 +00:00
Erika
39050c6e1f
fix: image proxy not working correctly (#9659)
* fix: image proxy not working correctly

* fix: only take in valid images

* test: add tests

* Create slimy-mayflies-vanish.md

* nit: remove erika-ism
2024-01-15 12:17:41 -05:00
Bjorn Lu
1bf0ddd277
Add fallback compile for astro script and style load (#9664) 2024-01-15 23:26:42 +08:00
An Li
d38b2a4fe8
fix(ViewTransition): Disables View Transition form handling when the action property points to an external URL.(#9674) (#9693) 2024-01-15 08:28:40 +01:00
Arsh
c7dbb9d5c0 [ci] format 2024-01-12 20:35:23 +00:00
Arsh
35d54b3ddb
fix(transitions router): attempt to find the clicked element within an open shadow root (#9685)
* implementation

* add test

* add changeset
2024-01-13 02:04:25 +05:30
Emanuele Stoppa
091097e60e
fix(i18n): emit an error when the index isn't found (#9678)
* fix(i18n): emit an error when the index isn't found

* changeset

* Update .changeset/proud-guests-bake.md

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

* rename

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

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

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
2024-01-12 14:14:26 +00:00
Bjorn Lu
810f7b23c8 [ci] format 2024-01-12 07:54:11 +00:00
Bjorn Lu
71db79e62a
Use node:test and node:assert/strict (#9649) 2024-01-12 15:53:00 +08:00
Bjorn Lu
d02a3c48a3
Disable file watcher for internal one-off vite servers (#9665) 2024-01-12 11:19:08 +08:00
Erika
37e1018b0d
refactor(toolbar): Rename every internal reference of overlay/plugins to toolbar/apps (#9647)
* refactor(toolbar): Rename every internal reference of overlay/plugins to toolbar/apps

* refactor: rename vite plugin

* fix: update import

* nit: add setting fallback
2024-01-11 14:03:45 -05:00
Erika
74008cc238
fix(assets): Implement all hooks in the passthrough image service (#9668)
* fix(assets): Implement all hooks in the passthrough image service

* chore: changeset
2024-01-11 13:29:59 -05:00