File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ ' astro ' : major
3+ ---
4+
5+ 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.
6+
7+ 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:
8+
9+ ``` diff
10+ - import 'astro/internal/index.js';
11+ + import 'astro/runtime/server/index.js';
12+
13+ - import 'astro/server/index.js';
14+ + import 'astro/runtime/server/index.js';
15+ ```
16+
17+ ``` diff
18+ import { transform } from '@astrojs/compiler';
19+
20+ const result = await transform(source, {
21+ - internalURL: 'astro/runtime/server/index.js',
22+ + internalURL: 'astro/compiler-runtime',
23+ // ...
24+ });
25+ ```
Original file line number Diff line number Diff line change 4242 "./tsconfigs/*" : " ./tsconfigs/*.json" ,
4343 "./jsx/*" : " ./dist/jsx/*" ,
4444 "./jsx-runtime" : " ./dist/jsx-runtime/index.js" ,
45+ "./compiler-runtime" : " ./dist/runtime/compiler/index.js" ,
46+ "./runtime/*" : " ./dist/runtime/*" ,
4547 "./config" : {
4648 "types" : " ./config.d.ts" ,
4749 "default" : " ./config.mjs"
6062 "./content/runtime" : " ./dist/content/runtime.js" ,
6163 "./content/runtime-assets" : " ./dist/content/runtime-assets.js" ,
6264 "./debug" : " ./components/Debug.astro" ,
63- "./internal/*" : " ./dist/runtime/server/*" ,
6465 "./package.json" : " ./package.json" ,
65- "./runtime/*" : " ./dist/runtime/*" ,
66- "./server/*" : " ./dist/runtime/server/*" ,
6766 "./zod" : {
6867 "types" : " ./zod.d.ts" ,
6968 "default" : " ./zod.mjs"
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ export async function compile({
4141 filename,
4242 normalizedFilename : normalizeFilename ( filename , astroConfig . root ) ,
4343 sourcemap : 'both' ,
44- internalURL : 'astro/server/index.js ' ,
44+ internalURL : 'astro/compiler-runtime ' ,
4545 astroGlobalArgs : JSON . stringify ( astroConfig . site ) ,
4646 scopedStyleStrategy : astroConfig . scopedStyleStrategy ,
4747 resultScopedSlot : true ,
Original file line number Diff line number Diff line change @@ -4,5 +4,6 @@ Code that executes within isolated contexts:
44
55- ` client/ ` : executes within the browser. Astro’s client-side partial hydration code lives here, and only browser-compatible code can be used.
66- ` server/ ` : executes inside Vite SSR. Though also a Node context, this is isolated from code in ` core/ ` .
7+ - ` compiler/ ` : same as ` server/ ` , but only used by the Astro compiler ` internalURL ` option.
78
89[ See CONTRIBUTING.md] ( ../../../../CONTRIBUTING.md ) for a code overview.
Original file line number Diff line number Diff line change 1+ // NOTE: Although this entrypoint is exported, it is internal API and may change at any time.
2+
3+ export {
4+ Fragment ,
5+ render ,
6+ createAstro ,
7+ createComponent ,
8+ renderComponent ,
9+ renderHead ,
10+ maybeRenderHead ,
11+ unescapeHTML ,
12+ renderSlot ,
13+ mergeSlots ,
14+ addAttribute ,
15+ renderTransition ,
16+ createTransitionScope ,
17+ spreadAttributes ,
18+ defineStyleVars ,
19+ defineScriptVars ,
20+ } from '../server/index.js' ;
Original file line number Diff line number Diff line change 1+ // NOTE: Although this entrypoint is exported, it is internal API and may change at any time.
2+
13export { createComponent } from './astro-component.js' ;
24export { createAstro } from './astro-global.js' ;
35export { renderEndpoint } from './endpoint.js' ;
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ export default async function tagExportsWithRenderer({
1818 return {
1919 visitor : {
2020 Program : {
21- // Inject `import { __astro_tag_component__ } from 'astro/server/index.js'`
21+ // Inject `import { __astro_tag_component__ } from 'astro/runtime/ server/index.js'`
2222 enter ( path ) {
2323 path . node . body . splice (
2424 0 ,
@@ -30,7 +30,7 @@ export default async function tagExportsWithRenderer({
3030 t . identifier ( '__astro_tag_component__' )
3131 ) ,
3232 ] ,
33- t . stringLiteral ( 'astro/server/index.js' )
33+ t . stringLiteral ( 'astro/runtime/ server/index.js' )
3434 )
3535 ) ;
3636 } ,
You can’t perform that action at this time.
0 commit comments