Skip to content

Commit

Permalink
Merge branch 'main' into feat/vercel-adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
JuanM04 committed Mar 28, 2022
2 parents a878a5c + 6667c41 commit ef9e81a
Show file tree
Hide file tree
Showing 42 changed files with 210 additions and 62 deletions.
2 changes: 1 addition & 1 deletion examples/blog-multiple-authors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/preact": "^0.0.2",
"astro": "^0.25.2",
"astro": "^0.25.3",
"sass": "^1.49.9"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"preview": "astro preview"
},
"devDependencies": {
"astro": "^0.25.2",
"astro": "^0.25.3",
"@astrojs/preact": "^0.0.2"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/component/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
},
"devDependencies": {
"@example/my-component": "workspace:*",
"astro": "^0.25.2"
"astro": "^0.25.3"
}
}
2 changes: 1 addition & 1 deletion examples/component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"serve": "astro --project-root demo preview"
},
"devDependencies": {
"astro": "^0.25.2"
"astro": "^0.25.3"
}
}
2 changes: 1 addition & 1 deletion examples/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"devDependencies": {
"@astrojs/preact": "^0.0.2",
"@astrojs/react": "^0.0.2",
"astro": "^0.25.2"
"astro": "^0.25.3"
}
}
2 changes: 1 addition & 1 deletion examples/env-vars/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"preview": "astro preview"
},
"devDependencies": {
"astro": "^0.25.2"
"astro": "^0.25.3"
}
}
2 changes: 1 addition & 1 deletion examples/framework-alpine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"preview": "astro preview"
},
"devDependencies": {
"astro": "^0.25.2"
"astro": "^0.25.3"
}
}
2 changes: 1 addition & 1 deletion examples/framework-lit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/lit": "^0.0.2",
"astro": "^0.25.2"
"astro": "^0.25.3"
},
"dependencies": {
"@webcomponents/template-shadowroot": "^0.1.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-multiple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@astrojs/solid-js": "^0.0.3",
"@astrojs/svelte": "^0.0.2",
"@astrojs/vue": "^0.0.2",
"astro": "^0.25.2"
"astro": "^0.25.3"
},
"dependencies": {
"@webcomponents/template-shadowroot": "^0.1.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-preact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/preact": "^0.0.2",
"astro": "^0.25.2"
"astro": "^0.25.3"
},
"dependencies": {
"preact": "^10.6.6"
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/react": "^0.0.2",
"astro": "^0.25.2"
"astro": "^0.25.3"
},
"dependencies": {
"react": "^17.0.2",
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/solid-js": "^0.0.3",
"astro": "^0.25.2"
"astro": "^0.25.3"
},
"dependencies": {
"solid-js": "^1.3.13"
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/svelte": "^0.0.2",
"astro": "^0.25.2"
"astro": "^0.25.3"
},
"dependencies": {
"svelte": "^3.46.4"
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/vue": "^0.0.2",
"astro": "^0.25.2"
"astro": "^0.25.3"
},
"dependencies": {
"vue": "^3.2.31"
Expand Down
2 changes: 1 addition & 1 deletion examples/integrations-playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@astrojs/sitemap": "^0.0.2",
"@astrojs/tailwind": "^0.0.2",
"@astrojs/turbolinks": "^0.0.2",
"astro": "^0.25.2"
"astro": "^0.25.3"
},
"dependencies": {
"@webcomponents/template-shadowroot": "^0.1.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/minimal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"preview": "astro preview"
},
"devDependencies": {
"astro": "^0.25.2"
"astro": "^0.25.3"
}
}
2 changes: 1 addition & 1 deletion examples/non-html-pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"preview": "astro preview"
},
"devDependencies": {
"astro": "^0.25.2"
"astro": "^0.25.3"
}
}
2 changes: 1 addition & 1 deletion examples/portfolio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/preact": "^0.0.2",
"astro": "^0.25.2",
"astro": "^0.25.3",
"sass": "^1.49.9"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"devDependencies": {
"@astrojs/svelte": "^0.0.2",
"@astrojs/node": "^0.0.2",
"astro": "^0.25.2",
"astro": "^0.25.3",
"concurrently": "^7.0.0",
"lightcookie": "^1.0.25",
"unocss": "^0.15.6",
Expand Down
2 changes: 1 addition & 1 deletion examples/starter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"preview": "astro preview"
},
"devDependencies": {
"astro": "^0.25.2"
"astro": "^0.25.3"
}
}
2 changes: 1 addition & 1 deletion examples/subpath/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/react": "^0.0.2",
"astro": "^0.25.2",
"astro": "^0.25.3",
"sass": "^1.49.9"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/with-markdown-plugins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/markdown-remark": "^0.7.0",
"astro": "^0.25.2",
"astro": "^0.25.3",
"hast-util-select": "5.0.1",
"rehype-autolink-headings": "^6.1.1",
"rehype-slug": "^5.0.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-markdown-shiki/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
},
"devDependencies": {
"@astrojs/markdown-remark": "^0.7.0",
"astro": "^0.25.2"
"astro": "^0.25.3"
}
}
2 changes: 1 addition & 1 deletion examples/with-markdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@astrojs/react": "^0.0.2",
"@astrojs/svelte": "^0.0.2",
"@astrojs/vue": "^0.0.2",
"astro": "^0.25.2"
"astro": "^0.25.3"
},
"dependencies": {
"preact": "^10.6.6",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-nanostores/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
"@astrojs/solid-js": "^0.0.3",
"@astrojs/svelte": "^0.0.2",
"@astrojs/vue": "^0.0.2",
"astro": "^0.25.2"
"astro": "^0.25.3"
}
}
2 changes: 1 addition & 1 deletion examples/with-tailwindcss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/tailwind": "^0.0.2",
"astro": "^0.25.2",
"astro": "^0.25.3",
"autoprefixer": "^10.4.4",
"canvas-confetti": "^1.5.1",
"postcss": "^8.4.12",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-vite-plugin-pwa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"preview": "astro preview"
},
"devDependencies": {
"astro": "^0.25.2",
"astro": "^0.25.3",
"vite-plugin-pwa": "0.11.11",
"workbox-window": "^6.5.2"
}
Expand Down
6 changes: 6 additions & 0 deletions packages/astro/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# astro

