Commit graph

54 commits

Author SHA1 Message Date
Sarah Rainsberger
9894b3dcde
remove details tags from integration READMEs (#4198) 2022-08-08 12:07:38 -05:00
Fred K. Bot
4e4061f485
[ci] release (#4159)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-08-05 21:48:35 -07:00
FredKSchott
4de35f3b70 [ci] format 2022-08-06 04:39:26 +00:00
Corbin Crutchley
97cf0cd893
fix: export all of @astrojs/image dist (#4146)
* fix: export all of @astrojs/image dist

* chore: add changeset

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-08-05 19:00:35 -05:00
Corbin Crutchley
c039ea93a1
Fix external astro image usage (#4147)
* fix: enable @astrojs/image to be used inside of non-vite contexts

* chore: add changeset

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-08-05 18:56:12 -05:00
Jack Merrill
4678a3f358
feat(image): Add GIF -> WEBP support (#4139) (#4140)
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-08-05 17:32:45 -05:00
tony-sull
14d27c1d6f [ci] format 2022-08-05 20:38:06 +00:00
Tony Sullivan
5811208182
Fixes local image resolution in SSR builds on Windows (#4173)
* fixing SSR local file resolution path on windows

* chore: add changeset

* nit: fixing typo in image README file

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-08-05 20:36:30 +00:00
Fred K. Bot
7300f094fd
[ci] release (#4133)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-08-03 23:14:04 -07:00
Fred K. Schott
65f2d3b4b1
fix windows package export (#4141)
* fix windows package export

* Create neat-badgers-bow.md
2022-08-03 23:11:37 -07:00
Erika
ac6ffdb310
Audit dependencies (#4096)
* Remove some unused dependencies

* Update lockfile

* Add util

* Remove util
2022-08-02 16:08:21 -04:00
Sarah Rainsberger
76ec35ff30
[docs content] Image README formatting (#4082)
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
2022-07-30 09:29:03 -03: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
tony-sull
57770bbae2 [ci] format 2022-07-27 15:41:22 +00: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
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
tony-sull
2a13e430b1 [ci] format 2022-07-25 21:16:11 +00: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
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
tony-sull
cb1db133ba [ci] format 2022-07-22 23:04:01 +00: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
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
Sarah Rainsberger
ef9c4152b2
[READMEs] removed "experimental" from astro add instructions (#4004) 2022-07-21 14:33:59 -03: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
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
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
FredKSchott
167ed5486a [ci] format 2022-07-19 04:50:06 +00: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
Juan Martín Seery
60e38f6eb4
ci: fix eslint issues (#3969) 2022-07-18 19:59:53 -03:00
tony-sull
f6d61e6e72 [ci] format 2022-07-18 19:45:31 +00: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
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
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
16fdc01322
[ci] release (#3877)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-09 19:03:22 +00:00
Tony Sullivan
f961412862
Updating the <Picture /> component to default to async image decoding (#3876)
* defaulting pictures to use decoding=async

* chore: add changeset
2022-07-09 18:44:31 +00:00
Fred K. Bot
1785e568a0
[ci] release (#3850)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-08 20:54:39 -04:00
tony-sull
d2f68345f9 [ci] format 2022-07-08 21:40:22 +00:00
Tony Sullivan
89d76753a0
Adds a new <Picture> component to the image integration (#3866)
* moving all normalization logic out of the Image component

* refactor: only require loaders to provide the image src

* Adding a `<Picture />` component

* fixing types.ts imports

* refactor: moving getImage to it's own file

* updating component types to use astroHTML.JSX

* Revert "updating component types to use astroHTML.JSX"

This reverts commit 6e5f578da8.

* going back to letting loaders add extra HTML attributes

* Always use lazy loading and async decoding

* Cleaning up the Picture component

* Adding test coverage for <Picture>

* updating the README

* using JSX types for the Image and Picture elements

* chore: adding changeset

* Update packages/integrations/image/src/get-image.ts

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

* allow users to override loading and async on the <img>

* renaming config to constants, exporting getPicture()

* found the right syntax to import astro-jsx

Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2022-07-08 21:37:55 +00:00
Ben Holmes
b012ee55b1
[astro add] Support adapters and third party packages (#3854)
* feat: support adapters and third part integrations by keywords

* refactor: add keywords to all official integrations

* docs: add adapter ex to astro add help

* nit: clarify astro add usage

* nit: highlight link

* fix: use process.exit(1) on error

* chore: changeset

* nit: bold integration name

* fix: log install instructions for adapters instead

* nit: change to logAdapterConfigInstructions

* Revert "fix: log install instructions for adapters instead"

This reverts commit 1a459f152b.

* feat: add hardcoded adapter export map

* refactor: inline adapter config log
2022-07-08 16:55:33 -04:00
tony-sull
9300af9bc2 [ci] format 2022-07-08 20:20:57 +00:00
Tony Sullivan
0aaef1c48b
fix: Always add @astrojs/image to vite.ssr.noExternal (#3869)
* fix: always add @astrojs/image to vite.ssr.noExternal

* chore: add changeset
2022-07-08 20:19:27 +00:00
Chris Swithinbank
1f9e4857ff
Integration README fixes (#3865)
* Remove stray XML tag in sitemap integration README

* Fix link errors

* Add changeset
2022-07-08 21:56:24 +02: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
matthewp
9f54fa3cd9 [ci] format 2022-07-07 17:51:24 +00:00
Matthew Phillips
502f063131
Allow importing Image component from @astrojs/image (#3848)
* Allow importing Image component from @astrojs/image

* Adds a changeset

* Export the Image type
2022-07-07 13:49:46 -04:00
Fred K. Bot
822befc59b
[ci] release (#3813)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-04 15:22:09 +00:00
Tony Sullivan
5ccccace0c
Updates how the new Image component is exported to support older versions of Astro (#3812)
* don't use typescript for the components named export file

* Adding a readme example for images in markdown

* chore: add changeset
2022-07-04 14:52:32 +00:00
Tony Sullivan
b9d26f39e2
manually correcting import ordering to unblock CI (#3798) 2022-07-01 20:24:45 +00:00
Fred K. Bot
5953a6ca0d
[ci] release (#3797)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-07-01 20:13:33 +00:00