Commit graph

1133 commits

Author SHA1 Message Date
Tony Sullivan
1c1b9da624
Updates SSR routing to always give priority to public assets (#4000)
* matchRoute should ignore requests for public assets

* chore: add changeset
2022-07-20 20:54:46 +00:00
Matthew Phillips
bccd88f0eb
Move the Markdown component to its own package (#3986)
* Move the Markdown component to its own package

* Update the examples

* Updated lockfile

* Use is:raw

* Add a main field

* Update the formatting of the readme

* Rename to @astrojs/markdown-component
2022-07-20 16:45:05 -04:00
Matthew Phillips
ccae431426
Removes warnings / flags for integrations and ssr (#3992) 2022-07-20 15:52:10 -04:00
Nate Moore
4dd341c8a1
chore: add changeset (#3991)
Co-authored-by: Nate Moore <nate@astro.build>
2022-07-20 14:25:44 -05:00
Ben Holmes
19433eb4a4
[MDX] Support remark and rehype plugins, with defaults (#3977)
* feaet: allow remark and rehype plugin config

* deps: add remark-gfm, remark-smartypants

* feat: add gfm and smartypants by default

* test: add GFM and remark plugin tests

* feat: preserve default plugins with "extends"

* docs: add remarkPlugins

* docs: add rehypePlugins

* chore: changeset

* fix: remove skip from mdx tests

* chore: dup hyperlink flavor text

* chore: authGen -> autoGen

* nit: markdown -> Markdown

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

* nit: markdown -> Markdown 1

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

* nit: markdown -> Markdown 2

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

* nit: markdown -> Markdown 3

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

* nit: markdown -> Markdown 4

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

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-07-20 14:14:23 -04:00
Erika
9841c21e8e
Fix astro check file paths not handling URL paths correctly (#3988)
* Fix `astro check` file paths not handling URLs path correctly

* Add changeset
2022-07-20 11:16:22 -04:00
Ben Holmes
61fec63044
[MDX] Include url in glob result (#3981)
* deps: add es-module-lexer

* feat: inject url export on mdx files

* fix: apply url transform in prod

* test: page urls with overrides

* fix: revert test skips

* chore: changeset

* fix: add newline before export
2022-07-20 10:56:32 -04:00
Tony Sullivan
eaf187f2c4
Fixing TypeScript type definitions for image components (#3980)
* moving back to importing from components directory

* exporting components with a .ts file instead of .js

* chore: changeset
2022-07-20 00:33:11 +00:00
Matthew Phillips
5a23483efb
Adds support for Astro.clientAddress (#3973)
* Adds support for Astro.clientAddress

* Pass through mode and adapterName in SSG

* Pass through the mode provided

* Provide an adapter specific error message when possible
2022-07-19 16:10:15 -04:00
Tony Sullivan
d73c04a9e5
<Picture> component should pass all unknown attributes to the <img> element (#3961)
* <Picture /> should pass all unrecognized props down to the <img> element

* chore: add changeset

* Adding test coverage for custom <img> attributes

* chore: adding a README note for passing attributes to the picture's img

* Revert "<Picture /> should pass all unrecognized props down to the <img> element"

This reverts commit ce3e33930f.

* Picture should pass alt text to the img
2022-07-19 19:21:58 +00:00
Astroalex
b37d7078a0
minor: updating the README for @astrojs/sitemap@0.2.0 changes (#3978)
* fix: updating the README for `v0.2.0` changes

* Create chilled-cherries-decide.md

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-07-19 14:02:30 -05:00
Ben Holmes
95eaa207d8
Feat: log warning on astro.config change, restart server on astro.config added (#3968)
* feat: log on config change, restart on config add

* chore: changeset

* chore: remove unused export
2022-07-19 13:48:07 -04:00
Mihkel Eidast
e82ff13f18
fix: add export keyword to file stub (#3944) 2022-07-19 10:55:59 -05:00
Erika
54865612ea
Add missing media attribute on MetaHTMLAttributes (#3974)
* Add missing media attribute on MetaHTMLAttributes

* Fixed media not being optional, oops

* Add changeset
2022-07-19 11:41:29 -04:00
Tony Sullivan
e6e2160614
Adds back create-astro support for GitHub repos (#3971)
* adding create-astro support for GitHub repos

* chore: add changeset

* nit: adding a comment to document what the fix is doing
2022-07-19 14:24:19 +00:00
Rafid Muhymin Wafi
ba11b33996 Removes trailing dash from generated slugs in markdown (#3044)
* fixed header slugs in markdown if ends with a dash

* added changeset

* removes trailing dash only if slug was created

* updated test

* updated change level from patch to minor
2022-07-18 22:21:56 -07:00
Matthew Phillips
04070c0c12
Migrate to Vite 3 ️ (#3570)
* Vite 3 test

* deps: bump to Vite beta.1

* refactor: move to use optimizeDeps.force option

* refactor: stub out new updateModuleInfo params

* nit: remove comment on deprecated Vite feature

* nit: remove comment on deprecated vite feature

* hail mary: destroy all ssr external / noexternal!

* fix: use new middlewareMode config settings

* fix: resolve npm package paths for rollup input

* wip: revert to unresolved. Issue reported!

* sad refactor: use legacy devDepsScanner for component HMR

* fix: add astro/components to noExternal for Code component

* refactor: use ALWAYS_NOEXTERNAL array

* refactor: add package.json to all test runners for noExternal error

* deps: bump to latest vite 3 beta

* wip: add package.json to smoke

* fix: remove accidental "force true" on create-vite

* refactor: write smoke package.json programmatically

* refactor: add fontsource to noExternal

* fix: only add to ssr.noExternal if present in project

* wip: what if we just... didn't have a memory test

* deps: bump to latest vite beta

* Revert "wip: what if we just... didn't have a memory test"

This reverts commit 173729dbdc685e52881fc3333487b8f744add55f.

* fix: add type check for plugin.name

* feat: remove legacy.devDepsScanner. Vite 3 strat is now Vite 2.x strat!

* fix: add ssr.noExternal to components ex

* wip: ignore with-mdx starter

* fix: add serviceEntryPoint to ssr.noExternal

* temp: reset NODE_ENV on prod builds

* fix: missing async tag

* VITE 3 IS STABLE BABY

* deps: bump svelte to vite 3

* deps: bump vue to vite 3

* fix: resolve plugins for proper sorting

* sad fix: regex "export default" out of CSS ssr

* chore: add TODO to understand sad fix

* Revert "fix: resolve plugins for proper sorting"

This reverts commit e67c194d3a8e11070487ed325947e7c59e8d69cd.

* Revert "sad fix: regex "export default" out of CSS ssr"

This reverts commit 721d40b62b61440dc9e488787901c915579659db.

* fix: sort plugins WITHOUT resolveConfig

* Revert "wip: ignore with-mdx starter"

This reverts commit 7d4f7338e6.

* chore: revert memory test changes

* chore: add nanostores/preact ot noexternal

* chore: changeset

* chore: changeset

* deps: use Vite ^3.0.0

* fix: add back third party astro pkg scanner

Co-authored-by: bholmesdev <hey@bholmes.dev>
2022-07-18 22:19:23 -07:00
Fred K. Bot
37534004f0
[ci] release (#3939)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-18 21:54:25 -07:00
Tony Sullivan
299b4afcab
Feat/image url hash (#3965)
* Including a hash of the full remote URL when building for SSG

* chore: add changeset
2022-07-18 21:48:22 -07:00
Charles Vandevoorde
5d0edfc3b9
add missing props in markdown layout (#3588)
The `url` props was missing but should there according to [this
document](https://docs.astro.build/en/guides/markdown-content/#markdown-layouts).

The `file` props was not initially there but is quite useful when you
need to resolve file which are relative to the markdown file itself.
2022-07-18 19:58:36 -03:00
Vlad Esafev
57e529e4c1
Throw the error when site option is missing (#3956)
* Throw the error when site option is missing

* Update index.ts

* Update index.ts

* Update rss.test.js

* Update index.ts

Co-authored-by: Fred K. Schott <fkschott@gmail.com>
2022-07-18 15:01:04 -07:00
Fred K. Schott
f5c9d8e829 Revert "Removes trailing dash from generated slugs in markdown (#3044)"
This reverts commit 8530cce14f.
2022-07-18 14:32:51 -07:00
Fred K. Schott
4555c8cb0b Revert "Revert "Removes trailing dash from generated slugs in markdown (#3044)""
This reverts commit 7160bbeede.
2022-07-18 14:32:29 -07:00
Fred K. Schott
7160bbeede Revert "Removes trailing dash from generated slugs in markdown (#3044)"
This reverts commit 8530cce14f.
2022-07-18 14:08:51 -07:00
Matthew Phillips
ceda294e13
Fixes hydration of Maps and Sets (#3960) 2022-07-18 16:43:09 -04:00
Matthew Phillips
5fde2fd8bc
Moves Debug component's styles to be inlined (#3963) 2022-07-18 16:42:57 -04:00
Tony Sullivan
2a7dd040e8
Improving support for third-party hosted image services (#3957)
* WIP: always use the built-in sharp service for local images in `dev`

* adding type definitions for the integration's use of globalThis

* simplifying the globalThis type checking

* chore: adding changeset

* removing temp hosted service used for testing
2022-07-18 19:43:40 +00:00
Erika
b37695c34c
Improve astro check (#3906)
* Improve astro check

* Fix lockfile

* Update to latest language-server version

* Add simple tests

* Fix lock file, again

* Fix `astro check` not working on Windows, speeds up tests

* Add changeest
2022-07-18 15:34:35 -04:00
Fred K. Schott
07fb544dab
remove ssr-utils file (#3924) 2022-07-18 12:12:45 -04:00
Erika
8eba6d9d97
Fix expected types for Element in our JSX definitions (#3958)
* Fix expected types for Element in our JSX definitions

* Add changeset
2022-07-18 11:45:50 -04:00
Matthew Phillips
3acb9ec264
Hoist Astro.globbed hoisted scripts in dev (#3930)
* Hoist Astro.globbed hoisted scripts in dev

* Adds a changeset

* Increase the timeout for the HMR test

* Fix e2e tests

* Refactor test
2022-07-18 11:33:13 -04:00
Matthew Phillips
92b48b1525
Sets import.meta.env.BASE_URL correctly in dev (#3955) 2022-07-18 11:32:56 -04:00
Rafid Muhymin Wafi
8530cce14f
Removes trailing dash from generated slugs in markdown (#3044)
* fixed header slugs in markdown if ends with a dash

* added changeset

* removes trailing dash only if slug was created

* updated test

* updated change level from patch to minor
2022-07-16 15:45:41 +06:00
Nate Moore
f5d4ebf0e2
Handle metadata for MDX files during build (#3915)
* fix: metadata handling for MDX files

* chore: add changeset

* chore: update mdx example

* fix: protect against infinite loops in jsx-runtime, properly hook console.error

* chore: remove unused import

* feat(mdx): support `client:only`

* fix: prefer Symbol.for

* fix(jsx): handle vnode check properly

* chore: appease ts

Co-authored-by: Nate Moore <nate@astro.build>
2022-07-15 11:25:29 -04:00
Chris Swithinbank
31f9c0bf02
Roll back supported Node engines (#3937)
Fixes #3936
2022-07-15 08:15:04 -04:00
Fred K. Bot
f7fa39e682
[ci] release (#3925)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-14 15:36:23 -04:00
Matthew Phillips
d6dfef0caa
Add @babel/core dependencies to react/preact integrations (#3928)
* Add @babel/core dependencies

* Adds a changeset
2022-07-14 14:39:58 -04:00
Erika
7c5c4106d7
Use a .ts file to export built-in components so they're typed (#3927)
* Use a .ts file to export built-in components so they automatically have types

* Add changeset
2022-07-14 14:33:10 -04:00
Nate Moore
7094d6a45f
Handle false properly in class:list (#3922)
* fix(#3920): properly handle false in `class:list`

* fix: allow 0 in `class:list`

* fix: output empty `class:list` as `''` rather than `class=''`

Co-authored-by: Nate Moore <nate@astro.build>
2022-07-14 12:01:17 -05:00
Fred K. Bot
78e765dc65
[ci] release (#3921)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-14 11:36:33 -05:00
Nate Moore
6a7a17f735
chore: update compiler (#3918)
Co-authored-by: Nate Moore <nate@astro.build>
2022-07-14 11:09:44 -05:00
Fred K. Schott
01a55467d5
add back missing ssr-utils.ts file (#3919) 2022-07-14 09:05:20 -07:00
Fred K. Bot
056d4d5fd2
[ci] release (#3903)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-13 17:16:24 -04:00
Randall
b487679853
Rollback Nodejs Dependancy (#3914)
* Rollback Nodejs Dependancy

Closes #3908

Signed-off-by: Randall T. Vasquez <ran.dall@icloud.com>

* Create ninety-apes-talk.md
2022-07-13 17:06:37 -04:00
Matthew Phillips
cd2dbfedb1
Provide a better error message for when RSS is missing link field (#3913)
* Provide a better error message for when RSS is missing `link` field

* Adds a changeset
2022-07-13 16:37:17 -04:00
Juan Martín Seery
ca45c0c270
fix: don't throw when Shiki doesn't recognize a language (#3911)
* Don't throw when Shiki doesn't recognise a language

* Changeset
2022-07-13 19:31:59 +00:00
Ben Holmes
d8af02a944
fix: add github-slugger to ALWAYS_EXTERNAL (#3902)
* fix: add github-slugger to ALWAYS_EXTERNAL

* chore: changeset
2022-07-12 14:28:14 -04:00
Fred K. Bot
ba67a924ca
[ci] release (#3900)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-12 12:18:13 -04:00
Fred K. Bot
4bf4736768
[ci] release (#3899)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-12 11:16:15 -04:00
Chris Swithinbank
4097f06226
Centralise community health files in .github repo (#3830)
* Centralise community health files in `.github` repo

* Clean up links

* Add changeset
2022-07-12 17:16:08 +02:00