-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Export astro/compiler-runtime and cleanup exports (#8085)
- Loading branch information
Showing
7 changed files
with
53 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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,25 @@ | ||
--- | ||
'astro': major | ||
--- | ||
|
||
Remove exports for `astro/internal/*` and `astro/runtime/server/*` in favour of `astro/runtime/*`. Add new `astro/compiler-runtime` export for compiler-specific runtime code. | ||
|
||
These are exports for Astro's internal API and should not affect your project, but if you do use these entrypoints, you can migrate like below: | ||
|
||
```diff | ||
- import 'astro/internal/index.js'; | ||
+ import 'astro/runtime/server/index.js'; | ||
|
||
- import 'astro/server/index.js'; | ||
+ import 'astro/runtime/server/index.js'; | ||
``` | ||
|
||
```diff | ||
import { transform } from '@astrojs/compiler'; | ||
|
||
const result = await transform(source, { | ||
- internalURL: 'astro/runtime/server/index.js', | ||
+ internalURL: 'astro/compiler-runtime', | ||
// ... | ||
}); | ||
``` |
This file contains 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 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 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 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,20 @@ | ||
// NOTE: Although this entrypoint is exported, it is internal API and may change at any time. | ||
|
||
export { | ||
Fragment, | ||
render, | ||
createAstro, | ||
createComponent, | ||
renderComponent, | ||
renderHead, | ||
maybeRenderHead, | ||
unescapeHTML, | ||
renderSlot, | ||
mergeSlots, | ||
addAttribute, | ||
renderTransition, | ||
createTransitionScope, | ||
spreadAttributes, | ||
defineStyleVars, | ||
defineScriptVars, | ||
} from '../server/index.js'; |
This file contains 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 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