## 0.25.3

### Patch Changes

- [#2918](https://github.com/withastro/astro/pull/2918) [`77354c89`](https://github.com/withastro/astro/commit/77354c89bd606beba71231cce6ce935905de68a7) Thanks [@matthewp](https://github.com/matthewp)! - Prevent CSS from being added to the wrong pages

## 0.25.2

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "astro",
"version": "0.25.2",
"version": "0.25.3",
"description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
"type": "module",
"author": "withastro",
Expand Down
4 changes: 4 additions & 0 deletions packages/astro/src/core/build/internal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ export function getPageDataByViteID(internals: BuildInternals, viteid: ViteID):
return undefined;
}

export function hasPageDataByViteID(internals: BuildInternals, viteid: ViteID): boolean {
return internals.pagesByViteID.has(viteid);
}

export function* eachPageData(internals: BuildInternals) {
yield* internals.pagesByComponent.values();
}
1 change: 1 addition & 0 deletions packages/astro/src/core/build/scan-based-build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export async function build(opts: ScanBasedBuildOptions): Promise<RollupOutput |
}),
rollupPluginAstroBuildCSS({
internals,
legacy: true,
}),
...(viteConfig.plugins || []),
],
Expand Down
3 changes: 2 additions & 1 deletion packages/astro/src/core/build/static-build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ async function ssrBuild(opts: StaticBuildOptions, internals: BuildInternals, inp
entryFileNames: opts.buildConfig.serverEntry,
chunkFileNames: 'chunks/chunk.[hash].mjs',
assetFileNames: 'assets/asset.[hash][extname]',
inlineDynamicImports: true,
},
},
// must match an esbuild target
Expand All @@ -147,6 +146,7 @@ async function ssrBuild(opts: StaticBuildOptions, internals: BuildInternals, inp
vitePluginPages(opts, internals),
rollupPluginAstroBuildCSS({
internals,
legacy: false,
}),
...(viteConfig.plugins || []),
// SSR needs to be last
Expand Down Expand Up @@ -200,6 +200,7 @@ async function clientBuild(opts: StaticBuildOptions, internals: BuildInternals,
vitePluginHoistedScripts(astroConfig, internals),
rollupPluginAstroBuildCSS({
internals,
legacy: false,
}),
...(viteConfig.plugins || []),
],
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/src/core/build/vite-plugin-pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { eachPageData } from './internal.js';
import { isBuildingToSSR } from '../util.js';

export const virtualModuleId = '@astrojs-pages-virtual-entry';
const resolvedVirtualModuleId = '\0' + virtualModuleId;
export const resolvedVirtualModuleId = '\0' + virtualModuleId;

export function vitePluginPages(opts: StaticBuildOptions, internals: BuildInternals): VitePlugin {
return {
Expand Down
Loading

0 comments on commit ef9e81a

Please sign in to comment.