Commit graph

1221 commits

Author SHA1 Message Date
Matthew Phillips
6120a71e54
Ensure file and url are always present in MDX for Astro.glob (#4076) 2022-07-28 10:58:44 -04:00
Fred K. Bot
6d103ddceb
[ci] release (#4056)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-28 08:17:45 -04:00
Alfredo González Martínez
c565465a96
Add properties (url, file) to MarkdownContent type (#4028)
'url' and 'file' properties were missing in MarkdownContent type,
but they should there according to:
https://docs.astro.build/en/guides/markdown-content/#markdown-layouts
2022-07-28 08:13:27 -04:00
Matthew Phillips
a198028b04
Fixes cloudflare throwing over process (#4072)
* Fixes cloudflare throwing over process

* Up the timeout for slower CI servers

* Fix linting

* Up the timeout a bit
2022-07-27 16:15:19 -04:00
Matthew Phillips
13b4f8ad88
Add fontsource packages to always be noExternal (#4073)
* Add fontsource packages to always be noExternal

* Adds a changesetp
2022-07-27 15:48:21 -04:00
Matthew Phillips
54b33d50fd
Add errors to cloudflare/vercel adapters when no output config (#4068) 2022-07-27 11:50:48 -04:00
Tony Sullivan
a397b981f5
Fixes type definitions @astrojs/image and adds more documentation to the README (#4045)
* WIP: moving to a static .d.ts types file

* fixing named exports for getImage and getPicture

* removing the exports.astro map for now

* WIP: adding readme docs for component attributes

* Adding docs for getImage and getPicture

* leaning fully on TSC to build .d.ts files

* finally found the solution for proper ESM import types

* adding a note to the README for tsconfig updates

* chore: add changesets

* typo

* docs: removing the "Images in Markdown" example

* removing the need for publishing src to NPM

* fix: make type re-export explicit

* updating image module defs to match InputFormat

* using astro syntax highlighting for README code blocks

* nit: missing backtick in README

* make sure Astro component directives aren't recommended twice
2022-07-27 15:39:05 +00:00
Matthew Phillips
40251118f8
Prevent Svelte HMR warning during the build (#4057) 2022-07-26 14:04:26 -04:00
Matthew Phillips
44694d8a90
Fixes binary data request bodies in the Node adapter (#4055)
* Fixes binary data request bodies in the Node adapter

* Fix type
2022-07-26 10:31:54 -04:00
Fred K. Bot
d790eabd98
[ci] release (#3972)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-26 09:58:38 -04:00
Matthew Phillips
453c026aa7
Move getStaticPaths call to happen during generation (#4047)
* Move getStaticPaths call to happen during generation

* Adds a changeset

* Update routing-priority.test.js

* revert test change, clarify test purpose

* Keep track of paths that have already been built

Co-authored-by: Fred K. Schott <fkschott@gmail.com>
2022-07-26 08:54:49 -04:00
Fred K. Schott
9ab66c4ba9
add support for injected page-ssr scripts (#4050) 2022-07-26 00:26:47 -04:00
Tony Sullivan
e60d6d9c1d
Removes fileURLToPath dependency from @astrojs/image SSR production endpoint (#4048)
* removing fileURLToPath dependency from SSR production endpoint

* chore: add changeset
2022-07-25 21:14:03 +00:00
Matthew Phillips
c811be49ab
Add warnings on markdown deprecations (#4046)
* Warn when using content.astro.headers

* Warn when using setup without the legacy flag enabled

* Adds a changeset
2022-07-25 15:14:53 -04:00
Matthew Phillips
7e5ac1f45c
Build the before-hydration script (#4042)
* Build the before-hydration script

* Adding a changeset
2022-07-25 12:14:41 -04:00
András Torma
6f88597c36
Added missing "loading" attribute for "IFrameHTMLAttributes" (#4044)
* Add missing "loading" attr to iFrame

* Add changeset

* re-ordering attributes
2022-07-25 11:11:08 -04:00
Matthew Phillips
6fd161d769
Add the output option (#4015)
* Start of work on astroConfig.mode === 'server'

* Add tests and more

* adapter -> deploy in some places

* Add fallback for `adapter` config

* Update more tests

* Update image tests

* Fix clientAddress test

* Updates based on PR review

* Add a changeset

* Update integrations tests + readme

* Oops

* Remove old option

* Rename `mode` to `output`

* Update Node adapter test

* Update test

* fred pass

* fred pass

* fred pass

* fix test

Co-authored-by: Fred K. Schott <fkschott@gmail.com>
2022-07-25 00:18:02 -04:00
Ari Gibson
beddf073b5
Fix: (patching old PR) Check node version and find acceptable host accordingly (#4032)
* fix: check node version and find acceptable host accordingly

* Update for Node v18.4+

* Removed unrelated changesets

* Revert "Removed unrelated changesets"

This reverts commit e77ffc0fed.

* chore: remove duplicate changeset

Co-authored-by: Nate Moore <nate@astro.build>
2022-07-23 18:27:35 -05:00
Nate Moore
6e27a5fdc2
Rename Markdown util getHeaders() to getHeadings() (#4031)
* Renamed getHeaders() to getHeadings(), according to RFC #208.

* chore: update changeset

* fix: expose MarkdownHeading type from `astro`

Co-authored-by: Félix Sanz <me@felixsanz.com>
Co-authored-by: Nate Moore <nate@astro.build>
2022-07-23 17:23:15 -05:00
Nate Moore
1215e731b8
Preserve authored CSS specificity (#4024)
* feat: preserve authored CSS specificity

* chore: update tests to use :where()

* test: fix HTML and CSS test

* test: fix imported markdown CSS test

Co-authored-by: Nate Moore <nate@astro.build>
2022-07-23 13:11:12 -05:00
Tony Sullivan
ef9345767b
WIP: [image] Fixing SSR support and improving error validation (#4013)
* fix: SSR builds were hitting an undefined error and skipping the step for copying original assets

* chore: update lockfile

* chore: adding better error validation to getImage and getPicture

* refactor: cleaning up index.ts

* refactor: moving SSG build generation logic out of the integration

* splitting build to ssg & ssr helpers, re-enabling SSR image build tests

* sharp should automatically rotate based on EXIF

* cleaning up how static images are tracked for SSG builds

* undo unrelated mod.d.ts change

* chore: add changeset
2022-07-22 23:01:56 +00:00
Ben Holmes
00fab4ce13
Feat: new legacy.astroFlavoredMarkdown flag (#4016)
* refactor: add legacy.jsxInMarkdown flag to config

* refactor: jsxInMarkdown -> astroFlavoredMarkdown

* refactor: remove `markdown.mode`

* feat: wire up legacy.astroFlavoredMarkdown

* test: add legacy to astro-markdown fixture

* test: remark autolinking

* test: remark components

* test: remark expressions

* test: remark strictness

* chore: remove "mode" from md component

* chore: remove "mode: md" from tests

* Fixing legacy MD tests, adding named slots tests for MDX pages

* chore: update lock file

* WIP: debugging named slots in MDX

* fix: handle named slots in MDX properly

* chore: re-enabling slots tests for MDX pages

* fixing test validation for svelte & vue

* removing unused Tailwind test

* legacy flag for Markdown component tests

* adding is:raw to Markdown component test

* adding is:raw to all Markdown component test fixtures

* can't use is:raw when nesting markdown components

* another nested test can't use is:raw

* one more <Markdown> test fix

* fixing another JSX markdown component test

* chore: add changeset

* e2e tests were missing the legacy flag

* removing the broken tailwind E2E markdown page

Co-authored-by: Tony Sullivan <tony.f.sullivan@outlook.com>
Co-authored-by: Nate Moore <nate@astro.build>
2022-07-22 22:45:16 +00:00
Okiki Ojo
0cc6ede362
SSR 404 and 500 routes in adapters (#4018)
* fix(WIP): SSR 404 and 500 routes

* Implement the feature

Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2022-07-22 16:30:17 -04:00
Matthew Phillips
4ca6a0933d
Fixes Node adapter receiving a request body (#4023)
* Fixes Node adapter receiving a request body

* Updated lockfile
2022-07-22 15:22:31 -04:00
Chris Swithinbank
9aecf7c7c7
Handle EXIF orientation flag (#4021)
* Handle EXIF orientation flag

* Create gentle-mails-mate.md
2022-07-22 19:14:00 +00:00
Nate Moore
27ee8b97ae
Overhaul HMR handling for .astro files (#3932)
* feat(hmr): overhaul HMR handling for `.astro` files

* test: remove irrelevant hmr-css test

* fix: ignore HMR logs for monorepo files

* fix: explicitly call import.meta.hot.decline()

* chore: add changeset

* fix: run smoke tests in serial

* chore: bump postcss test timeout

* test: fix undefined `this`

Co-authored-by: Nate Moore <nate@astro.build>
2022-07-22 13:37:20 -05:00
Nate Moore
7250e4e86d
Add .html support (#3867)
* feat: add html package

* feat: support assets in HTML

* feat(html): upgrade html integration

* feat(html): add `@astrojs/html` integration

* feat(html): add html support to astro core

* test(html): update html tests with package.json files

* chore: add changeset

* fix: remove import cycle

* chore: fix types

* refactor: remove @astrojs/html, add to core

* chore: update types for `*.html`

* fix: move *.html to astro/env

Co-authored-by: Nate Moore <nate@astro.build>
2022-07-22 10:32:36 -05:00
Nate Moore
fbef6a7f72
New handling for define:vars scripts and styles (#3976)
* feat: new handling for `define:vars` scripts and styles

* fix: handle new script hoisting pattern

* refactor: compiler handles sourcemaps

* chore: update to handle is:inline define:vars

* chore: bump compiler to latest

* chore: update define:vars tests

* fix: output of `define:vars` is not object style

* fix: appease ts

* chore: remove unused file

* chore: revert unecessary refactors

* chore: prefer sync `defineScriptVars`

* chore: add changeset

Co-authored-by: Nate Moore <nate@astro.build>
Co-authored-by: Okiki Ojo <okikio.dev@gmail.com>
2022-07-22 10:14:25 -05:00
Juan Martín Seery
1666fdb4c5
feat(vercel): remove requirement of ENABLE_VC_BUILD=1 (#4020)
* Remove requirement of `ENABLE_VC_BUILD=1`

* Changeset
2022-07-22 10:13:35 -05:00
Ben Holmes
399d7e2698
Fix: use set:html when markdown mode is md (#4008)
* refactor: add legacy.jsxInMarkdown flag to config

* fix: use `set:html` when `markdown.mode` is 'md'

* Revert "refactor: add legacy.jsxInMarkdown flag to config"

This reverts commit 5572e8d9b3.

* fix: move `remarkUnwrap, remarkEscape` to MDX only

* fix: only apply scary HTML passthroughs on MDX

* fix: move all JSX-specific rehype plugins under `isMDX`

* fix: "allowDangerousHtml" for md (required for Shiki)

* fix: apply `set:html` for non-layouts too

* test: JSX expressions, components, syntax highlighting

* chore: changeset

* fix: ignore "setup" and "components" in plain MD mode

* refactor: create new fixture to avoid weird caching error

* fix: dup package name

* chore: update lock

* fix: apply rehypeCollectHeaders to md
2022-07-21 18:01:26 -04:00
Ben Holmes
3b8a744524
[MDX] Add Prism and Shiki support (#4002)
* deps: add rehype-prism, shiki, rehype-pretty-code

* wip: apply rehype plugins depending on config

* wip: cherry-pick jsx-runtime fix?

* deps: rehype-pretty-code -> shiki-twoslash, add rehype-raw

* wip: add jsx-runtime fix

* feat: get shiki working!

* deps: add @astrojs/prism, prismjs, unist-util-visit

* feat: add prism support

* example: add small syntax highlight demo to with-mdx

* deps: remove rehype-prism

* chore: remove unused async

* chore: add .test.js to all mdx tests

* test: shiki, shikiConfig, prism

* fix: remove "is:raw" from prism output

* docs: add syntax highlighting section

* chore: add changeset

* nit: "Shiki config" -> Shiki config

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

* Revert "wip: add jsx-runtime fix"

This reverts commit 07f4528f44.

* docs: link to integration README from example

Co-authored-by: Nate Moore <nate@astro.build>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2022-07-21 16:43:58 -04:00
Fred K. Schott
ddefb172f6
Replace/Rename Astro.canonicalURL with new Astro.url helper (#3959)
* add Astro.url

* Add examples of how to create the canonicalURL

Co-authored-by: Matthew Phillips <matthew@skypack.dev>
2022-07-21 13:45:59 -04:00
Matthew Phillips
d503c5bf3d
Fixes using tsconfig to set aliases (#4010) 2022-07-21 13:45:20 -04:00
Allan Chain
21462feb4a
fix: better dev routing with base using middleware (#3942) 2022-07-21 12:37:26 -05:00
Sarah Rainsberger
ef9c4152b2
[READMEs] removed "experimental" from astro add instructions (#4004) 2022-07-21 14:33:59 -03:00
Matthew Phillips
01ba07d8fa
Make the Lit integration be compat with Vite 3.0.1 (#4009)
* Make the Lit integration be compat with Vite 3.0.1

* Changeset

* Pin Vite version

* Update lockfile
2022-07-21 12:25:57 -04:00
Ben Holmes
b2b367c969
[MDX] Support YAML frontmatter (#3995)
* chore: remove old comment

* deps: add remark-frontmatter

* deps: add remark-mdx-frontmatter

* fix: handle null or undefined frontmatter key

* feat: configure frontmatter plugins with defaults

* test: frontmatter and custom frontmatter name

* docs: add frontmatterOptions config

* docs: add "variables" and "frontmatter" docs

* chore: excessible -> accessible

* chore: changeset

* chore: remove bad mdx comment
2022-07-20 21:34:21 -04:00
Erika
40a45e3ef6
Properly support and type optional props in Svelte components (#3993)
* Properly support and type optional props in Svelte components

* Change output to support documentating components

* Add changeset
2022-07-20 17:32:46 -04:00
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
Corbin Crutchley
402c4181dc
Fix md mode comment (#3880)
* fix: fix a bug where md mode markdown breaks on comments

* chore: add changeset
2022-07-12 11:15:53 -04:00
Fred K. Bot
c2b14d5253
[ci] release (#3894)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-12 09:08:15 -04:00
Corbin Crutchley
b4cb4a40df
fix: add TypeScript type and documentation for markdown "mode" config (#3883)
* fix: add TypeScript type and documentation for markdown "mode" config

* chore: add changeset
2022-07-12 09:07:51 -04:00
Yuji Sugiura
c4f6fdf372
Remove unused(and also vulnerable) libs from @astro/telemetry (#3898)
* Remove unused(and also vulnerable) libs from @astro/telemetry

* Add changeset
2022-07-12 09:07:21 -04:00
Nate Moore
93e1020b1e
Fix: reintroduce smoke tests across example projects (#3669)
* chore: update smoke tests

* chore: bump smoke tests to node@16

* chore: remove gitmodules

* chore(ci): prefer node@14

* wip: remove path from smoke clone step

* feat: run build:examples from test:smoke

* fix: remove no-frozen-lockfile

* fix: checkout monorepo last for pnpm setup

* wip: replace @astrojs/markdown/remark import from md

* fix: remove type defs from generated file

* fix: function order

* chore: remove ssr-utils export

* wip: remove windows from smoke test

* fix: instantiate slugger in snippet

* fix: exclude with-mdx from smoke (for now)

* fix: add quotes on filter flag for safety

* chore: changeset

* wip: try reintroducing windows smoke

* sad chore: remove client: directive from with-mdx

* Revert "wip: try reintroducing windows smoke"

This reverts commit 9529b1a45c.

Co-authored-by: Nate Moore <nate@astro.build>
Co-authored-by: bholmesdev <hey@bholmes.dev>
2022-07-11 22:51:17 -04:00
Matthew Phillips
5f4ecbad1b
Allow defining Astro components in Vite plugins (#3889)
* Allow defining Astro components in Vite plugins

* Adds a changeset

* Move non-main compilation into load

* Use the cachedCompilation in the markdown plugin

* Fix HMR test

* Simplify getNormalizedID

* Use a windows-friendly virtual module id for the test
2022-07-11 16:13:21 -04:00
Chris Swithinbank
bf5d1cc1e7
More integration README fixes (#3885)
* Integration README fixes

* More tweaks (mostly code backticks for filenames)

* Update changeset

* Few more tweaks

* Make sure code blocks all have a code language

* Use URLs of new docs pages for package homepage

* One more stray `<br>` 👢

* Standardise to `sh` instead of `shell`
2022-07-11 21:10:34 +02:00
Fred K. Bot
1554a37622
[ci] release (#3887)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-11 13:38:42 -05:00
Nate Moore
7c49096e86
Update compiler (#3892)
* chore: update @astrojs/compiler

* chore: add changeset

* chore: update test

Co-authored-by: Nate Moore <nate@astro.build>
2022-07-11 13:34:29 -05:00
Matthew Phillips
9cf7e40641
Properly await on children before hydrating in Safari (#3891) 2022-07-11 14:10:23 -04:00
Nate Moore
1cc5b78905
fix(#3071): update supported node versions (#3871)
Co-authored-by: Nate Moore <nate@astro.build>
2022-07-11 11:32:53 -05:00
Tom Lienard
cb6a973839
fix: portfolio example JSX error (#3886)
* fix: portfolio example JSX error

* chore: add changeset

* chore: update description
2022-07-11 11:10:05 -05:00