Commit graph

93 commits

Author SHA1 Message Date
Erika
1e7d6af412
feat(all): Migrate to TypeScript 5.0 (#6579) 2023-03-20 17:02:07 +01:00
Tc001
67d3d1d65a
Replace tabs with double spaces (#6562) 2023-03-16 15:46:31 +02:00
Erika
9d48328287
docs(images): Add docs for image related errors (#6463)
* docs(images): Add docs for image related errors

* fix(images): Oops

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

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

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

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

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

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

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

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

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

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

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

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

---------

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2023-03-08 17:48:33 +01:00
Houston (Bot)
afaf366fb3
[ci] release (#6432)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-03-07 14:49:19 -05:00
Emanuele Stoppa
fe88f89512
chore: use directive @ts-expect-error instead of @ts-ignore (#6429) 2023-03-07 13:41:24 +00:00
Emanuele Stoppa
75921b3cd9
feat(cli): add --watch to astro check command (#6356)
* feat(cli): add `--watch` to `astro check` command

* chore: refactor in a leaner way, logic not changed

* chore: lint

* chore: revert changes in sync command

* chore: tweak server settings

* test: add one test case

* chore: increase timeout

* test: predictable testing

* chore: add changeset

* chore: code suggestions

* code suggestions

* chore: use directly `chokidar`

* chore: tweak code

* fix: open documents first

* chore: disable test

* chore: code suggestions

* chore: code suggestions

* Apply suggestions from code review

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

* code suggestions

* chore: rebase

---------

Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
2023-03-07 06:55:41 +00:00
Erika
afbbc4d5bf
Update compilation target for Node 16 (#6213)
* config(esbuild): Update esbuild target to node16

* config(package): Update root package.json node engine

* config(tsconfig): Update all the tsconfigs module and targets

* chore: changeset

* chore: remove unneeded file
2023-03-06 13:57:16 -05:00
Houston (Bot)
19fe4cb629
[ci] release (#6414)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-03-06 11:30:38 -05:00
Erika
0abd1d3e42
Use undici's FormData for polyfilling (#6413)
* fix(webapi): Use undici's FormData instead of a polyfill

* chore: changeset
2023-03-03 14:47:24 +01:00
Joaquín Sánchez
02a7266e3c
fix: don't mix Vite plugins when spawning temporary Vite server (#6368)
* fix: don't mix Vite plugins when spawning temporary Vite server

* chore: include command to `createVite` options

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

* chore: add test

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

* chore: add hint about filtering vite plugins and command

* chore: apply suggestion

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

---------

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: Ben Holmes <hey@bholmes.dev>
2023-02-27 15:26:11 -06:00
Houston (Bot)
71743aeca7
[ci] release (#6359)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-02-27 08:55:42 -05:00
Emanuele Stoppa
5aa6580f77
fix: bump undici to v5.20.0 (#6355)
* fix: bump `undici` to v5.20.0

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

* chore: add @astrojs/telemetry to changeset

---------

Co-authored-by: Princesseuh <princssdev@gmail.com>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-02-24 12:10:33 -06:00
Houston (Bot)
2e4ca0370a
[ci] release (#6279)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-02-17 13:44:15 -05:00
Matthew Phillips
bb18010137
Pin undici (#6282) 2023-02-17 11:46:10 -05:00
Erika
4595dd6600
fix(webapi): Attempt to polyfill with undici imports directly (#6065) 2023-02-06 16:16:34 +01:00
Houston (Bot)
73ca0ef383
[ci] release (#5948)
* [ci] release

* Update changelogs (#5955)

* [ci] release

* Wrap astro 2.0 beta logs in `<details>`

* Add link to docs upgrade guide

* First pass cleaning up 2.0 release notes

* mdx changes from Sarah

* combine 5584 and 5842 in deno, image, netlify

* markdown/remark incl (5684 & 5769) to match mdx

* Tweak markdown/remark formatting

* Format astro-prism

* Format astro-rss

* Format create-astro

* Format cloudflare

* Format lit

* Format partytown

* Format node

* Format preact

* Format react

* Format solid

* Format svelte

* Format tailwind

* Format vercel

* Format vue

* Format telemetry

* Format webapi

* Format scripts

* Reinstate h3s for headings

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

* Reformat mdx

* astro & markdown/remark: Combine #5679 & #5684 changelogs

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Ben Holmes <hey@bholmes.dev>

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Ben Holmes <hey@bholmes.dev>
2023-01-24 11:38:06 -05:00
Houston (Bot)
a75177f843
[ci] release (beta) (#5911)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-01-23 16:11:39 -05:00
heyhoe
46ecd5de34
Update magic-string used by @astrojs/image and @astrojs/webapi (#5930) 2023-01-22 17:11:19 +08:00
Erika
fffcd3ca86
chore(webapi): Remove unused file (#5916) 2023-01-20 15:52:48 +01:00
Fred K. Bot
02b797fd3c
[ci] release (beta) (#5792)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-01-12 11:40:35 -05:00
Erika
c55fbcb8ed
Remove more unnecessary polyfills from webapi for Node 16 (#5814)
* feat(webapi): Remove unnecessary polyfills now that we dropped support for Node 14

* feat(webapi): Removed more unnecessary polyfills for Node 16

* chore: changeset
2023-01-10 15:29:06 +01:00
matthewp
10137cd9cc [ci] format 2023-01-09 22:01:33 +00:00
Erika
1f92d64ea3
Drop Node 14 support (#5782)
* chore: Update engines field

* fix(deps): Remove node-fetch

* feat(polyfills): Remove node-fetch for undici

* feat(webapi): Remove node-fetch from the webapis polyfills for undici

* feat(core): Remove node-fetch for undici in Astro core

* feat(telemetry): Remove node-fetch for undici

* feat(node): Remove node-fetch for undici in node integration

* feat(vercel): Remove node-fetch for undici in Vercel integration

* chore: update lockfile

* chore: update lockfile

* chore: changeset

* fix(set): Fix set directives not streaming correctly on Node 16

* Try another approach

* Debugging

* Debug fetch

* Use global fetch if there is one

* changeset for lit

* Remove web-streams-polyfill

* Remove web-streams-polyfill license note

* Update .changeset/stupid-wolves-explain.md

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

Co-authored-by: Matthew Phillips <matthew@skypack.dev>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-01-09 16:59:20 -05:00
Anders Kaseorg
4d4883e816
webapi: Rename misspelled inheritence to inheritance (#5634) 2022-12-19 11:26:48 +08:00
Fred K. Schott
1b79ac7018
Add a thank you to the original author of the original webapi package (#5246) 2022-10-31 13:24:12 -04:00
Fred K. Bot
5016166acf
[ci] release (#5239)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-10-31 10:21:09 -04:00
Sebastiaan
b6a478f376
Fix/node custom elements (#5235)
* adapter-node fix CustomElementRegistry

* Add changeset

* Add fallback CustomElementRegistry
2022-10-28 12:34:30 -04:00
Bjorn Lu
a609a8937f
Upgrade Vite to 3.2 (#5212) 2022-10-28 22:03:07 +08:00
Fred K. Bot
077134ae2c
[ci] release (#4846)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-09-27 12:12:44 -04:00
matthewp
d2853ebe66 [ci] format 2022-09-22 18:50:12 +00:00
Zicklag
5e4c5252bd
Http proxy for fetch (#4676)
* Add HTTP Proxy Support to `fetch` Polyfill

Use `global-agent` to support HTTP_PROXY, HTTPS_PROXY, and NO_PROXY
environment variables.

* Add Changeset For HTTP Proxy Support in `fetch`
2022-09-22 14:47:06 -04:00
Yash
63758ae35f
docs: specify lang for a codeblock (#4314)
Co-authored-by: bluwy <bjornlu.dev@gmail.com>
2022-08-15 15:34:45 +08:00
Bjorn Lu
dcc2480d9d
Skip mod.d.ts in format:ci (#4235) 2022-08-10 22:05:07 +08:00
Nate Moore
9f067dca27
Astro 1.0.0 (#4214)
* chore: remove changesets patch

* chore: add changesets

* chore: version packages

* chore: normalize formatting

* chore: update lockfile

* chore: fix codeblocks

* Update packages/astro/CHANGELOG.md

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

* Update packages/astro/CHANGELOG.md

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

* Update packages/astro/CHANGELOG.md

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

* chore: fixup code samples

* chore: move v0.25 message out of note

Co-authored-by: Nate Moore <nate@astro.build>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
2022-08-09 11:10:25 -05:00
Princesseuh
3362ec2478 [ci] format 2022-08-04 18:19:18 +00:00
Erika
f591150512
Audit examples templates (#3940)
* basics, framework-alpine, framework-solid, delete unused examples

* framework-multiple

* Remove non-standard file extensions, add missing .vscode folders

* Remove robots.txt

* Remove blog-multiple-authors

* Rewrite components comments to be consistent

* Update lockfile

* Remove unnecessary usage of SCSS in subpath example

* Fix props weirdness in portfolio example

* Remove Lit from `framework-multiple` for now

* Misc fixes

* Update lockfile

* I'm in lockfile hell, send help
2022-08-04 14:16:51 -04:00
Princesseuh
27d29698ee [ci] format 2022-08-02 19:55:13 +00:00
Erika
64432bcb87
Refactor @astrojs/prism, fix Prism component import not working (#4114)
* Upgrade @astrojs/prism to a real package, fix component import not working

* Remove `@astrojs/prism` as a dependency of `astro`

* Update lock file

* Refactor to multiple files

* Oops, can't have astro imports run inside node

* Follow Nate's suggestion on being minors instead of patchs

* Update lockfile
2022-08-02 15:53:18 -04:00
FredKSchott
d2148ce982 [ci] format 2022-07-25 04:20:38 +00: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
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
Princesseuh
eee14b5e5f [ci] format 2022-07-18 19:36:57 +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
natemoo-re
0a156feca0 [ci] format 2022-07-07 21:08:44 +00:00
Joaquín Sánchez
c6ba6ec4d9
fix: lint failing on astro and some integrations (#3794)
* fix: lint failing on astro and some integrations

* chore: fix telemetry lint

* chore: fix turbo cache (thx nate)

* chore: fix runtime server
2022-07-07 16:06:44 -05:00
tony-sull
88dad63322 [ci] format 2022-07-01 20:06:01 +00:00
Tony Sullivan
e8593e7ead
Adds an @astrojs/image integration for optimizing images (#3694)
* initial commit

* WIP: starting to define interfaces for images and transformers

* WIP: basic sharp service to test out the API setup

* adding a few tests for sharp.toImageSrc

* Adding tests for sharp.parseImageSrc

* hooking up basic SSR support

* updating image services to return width/height

* simplifying config setup for v1

* hooking up basic SSR + SSG support (dev & build)

* refactor: a bit of code cleanup and commenting

* WIP: migrating local files to ESM + vite plugin

* WIP: starting to hook up user-provided loaderEntryPoints

* chore: update lock file

* chore: update merged lockfile

* refactor: code cleanup and type docs

* pulling over the README template for first-party integrations

* moving metadata out to the loader

* updating the test for the refactored import

* revert: remove unrelated webapi formatting

* revert: remove unrelated change

* fixing up the existing sharp tests

* fix: vite plugin wasn't dynamically loading the image service properly

* refactor: minor API renaming, removing last hard-coded use of sharp loader

* don't manipulate src for hosted image services

* Adding support for automatically calculating dimensions by aspect ratio, if needed

* a few bug fixes + renaming the aspect ratio search param to "ar"

* Adding ETag support, removing need for loaders to parse file metadata

* using the battle tested `etag` package

* Adding support for dynamically calculating partial sizes

* refactor: moving to the packages/integrations dir, Astro Labs TBD later

* refactor: renaming parse/serialize functions

* Adding tests for SSG image optimizations

* refactor: clean up outdated names related to ImageProps

* nit: reusing cached SSG filename

* chore: update pnpm lock file

* handling file URLs when resolving local image imports

* updating image file resolution to use file URLs

* increasing test timeout for image build tests

* fixing eslint error in sharp test

* adding slash for windows compat in src URLs

* chore: update lockfile after merge

* Adding README content

* adding a readme call to action for configuration options

* review: A few of the quick updates from the PR review

* hack: adds a one-off check to allow query params for the _image route

* Adds support for src={import("...")}, and named component exports

* adding SSR tests

* nit: adding a bit more comments

* limiting the query params in SSG dev to the images integration
2022-07-01 15:47:48 +00:00
Nate Moore
032ad1c047
MDX support (#3706)
* feat: first pass at MDX support

* fix: move built-in JSX renderer to come first

* chore: remove jsx example

* chore: update lockfile

* chore: cleanup example

* fix: missing deps

* refactor: move component render logic to `renderPage`

* chore: update HMR script

* chore: update MDX example

* refactor: prefer unshit

* refactor: remove TODO comment

* fix: remove duplicate identifier

* refactor: cleanup mdx entrypoint

* fix: better html handling

* fix: add tsconfig to mdx package

* chore: update lockfile

* fix: do not sort plugins unless mdx is enabled

* chore: update compiler

* fix(hmr): maybe render head for non-Astro pages

* fix: set initial pageExtensions

* refactor: cleanup addPageExtension

* refactor: remove addPageExtensions from types

* refactor: expose HookParameters type

* fix: only default to astro for MDX

* test: pick up jsx support in test fixtures

* refactor: simplify mdx entrypoint

* test: add basic MDX tests

* test(e2e): add mdx + framework tests

* chore: update lockfile

* test(e2e): fix preact mdx e2e test

* fix(mdx): disable .md support

* test(e2e): fix vue-component test missing mdx

* test(e2e): fix solid component needing import

* fix: allow `client:only="solid"` as an alias to `solid-js`

* chore: move to with-mdx example

* chore: update MDX readme

* chore: update example readme

* chore: bump astro version

* chore: update lockfile

* Update mod.d.ts

* feat: support `export const components` in MDX pages

* chore: update mdx example

* fix: update jsx-runtime with better slot support

* refactor: remove object style support

* chore: cleanup package exports

* chore: add todo comment

* refactor: improve isPage function, move to utils

* refactor: dry up manual HMR updates

* chore: add dev tests for MDX

* chore: prefer set to array

* chore: add changesets

* fix(hmr): flip public/private route

Co-authored-by: Nate Moore <nate@astro.build>
2022-06-30 13:09:09 -05:00
FredKSchott
a99a54d344 [ci] format 2022-06-29 21:56:28 +00:00
Fred K. Schott
dd176ca58d
add error event to telemetry (#3750) 2022-06-29 14:54:33 -07:00