-
-
Notifications
You must be signed in to change notification settings - Fork 3k
feat!: remove emitESMImage() #14426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
feat!: remove emitESMImage() #14426
Changes from 23 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
81cb08a
wip
ascorbic 2a17d15
wip: remove legacy content collection support
ascorbic 7ee8636
Fix types
ascorbic 671b083
Update tests in integrations
ascorbic b106dfc
Format
ascorbic 30c93f7
Legacy type
ascorbic ecda51e
Fix default
ascorbic 6d012f0
Update examples
ascorbic 1b7cf78
Better errors for collections without loaders
ascorbic 8711643
Sooo many fixture updates
ascorbic 2371ef1
Test fixes
ascorbic 6e0f95f
Formatting and tests
ascorbic 16dc0c7
Fix vitest test
ascorbic 8f4d585
Merge branch 'next' into remove-legacy-cc
ascorbic 394265e
Update image data tests
ascorbic 98d460e
Update more tests
ascorbic e03d75b
More test fixes
ascorbic 6f8dcb1
Test fixes
ascorbic 56fcf3f
Changeset
ascorbic b7851e4
feat!remove emitESMImage()
florian-lefebvre 875e068
chore: changeset
florian-lefebvre 00ba1e0
Merge branch 'next' into feat/remove-emit-esm-image
florian-lefebvre f7e098b
chore: changeset
florian-lefebvre 30d61e2
Update busy-olives-chew.md
florian-lefebvre 454d97e
Merge branch 'next' into feat/remove-emit-esm-image
florian-lefebvre File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| --- | ||
| 'astro': major | ||
| --- | ||
|
|
||
| Removes the deprecated `emitESMImage()` function | ||
|
|
||
| In Astro 5.6.2, the `emitESMImage()` function was deprecated in favor of `emitImageMetadata()`, which removes two deprecated arguments that were not meant to be exposed for public use: `_watchMode` and `experimentalSvgEnabled`. | ||
|
|
||
| Astro 6.0 removes `emitESMImage()` entirely. Update to `emitImageMetadata()` to keep your current behavior. | ||
|
|
||
| #### What should I do? | ||
|
|
||
| Replace all occurrences of the `emitESMImage()` with `emitImageMetadata()` and remove unused arguments: | ||
|
|
||
| ```ts del={1,5} ins={2,6} | ||
| import { emitESMImage } from 'astro/assets/utils'; | ||
| import { emitImageMetadata } from 'astro/assets/utils'; | ||
|
|
||
| const imageId = '/images/photo.jpg'; | ||
| const result = await emitESMImage(imageId, false, false); | ||
| const result = await emitImageMetadata(imageId); | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.