* feat(webapi): Remove unnecessary polyfills now that we dropped support for Node 14
* feat(webapi): Removed more unnecessary polyfills for Node 16
* chore: changeset
* 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>
* 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`
* 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
* 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>
* 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
* feat: pass all slots to renderers
* refactor: pass `slots` as top-level props
* test: add named slot test for frameworks
* fix: nested hydration, slots that are not initially rendered
* test: add nested-recursive e2e test
* fix: render unmatched custom element children
* chore: update lockfile
* fix: unrendered slots for client:only
* fix(lit): ensure lit integration uses new slots API
* chore: add changeset
* chore: add changesets
* fix: lit slots
* feat: convert dash-case or snake_case slots to camelCase for JSX
* feat: remove tmpl special logic
* test: add slot components-in-markdown test
* refactor: prefer Object.entries.map() to for/of loop
Co-authored-by: Nate Moore <nate@astro.build>
* feat(integrations): support optional integrations
By making integration optional, Astro can now ignore null or undefined Integrations instead of giving an internal error most devs can't read/won't understand.
This also enables optional integrations,
e.g.
```ts
integration: [
// Only run `compress` integration in production environments, etc...
import.meta.env.production ? compress() : null
]
```
* ci: add tests for optional integration
* docs: add changelog
* refactor: make node-fetch external in rollup build
* deps: make node-fetch standard dep
* refactor: switch to node-fetch pkg ref in fetch.ts
* chore: changeset
* chore: bump webapi to minor change