From cf8015eaa2b756f4ec399e8fd7071dee7dfa9ab6 Mon Sep 17 00:00:00 2001 From: Nate Moore Date: Wed, 18 May 2022 10:45:09 -0500 Subject: [PATCH 01/14] fix: locale handling for logger (#3391) * fix(#3309): use system default locale * fix(#3309): use system default locale in create-astro * test: add locale regression tests * test: add i18n regression test --- .changeset/thirty-drinks-shout.md | 6 ++++++ packages/astro/src/core/logger/core.ts | 22 ++++++++++------------ packages/astro/test/cli.test.js | 18 ++++++++++++++++++ packages/create-astro/src/logger.ts | 23 +++++++++++------------ 4 files changed, 45 insertions(+), 24 deletions(-) create mode 100644 .changeset/thirty-drinks-shout.md diff --git a/.changeset/thirty-drinks-shout.md b/.changeset/thirty-drinks-shout.md new file mode 100644 index 000000000..815e14dc1 --- /dev/null +++ b/.changeset/thirty-drinks-shout.md @@ -0,0 +1,6 @@ +--- +'astro': patch +'create-astro': patch +--- + +Fix [#3309](https://github.com/withastro/astro/issues/3309) default logger locale behavior. diff --git a/packages/astro/src/core/logger/core.ts b/packages/astro/src/core/logger/core.ts index bfe5287f3..46045fd81 100644 --- a/packages/astro/src/core/logger/core.ts +++ b/packages/astro/src/core/logger/core.ts @@ -14,18 +14,16 @@ export interface LogOptions { level: LoggerLevel; } -function getLoggerLocale(): string { - const defaultLocale = 'en-US'; - if (process.env.LANG) { - const extractedLocale = process.env.LANG.split('.')[0].replace(/_/g, '-'); - // Check if language code is atleast two characters long (ie. en, es). - // NOTE: if "c" locale is encountered, the default locale will be returned. - if (extractedLocale.length < 2) return defaultLocale; - else return extractedLocale.substring(0, 5); - } else return defaultLocale; -} - -export const dateTimeFormat = new Intl.DateTimeFormat(getLoggerLocale(), { +// Hey, locales are pretty complicated! Be careful modifying this logic... +// If we throw at the top-level, international users can't use Astro. +// +// Using `[]` sets the default locale properly from the system! +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#parameters +// +// Here be the dragons we've slain: +// https://github.com/withastro/astro/issues/2625 +// https://github.com/withastro/astro/issues/3309 +export const dateTimeFormat = new Intl.DateTimeFormat([], { hour: '2-digit', minute: '2-digit', second: '2-digit', diff --git a/packages/astro/test/cli.test.js b/packages/astro/test/cli.test.js index 369c12103..480a530d0 100644 --- a/packages/astro/test/cli.test.js +++ b/packages/astro/test/cli.test.js @@ -110,3 +110,21 @@ describe('astro cli', () => { }); }); }); + +describe('astro cli i18n', () => { + const LOCALES = ['en_US', 'sv_SE', 'es_419.UTF-8', 'es_ES@euro', 'C']; + LOCALES.forEach((locale) => { + it(`astro does NOT throw on "${locale}" locales`, async () => { + const projectRootURL = new URL('./fixtures/astro-basic/', import.meta.url); + let error = null; + try { + const proc = cli('dev', '--root', fileURLToPath(projectRootURL), { env: { LANG: locale }}); + await parseCliDevStart(proc) + } catch (e) { + console.log(e); + error = e.message; + } + expect(error).to.be.null; + }); + }) +}) diff --git a/packages/create-astro/src/logger.ts b/packages/create-astro/src/logger.ts index 65f354632..96965e7ea 100644 --- a/packages/create-astro/src/logger.ts +++ b/packages/create-astro/src/logger.ts @@ -6,20 +6,19 @@ type ConsoleStream = Writable & { fd: 1 | 2; }; -function getLoggerLocale(): string { - const defaultLocale = 'en-US'; - if (process.env.LANG) { - const extractedLocale = process.env.LANG.split('.')[0].replace(/_/g, '-'); - // Check if language code is atleast two characters long (ie. en, es). - // NOTE: if "c" locale is encountered, the default locale will be returned. - if (extractedLocale.length < 2) return defaultLocale; - else return extractedLocale; - } else return defaultLocale; -} - -const dt = new Intl.DateTimeFormat(getLoggerLocale(), { +// Hey, locales are pretty complicated! Be careful modifying this logic... +// If we throw at the top-level, international users can't use Astro. +// +// Using `[]` sets the default locale properly from the system! +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#parameters +// +// Here be the dragons we've slain: +// https://github.com/withastro/astro/issues/2625 +// https://github.com/withastro/astro/issues/3309 +const dt = new Intl.DateTimeFormat([], { hour: '2-digit', minute: '2-digit', + second: '2-digit', }); export const defaultLogDestination = new Writable({ From 1bf12260afad57f83768d040fe3917fb214aaf5f Mon Sep 17 00:00:00 2001 From: Ben Holmes Date: Wed, 18 May 2022 11:45:23 -0400 Subject: [PATCH 02/14] Fix: update "building for SSR" messaging on SSG (#3399) * fix: update "building for SSR" messaging on SSG * chore: changeset --- .changeset/sour-years-scream.md | 5 +++++ packages/astro/src/core/build/static-build.ts | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .changeset/sour-years-scream.md diff --git a/.changeset/sour-years-scream.md b/.changeset/sour-years-scream.md new file mode 100644 index 000000000..d244f9752 --- /dev/null +++ b/.changeset/sour-years-scream.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Update "building for SSR..." log for SSG users to say "building entrypoints for prerendering..." diff --git a/packages/astro/src/core/build/static-build.ts b/packages/astro/src/core/build/static-build.ts index 1fac3c00d..2fa7f964c 100644 --- a/packages/astro/src/core/build/static-build.ts +++ b/packages/astro/src/core/build/static-build.ts @@ -101,7 +101,13 @@ export async function staticBuild(opts: StaticBuildOptions) { // Build your project (SSR application code, assets, client JS, etc.) timer.ssr = performance.now(); - info(opts.logging, 'build', 'Building for SSR...'); + info( + opts.logging, + 'build', + isBuildingToSSR(astroConfig) + ? 'Building SSR entrypoints...' + : 'Building entrypoints for prerendering...' + ); const ssrResult = (await ssrBuild(opts, internals, pageInput)) as RollupOutput; info(opts.logging, 'build', dim(`Completed in ${getTimeStat(timer.ssr, performance.now())}.`)); From 54aba7231d71c17b19048fa4d2d9e5d570cf33bd Mon Sep 17 00:00:00 2001 From: bholmesdev Date: Wed, 18 May 2022 15:46:22 +0000 Subject: [PATCH 03/14] [ci] format --- packages/astro/src/core/logger/core.ts | 4 ++-- packages/astro/test/cli.test.js | 8 ++++---- packages/astro/test/errors.test.js | 2 +- packages/create-astro/src/logger.ts | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/astro/src/core/logger/core.ts b/packages/astro/src/core/logger/core.ts index 46045fd81..5df39816a 100644 --- a/packages/astro/src/core/logger/core.ts +++ b/packages/astro/src/core/logger/core.ts @@ -16,10 +16,10 @@ export interface LogOptions { // Hey, locales are pretty complicated! Be careful modifying this logic... // If we throw at the top-level, international users can't use Astro. -// +// // Using `[]` sets the default locale properly from the system! // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#parameters -// +// // Here be the dragons we've slain: // https://github.com/withastro/astro/issues/2625 // https://github.com/withastro/astro/issues/3309 diff --git a/packages/astro/test/cli.test.js b/packages/astro/test/cli.test.js index 480a530d0..4134ee74d 100644 --- a/packages/astro/test/cli.test.js +++ b/packages/astro/test/cli.test.js @@ -118,13 +118,13 @@ describe('astro cli i18n', () => { const projectRootURL = new URL('./fixtures/astro-basic/', import.meta.url); let error = null; try { - const proc = cli('dev', '--root', fileURLToPath(projectRootURL), { env: { LANG: locale }}); - await parseCliDevStart(proc) + const proc = cli('dev', '--root', fileURLToPath(projectRootURL), { env: { LANG: locale } }); + await parseCliDevStart(proc); } catch (e) { console.log(e); error = e.message; } expect(error).to.be.null; }); - }) -}) + }); +}); diff --git a/packages/astro/test/errors.test.js b/packages/astro/test/errors.test.js index 3e09e8ad9..7391d363e 100644 --- a/packages/astro/test/errors.test.js +++ b/packages/astro/test/errors.test.js @@ -33,7 +33,7 @@ describe('Error display', () => { }); }); - describe('Framework components', function() { + describe('Framework components', function () { let devServer; before(async () => { diff --git a/packages/create-astro/src/logger.ts b/packages/create-astro/src/logger.ts index 96965e7ea..80e5bf916 100644 --- a/packages/create-astro/src/logger.ts +++ b/packages/create-astro/src/logger.ts @@ -8,10 +8,10 @@ type ConsoleStream = Writable & { // Hey, locales are pretty complicated! Be careful modifying this logic... // If we throw at the top-level, international users can't use Astro. -// +// // Using `[]` sets the default locale properly from the system! // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#parameters -// +// // Here be the dragons we've slain: // https://github.com/withastro/astro/issues/2625 // https://github.com/withastro/astro/issues/3309 From 2939be5f2d95711a2a891d77824763c7dbbf10d2 Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Wed, 18 May 2022 15:11:40 -0400 Subject: [PATCH 04/14] Allow overriding build vite config options (#3392) * Allow overriding build vite config options * Adds a changeset * Test svelte * Move plugins down * Assign after for the client too * Spread output options on manually * Remove .only --- .changeset/eleven-gifts-matter.md | 5 +++++ packages/astro/src/@types/astro.ts | 1 + packages/astro/src/core/build/static-build.ts | 2 ++ packages/astro/src/integrations/index.ts | 9 ++++++++- packages/astro/test/config-vite.test.js | 18 ++++++++++++++++++ .../test/fixtures/config-vite/astro.config.mjs | 14 ++++++++++++++ .../fixtures/config-vite/src/pages/index.astro | 13 +++++++++++++ 7 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 .changeset/eleven-gifts-matter.md create mode 100644 packages/astro/test/config-vite.test.js create mode 100644 packages/astro/test/fixtures/config-vite/astro.config.mjs create mode 100644 packages/astro/test/fixtures/config-vite/src/pages/index.astro diff --git a/.changeset/eleven-gifts-matter.md b/.changeset/eleven-gifts-matter.md new file mode 100644 index 000000000..ae6e0323d --- /dev/null +++ b/.changeset/eleven-gifts-matter.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Allows vite config to override options used in the build diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts index 9cd7dd85a..85e3d26c5 100644 --- a/packages/astro/src/@types/astro.ts +++ b/packages/astro/src/@types/astro.ts @@ -944,6 +944,7 @@ export interface AstroIntegration { vite: ViteConfigWithSSR; pages: Map; target: 'client' | 'server'; + updateConfig: (newConfig: ViteConfigWithSSR) => void; }) => void | Promise; 'astro:build:done'?: (options: { pages: { pathname: string }[]; diff --git a/packages/astro/src/core/build/static-build.ts b/packages/astro/src/core/build/static-build.ts index 2fa7f964c..a2cbe982a 100644 --- a/packages/astro/src/core/build/static-build.ts +++ b/packages/astro/src/core/build/static-build.ts @@ -142,6 +142,7 @@ async function ssrBuild(opts: StaticBuildOptions, internals: BuildInternals, inp entryFileNames: opts.buildConfig.serverEntry, chunkFileNames: 'chunks/chunk.[hash].mjs', assetFileNames: 'assets/asset.[hash][extname]', + ...viteConfig.build?.rollupOptions?.output }, }, ssr: true, @@ -222,6 +223,7 @@ async function clientBuild( entryFileNames: 'entry.[hash].js', chunkFileNames: 'chunks/chunk.[hash].js', assetFileNames: 'assets/asset.[hash][extname]', + ...viteConfig.build?.rollupOptions?.output }, preserveEntrySignatures: 'exports-only', }, diff --git a/packages/astro/src/integrations/index.ts b/packages/astro/src/integrations/index.ts index 1abbbae3b..47dcfdcc5 100644 --- a/packages/astro/src/integrations/index.ts +++ b/packages/astro/src/integrations/index.ts @@ -134,7 +134,14 @@ export async function runHookBuildSetup({ }) { for (const integration of config.integrations) { if (integration.hooks['astro:build:setup']) { - await integration.hooks['astro:build:setup']({ vite, pages, target }); + await integration.hooks['astro:build:setup']({ + vite, + pages, + target, + updateConfig: (newConfig) => { + mergeConfig(vite, newConfig); + }, + }); } } } diff --git a/packages/astro/test/config-vite.test.js b/packages/astro/test/config-vite.test.js new file mode 100644 index 000000000..6e69bf4a7 --- /dev/null +++ b/packages/astro/test/config-vite.test.js @@ -0,0 +1,18 @@ +import { expect } from 'chai'; +import * as cheerio from 'cheerio'; +import { loadFixture } from './test-utils.js'; + +describe('Vite Config', async () => { + let fixture; + + before(async () => { + fixture = await loadFixture({ root: './fixtures/config-vite/' }); + await fixture.build(); + }); + + it('Allows overriding bundle naming options in the build', async () => { + const html = await fixture.readFile('/index.html'); + const $ = cheerio.load(html); + expect($('link').attr('href')).to.equal('/assets/testing-entry.css'); + }); +}); diff --git a/packages/astro/test/fixtures/config-vite/astro.config.mjs b/packages/astro/test/fixtures/config-vite/astro.config.mjs new file mode 100644 index 000000000..2e6f18a63 --- /dev/null +++ b/packages/astro/test/fixtures/config-vite/astro.config.mjs @@ -0,0 +1,14 @@ +import { defineConfig } from 'astro/config'; + +export default defineConfig({ + vite: { + build: { + rollupOptions: { + output: { + chunkFileNames: 'assets/testing-[name].js', + assetFileNames: 'assets/testing-[name].[ext]' + } + } + } + } +}) diff --git a/packages/astro/test/fixtures/config-vite/src/pages/index.astro b/packages/astro/test/fixtures/config-vite/src/pages/index.astro new file mode 100644 index 000000000..8947fd369 --- /dev/null +++ b/packages/astro/test/fixtures/config-vite/src/pages/index.astro @@ -0,0 +1,13 @@ + + + Testing + + + +

Testing

+ + From 43cfd7e769dbcc6697d549237d6ef69abe298bb8 Mon Sep 17 00:00:00 2001 From: matthewp Date: Wed, 18 May 2022 19:12:28 +0000 Subject: [PATCH 05/14] [ci] format --- packages/astro/src/core/build/static-build.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/astro/src/core/build/static-build.ts b/packages/astro/src/core/build/static-build.ts index a2cbe982a..16ea049c1 100644 --- a/packages/astro/src/core/build/static-build.ts +++ b/packages/astro/src/core/build/static-build.ts @@ -142,7 +142,7 @@ async function ssrBuild(opts: StaticBuildOptions, internals: BuildInternals, inp entryFileNames: opts.buildConfig.serverEntry, chunkFileNames: 'chunks/chunk.[hash].mjs', assetFileNames: 'assets/asset.[hash][extname]', - ...viteConfig.build?.rollupOptions?.output + ...viteConfig.build?.rollupOptions?.output, }, }, ssr: true, @@ -223,7 +223,7 @@ async function clientBuild( entryFileNames: 'entry.[hash].js', chunkFileNames: 'chunks/chunk.[hash].js', assetFileNames: 'assets/asset.[hash][extname]', - ...viteConfig.build?.rollupOptions?.output + ...viteConfig.build?.rollupOptions?.output, }, preserveEntrySignatures: 'exports-only', }, From 0d3c673dd9d9431bf6e6a88c448e324033f7f2f7 Mon Sep 17 00:00:00 2001 From: Tony Sullivan Date: Wed, 18 May 2022 20:09:23 +0000 Subject: [PATCH 06/14] Fix: Support .html requests in dev (#3401) * WIP: this regex should handle .html as well * much simpler! Just fix the req.url, don't touch the manifest * only handle .html requests when config.build.format === 'file' * chore: add changeset --- .changeset/lemon-insects-smash.md | 5 ++ .../src/vite-plugin-astro-server/index.ts | 7 ++- packages/astro/test/dev-routing.test.js | 48 +++++++++++++++++++ 3 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 .changeset/lemon-insects-smash.md diff --git a/.changeset/lemon-insects-smash.md b/.changeset/lemon-insects-smash.md new file mode 100644 index 000000000..8e4dd6d7d --- /dev/null +++ b/.changeset/lemon-insects-smash.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Adding support for config.build.format to the dev server diff --git a/packages/astro/src/vite-plugin-astro-server/index.ts b/packages/astro/src/vite-plugin-astro-server/index.ts index 00461c9bb..b71878079 100644 --- a/packages/astro/src/vite-plugin-astro-server/index.ts +++ b/packages/astro/src/vite-plugin-astro-server/index.ts @@ -191,7 +191,12 @@ async function handleRequest( const devRoot = site ? site.pathname : '/'; const origin = `${viteServer.config.server.https ? 'https' : 'http'}://${req.headers.host}`; const buildingToSSR = isBuildingToSSR(config); - const url = new URL(origin + req.url); + // When file-based build format is used, pages will be built to `/blog.html` + // rather than `/blog/index.html`. The dev server should handle this as well + // to match production deployments. + const url = config.build.format === 'file' + ? new URL(origin + req.url?.replace(/(index)?\.html$/, '')) + : new URL(origin + req.url); const pathname = decodeURI(url.pathname); const rootRelativeUrl = pathname.substring(devRoot.length - 1); if (!buildingToSSR) { diff --git a/packages/astro/test/dev-routing.test.js b/packages/astro/test/dev-routing.test.js index 439ee6988..de765a183 100644 --- a/packages/astro/test/dev-routing.test.js +++ b/packages/astro/test/dev-routing.test.js @@ -247,4 +247,52 @@ describe('Development Routing', () => { expect(body.title).to.equal('data [slug]'); }); }); + + describe('file format routing', () => { + /** @type {import('./test-utils').Fixture} */ + let fixture; + /** @type {import('./test-utils').DevServer} */ + let devServer; + + before(async () => { + fixture = await loadFixture({ + build: { + format: 'file', + }, + root: './fixtures/without-site-config/', + site: 'http://example.com/', + }); + devServer = await fixture.startDevServer(); + }); + + it('200 when loading /index.html', async () => { + const response = await fixture.fetch('/index.html'); + expect(response.status).to.equal(200); + }); + + it('200 when loading /', async () => { + const response = await fixture.fetch('/'); + expect(response.status).to.equal(200); + }); + + it('200 when loading /another.html', async () => { + const response = await fixture.fetch('/another.html'); + expect(response.status).to.equal(200); + }); + + it('200 when loading /another', async () => { + const response = await fixture.fetch('/another'); + expect(response.status).to.equal(200); + }); + + it('200 when loading /1.html', async () => { + const response = await fixture.fetch('/1.html'); + expect(response.status).to.equal(200); + }); + + it('200 when loading /1', async () => { + const response = await fixture.fetch('/1'); + expect(response.status).to.equal(200); + }); + }); }); From f1d7d543b0038d2d6218acdd42ffaf61e9480b13 Mon Sep 17 00:00:00 2001 From: tony-sull Date: Wed, 18 May 2022 20:10:07 +0000 Subject: [PATCH 07/14] [ci] format --- packages/astro/src/vite-plugin-astro-server/index.ts | 7 ++++--- packages/astro/test/dev-routing.test.js | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/astro/src/vite-plugin-astro-server/index.ts b/packages/astro/src/vite-plugin-astro-server/index.ts index b71878079..506f54a3f 100644 --- a/packages/astro/src/vite-plugin-astro-server/index.ts +++ b/packages/astro/src/vite-plugin-astro-server/index.ts @@ -194,9 +194,10 @@ async function handleRequest( // When file-based build format is used, pages will be built to `/blog.html` // rather than `/blog/index.html`. The dev server should handle this as well // to match production deployments. - const url = config.build.format === 'file' - ? new URL(origin + req.url?.replace(/(index)?\.html$/, '')) - : new URL(origin + req.url); + const url = + config.build.format === 'file' + ? new URL(origin + req.url?.replace(/(index)?\.html$/, '')) + : new URL(origin + req.url); const pathname = decodeURI(url.pathname); const rootRelativeUrl = pathname.substring(devRoot.length - 1); if (!buildingToSSR) { diff --git a/packages/astro/test/dev-routing.test.js b/packages/astro/test/dev-routing.test.js index de765a183..13ea4d12f 100644 --- a/packages/astro/test/dev-routing.test.js +++ b/packages/astro/test/dev-routing.test.js @@ -289,7 +289,7 @@ describe('Development Routing', () => { const response = await fixture.fetch('/1.html'); expect(response.status).to.equal(200); }); - + it('200 when loading /1', async () => { const response = await fixture.fetch('/1'); expect(response.status).to.equal(200); From b330c5b72e8dc39c09e42fa8e53c1d3a6fe54bb6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 18 May 2022 21:36:32 +0000 Subject: [PATCH 08/14] [ci] release (#3400) Co-authored-by: github-actions[bot] --- .changeset/eleven-gifts-matter.md | 5 -- .changeset/lemon-insects-smash.md | 5 -- .changeset/sour-years-scream.md | 5 -- .changeset/thirty-drinks-shout.md | 6 -- examples/basics/package.json | 2 +- examples/blog-multiple-authors/package.json | 2 +- examples/blog/package.json | 2 +- examples/component/demo/package.json | 2 +- examples/component/package.json | 2 +- examples/docs/package.json | 2 +- examples/env-vars/package.json | 2 +- examples/framework-alpine/package.json | 2 +- examples/framework-lit/package.json | 2 +- examples/framework-multiple/package.json | 2 +- examples/framework-preact/package.json | 2 +- examples/framework-react/package.json | 2 +- examples/framework-solid/package.json | 2 +- examples/framework-svelte/package.json | 2 +- examples/framework-vue/package.json | 2 +- examples/integrations-playground/package.json | 2 +- examples/minimal/package.json | 2 +- examples/non-html-pages/package.json | 2 +- examples/portfolio/package.json | 2 +- examples/ssr/package.json | 2 +- examples/starter/package.json | 2 +- examples/subpath/package.json | 2 +- examples/with-markdown-plugins/package.json | 2 +- examples/with-markdown-shiki/package.json | 2 +- examples/with-markdown/package.json | 2 +- examples/with-nanostores/package.json | 2 +- examples/with-tailwindcss/package.json | 2 +- examples/with-vite-plugin-pwa/package.json | 2 +- packages/astro/CHANGELOG.md | 12 ++++ packages/astro/package.json | 2 +- packages/create-astro/CHANGELOG.md | 6 ++ packages/create-astro/package.json | 2 +- pnpm-lock.yaml | 56 +++++++++---------- 37 files changed, 76 insertions(+), 79 deletions(-) delete mode 100644 .changeset/eleven-gifts-matter.md delete mode 100644 .changeset/lemon-insects-smash.md delete mode 100644 .changeset/sour-years-scream.md delete mode 100644 .changeset/thirty-drinks-shout.md diff --git a/.changeset/eleven-gifts-matter.md b/.changeset/eleven-gifts-matter.md deleted file mode 100644 index ae6e0323d..000000000 --- a/.changeset/eleven-gifts-matter.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Allows vite config to override options used in the build diff --git a/.changeset/lemon-insects-smash.md b/.changeset/lemon-insects-smash.md deleted file mode 100644 index 8e4dd6d7d..000000000 --- a/.changeset/lemon-insects-smash.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Adding support for config.build.format to the dev server diff --git a/.changeset/sour-years-scream.md b/.changeset/sour-years-scream.md deleted file mode 100644 index d244f9752..000000000 --- a/.changeset/sour-years-scream.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Update "building for SSR..." log for SSG users to say "building entrypoints for prerendering..." diff --git a/.changeset/thirty-drinks-shout.md b/.changeset/thirty-drinks-shout.md deleted file mode 100644 index 815e14dc1..000000000 --- a/.changeset/thirty-drinks-shout.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'astro': patch -'create-astro': patch ---- - -Fix [#3309](https://github.com/withastro/astro/issues/3309) default logger locale behavior. diff --git a/examples/basics/package.json b/examples/basics/package.json index e60ee87df..c36be10ea 100644 --- a/examples/basics/package.json +++ b/examples/basics/package.json @@ -9,6 +9,6 @@ "preview": "astro preview" }, "devDependencies": { - "astro": "^1.0.0-beta.29" + "astro": "^1.0.0-beta.30" } } diff --git a/examples/blog-multiple-authors/package.json b/examples/blog-multiple-authors/package.json index 43a0d2aab..acc1ce173 100644 --- a/examples/blog-multiple-authors/package.json +++ b/examples/blog-multiple-authors/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/preact": "^0.1.2", - "astro": "^1.0.0-beta.29", + "astro": "^1.0.0-beta.30", "sass": "^1.51.0" }, "dependencies": { diff --git a/examples/blog/package.json b/examples/blog/package.json index e182cdef6..17c48df72 100644 --- a/examples/blog/package.json +++ b/examples/blog/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/preact": "^0.1.2", - "astro": "^1.0.0-beta.29" + "astro": "^1.0.0-beta.30" }, "dependencies": { "preact": "^10.7.2" diff --git a/examples/component/demo/package.json b/examples/component/demo/package.json index b9b3231e2..0ecc25517 100644 --- a/examples/component/demo/package.json +++ b/examples/component/demo/package.json @@ -10,6 +10,6 @@ }, "devDependencies": { "@example/my-component": "workspace:*", - "astro": "^1.0.0-beta.29" + "astro": "^1.0.0-beta.30" } } diff --git a/examples/component/package.json b/examples/component/package.json index 05701300b..52aed79ac 100644 --- a/examples/component/package.json +++ b/examples/component/package.json @@ -8,6 +8,6 @@ "serve": "astro --root demo preview" }, "devDependencies": { - "astro": "^1.0.0-beta.29" + "astro": "^1.0.0-beta.30" } } diff --git a/examples/docs/package.json b/examples/docs/package.json index 5d4f9f786..6993b7aa2 100644 --- a/examples/docs/package.json +++ b/examples/docs/package.json @@ -20,6 +20,6 @@ "devDependencies": { "@astrojs/preact": "^0.1.2", "@astrojs/react": "^0.1.2", - "astro": "^1.0.0-beta.29" + "astro": "^1.0.0-beta.30" } } diff --git a/examples/env-vars/package.json b/examples/env-vars/package.json index 33bf8003d..bf0055e28 100644 --- a/examples/env-vars/package.json +++ b/examples/env-vars/package.json @@ -9,6 +9,6 @@ "preview": "astro preview" }, "devDependencies": { - "astro": "^1.0.0-beta.29" + "astro": "^1.0.0-beta.30" } } diff --git a/examples/framework-alpine/package.json b/examples/framework-alpine/package.json index 6ec795a14..13eb720ec 100644 --- a/examples/framework-alpine/package.json +++ b/examples/framework-alpine/package.json @@ -9,7 +9,7 @@ "preview": "astro preview" }, "devDependencies": { - "astro": "^1.0.0-beta.29" + "astro": "^1.0.0-beta.30" }, "dependencies": { "alpinejs": "^3.10.2" diff --git a/examples/framework-lit/package.json b/examples/framework-lit/package.json index 88740914b..0809af5e3 100644 --- a/examples/framework-lit/package.json +++ b/examples/framework-lit/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/lit": "^0.1.3", - "astro": "^1.0.0-beta.29" + "astro": "^1.0.0-beta.30" }, "dependencies": { "@webcomponents/template-shadowroot": "^0.1.0", diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json index e989a5a40..48ac3debd 100644 --- a/examples/framework-multiple/package.json +++ b/examples/framework-multiple/package.json @@ -15,7 +15,7 @@ "@astrojs/solid-js": "^0.1.2", "@astrojs/svelte": "^0.1.3", "@astrojs/vue": "^0.1.4", - "astro": "^1.0.0-beta.29" + "astro": "^1.0.0-beta.30" }, "dependencies": { "@webcomponents/template-shadowroot": "^0.1.0", diff --git a/examples/framework-preact/package.json b/examples/framework-preact/package.json index bbddb2635..1d3e803b6 100644 --- a/examples/framework-preact/package.json +++ b/examples/framework-preact/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/preact": "^0.1.2", - "astro": "^1.0.0-beta.29" + "astro": "^1.0.0-beta.30" }, "dependencies": { "preact": "^10.7.2" diff --git a/examples/framework-react/package.json b/examples/framework-react/package.json index abe611eca..9a86f6f9e 100644 --- a/examples/framework-react/package.json +++ b/examples/framework-react/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/react": "^0.1.2", - "astro": "^1.0.0-beta.29" + "astro": "^1.0.0-beta.30" }, "dependencies": { "@types/react": "^18.0.9", diff --git a/examples/framework-solid/package.json b/examples/framework-solid/package.json index 5f21b4476..4e5f54915 100644 --- a/examples/framework-solid/package.json +++ b/examples/framework-solid/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/solid-js": "^0.1.2", - "astro": "^1.0.0-beta.29" + "astro": "^1.0.0-beta.30" }, "dependencies": { "solid-js": "^1.4.1" diff --git a/examples/framework-svelte/package.json b/examples/framework-svelte/package.json index 84513b47c..4852f24b9 100644 --- a/examples/framework-svelte/package.json +++ b/examples/framework-svelte/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/svelte": "^0.1.3", - "astro": "^1.0.0-beta.29" + "astro": "^1.0.0-beta.30" }, "dependencies": { "svelte": "^3.48.0" diff --git a/examples/framework-vue/package.json b/examples/framework-vue/package.json index 16a7c3af4..87a66b622 100644 --- a/examples/framework-vue/package.json +++ b/examples/framework-vue/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/vue": "^0.1.4", - "astro": "^1.0.0-beta.29" + "astro": "^1.0.0-beta.30" }, "dependencies": { "vue": "^3.2.33" diff --git a/examples/integrations-playground/package.json b/examples/integrations-playground/package.json index ae90dd55d..2d0f9bbc6 100644 --- a/examples/integrations-playground/package.json +++ b/examples/integrations-playground/package.json @@ -16,7 +16,7 @@ "@astrojs/solid-js": "0.1.2", "@astrojs/tailwind": "^0.2.1", "@astrojs/turbolinks": "^0.1.3", - "astro": "^1.0.0-beta.29", + "astro": "^1.0.0-beta.30", "solid-js": "^1.4.1" }, "dependencies": { diff --git a/examples/minimal/package.json b/examples/minimal/package.json index 405c32010..b22d4caa9 100644 --- a/examples/minimal/package.json +++ b/examples/minimal/package.json @@ -9,6 +9,6 @@ "preview": "astro preview" }, "devDependencies": { - "astro": "^1.0.0-beta.29" + "astro": "^1.0.0-beta.30" } } diff --git a/examples/non-html-pages/package.json b/examples/non-html-pages/package.json index 7952a668f..23678acae 100644 --- a/examples/non-html-pages/package.json +++ b/examples/non-html-pages/package.json @@ -9,6 +9,6 @@ "preview": "astro preview" }, "devDependencies": { - "astro": "^1.0.0-beta.29" + "astro": "^1.0.0-beta.30" } } diff --git a/examples/portfolio/package.json b/examples/portfolio/package.json index 1e3f0469f..a1df8e559 100644 --- a/examples/portfolio/package.json +++ b/examples/portfolio/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/preact": "^0.1.2", - "astro": "^1.0.0-beta.29", + "astro": "^1.0.0-beta.30", "sass": "^1.51.0" }, "dependencies": { diff --git a/examples/ssr/package.json b/examples/ssr/package.json index 9dc19ae0f..09a0cebf8 100644 --- a/examples/ssr/package.json +++ b/examples/ssr/package.json @@ -11,7 +11,7 @@ "devDependencies": { "@astrojs/node": "^0.1.1", "@astrojs/svelte": "^0.1.3", - "astro": "^1.0.0-beta.29", + "astro": "^1.0.0-beta.30", "concurrently": "^7.2.0", "lightcookie": "^1.0.25", "unocss": "^0.15.6", diff --git a/examples/starter/package.json b/examples/starter/package.json index 0bfc62c61..abbd61580 100644 --- a/examples/starter/package.json +++ b/examples/starter/package.json @@ -9,6 +9,6 @@ "preview": "astro preview" }, "devDependencies": { - "astro": "^1.0.0-beta.29" + "astro": "^1.0.0-beta.30" } } diff --git a/examples/subpath/package.json b/examples/subpath/package.json index f4fdf403b..7971d0f87 100644 --- a/examples/subpath/package.json +++ b/examples/subpath/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/react": "^0.1.2", - "astro": "^1.0.0-beta.29", + "astro": "^1.0.0-beta.30", "sass": "^1.51.0" }, "dependencies": { diff --git a/examples/with-markdown-plugins/package.json b/examples/with-markdown-plugins/package.json index 8dc7dedfd..6b874b4d9 100644 --- a/examples/with-markdown-plugins/package.json +++ b/examples/with-markdown-plugins/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/markdown-remark": "^0.9.4", - "astro": "^1.0.0-beta.29", + "astro": "^1.0.0-beta.30", "hast-util-select": "5.0.1", "rehype-autolink-headings": "^6.1.1", "rehype-slug": "^5.0.1", diff --git a/examples/with-markdown-shiki/package.json b/examples/with-markdown-shiki/package.json index 46c2d24bd..282d25eef 100644 --- a/examples/with-markdown-shiki/package.json +++ b/examples/with-markdown-shiki/package.json @@ -10,6 +10,6 @@ }, "devDependencies": { "@astrojs/markdown-remark": "^0.9.4", - "astro": "^1.0.0-beta.29" + "astro": "^1.0.0-beta.30" } } diff --git a/examples/with-markdown/package.json b/examples/with-markdown/package.json index 0e502407c..fde4c54a8 100644 --- a/examples/with-markdown/package.json +++ b/examples/with-markdown/package.json @@ -14,7 +14,7 @@ "@astrojs/react": "^0.1.2", "@astrojs/svelte": "^0.1.3", "@astrojs/vue": "^0.1.4", - "astro": "^1.0.0-beta.29" + "astro": "^1.0.0-beta.30" }, "dependencies": { "preact": "^10.7.2", diff --git a/examples/with-nanostores/package.json b/examples/with-nanostores/package.json index 76e4d02df..b5d982c39 100644 --- a/examples/with-nanostores/package.json +++ b/examples/with-nanostores/package.json @@ -25,6 +25,6 @@ "@astrojs/solid-js": "^0.1.2", "@astrojs/svelte": "^0.1.3", "@astrojs/vue": "^0.1.4", - "astro": "^1.0.0-beta.29" + "astro": "^1.0.0-beta.30" } } diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index e60f91757..eed2d7235 100644 --- a/examples/with-tailwindcss/package.json +++ b/examples/with-tailwindcss/package.json @@ -10,7 +10,7 @@ }, "devDependencies": { "@astrojs/tailwind": "^0.2.1", - "astro": "^1.0.0-beta.29", + "astro": "^1.0.0-beta.30", "autoprefixer": "^10.4.7", "canvas-confetti": "^1.5.1", "postcss": "^8.4.13", diff --git a/examples/with-vite-plugin-pwa/package.json b/examples/with-vite-plugin-pwa/package.json index 3f9e83d47..d59874ca5 100644 --- a/examples/with-vite-plugin-pwa/package.json +++ b/examples/with-vite-plugin-pwa/package.json @@ -9,7 +9,7 @@ "preview": "astro preview" }, "devDependencies": { - "astro": "^1.0.0-beta.29", + "astro": "^1.0.0-beta.30", "vite-plugin-pwa": "0.11.11", "workbox-window": "^6.5.3" } diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index bd9131891..7f8491d8f 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -1,5 +1,17 @@ # astro +## 1.0.0-beta.30 + +### Patch Changes + +- [#3392](https://github.com/withastro/astro/pull/3392) [`2939be5f`](https://github.com/withastro/astro/commit/2939be5f2d95711a2a891d77824763c7dbbf10d2) Thanks [@matthewp](https://github.com/matthewp)! - Allows vite config to override options used in the build + +* [#3401](https://github.com/withastro/astro/pull/3401) [`0d3c673d`](https://github.com/withastro/astro/commit/0d3c673dd9d9431bf6e6a88c448e324033f7f2f7) Thanks [@tony-sull](https://github.com/tony-sull)! - Adding support for config.build.format to the dev server + +- [#3399](https://github.com/withastro/astro/pull/3399) [`1bf12260`](https://github.com/withastro/astro/commit/1bf12260afad57f83768d040fe3917fb214aaf5f) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Update "building for SSR..." log for SSG users to say "building entrypoints for prerendering..." + +* [#3391](https://github.com/withastro/astro/pull/3391) [`cf8015ea`](https://github.com/withastro/astro/commit/cf8015eaa2b756f4ec399e8fd7071dee7dfa9ab6) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Fix [#3309](https://github.com/withastro/astro/issues/3309) default logger locale behavior. + ## 1.0.0-beta.29 ### Patch Changes diff --git a/packages/astro/package.json b/packages/astro/package.json index 683026041..3e47c20dd 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -1,6 +1,6 @@ { "name": "astro", - "version": "1.0.0-beta.29", + "version": "1.0.0-beta.30", "description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.", "type": "module", "author": "withastro", diff --git a/packages/create-astro/CHANGELOG.md b/packages/create-astro/CHANGELOG.md index b9726c364..0238e00ca 100644 --- a/packages/create-astro/CHANGELOG.md +++ b/packages/create-astro/CHANGELOG.md @@ -1,5 +1,11 @@ # create-astro +## 0.12.2 + +### Patch Changes + +- [#3391](https://github.com/withastro/astro/pull/3391) [`cf8015ea`](https://github.com/withastro/astro/commit/cf8015eaa2b756f4ec399e8fd7071dee7dfa9ab6) Thanks [@natemoo-re](https://github.com/natemoo-re)! - Fix [#3309](https://github.com/withastro/astro/issues/3309) default logger locale behavior. + ## 0.12.1 ### Patch Changes diff --git a/packages/create-astro/package.json b/packages/create-astro/package.json index cc5c13998..a978d8e26 100644 --- a/packages/create-astro/package.json +++ b/packages/create-astro/package.json @@ -1,6 +1,6 @@ { "name": "create-astro", - "version": "0.12.1", + "version": "0.12.2", "type": "module", "author": "withastro", "license": "MIT", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ec88ac562..50dff712d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -45,14 +45,14 @@ importers: examples/basics: specifiers: - astro: ^1.0.0-beta.29 + astro: ^1.0.0-beta.30 devDependencies: astro: link:../../packages/astro examples/blog: specifiers: '@astrojs/preact': ^0.1.2 - astro: ^1.0.0-beta.29 + astro: ^1.0.0-beta.30 preact: ^10.7.2 dependencies: preact: 10.7.2 @@ -63,7 +63,7 @@ importers: examples/blog-multiple-authors: specifiers: '@astrojs/preact': ^0.1.2 - astro: ^1.0.0-beta.29 + astro: ^1.0.0-beta.30 preact: ^10.7.2 sass: ^1.51.0 dependencies: @@ -75,14 +75,14 @@ importers: examples/component: specifiers: - astro: ^1.0.0-beta.29 + astro: ^1.0.0-beta.30 devDependencies: astro: link:../../packages/astro examples/component/demo: specifiers: '@example/my-component': workspace:* - astro: ^1.0.0-beta.29 + astro: ^1.0.0-beta.30 devDependencies: '@example/my-component': link:../packages/my-component astro: link:../../../packages/astro @@ -98,7 +98,7 @@ importers: '@docsearch/css': ^3.1.0 '@docsearch/react': ^3.1.0 '@types/react': ^17.0.45 - astro: ^1.0.0-beta.29 + astro: ^1.0.0-beta.30 preact: ^10.7.2 react: ^17.0.2 react-dom: ^17.0.2 @@ -117,14 +117,14 @@ importers: examples/env-vars: specifiers: - astro: ^1.0.0-beta.29 + astro: ^1.0.0-beta.30 devDependencies: astro: link:../../packages/astro examples/framework-alpine: specifiers: alpinejs: ^3.10.2 - astro: ^1.0.0-beta.29 + astro: ^1.0.0-beta.30 dependencies: alpinejs: 3.10.2 devDependencies: @@ -134,7 +134,7 @@ importers: specifiers: '@astrojs/lit': ^0.1.3 '@webcomponents/template-shadowroot': ^0.1.0 - astro: ^1.0.0-beta.29 + astro: ^1.0.0-beta.30 lit: ^2.2.4 dependencies: '@webcomponents/template-shadowroot': 0.1.0 @@ -152,7 +152,7 @@ importers: '@astrojs/svelte': ^0.1.3 '@astrojs/vue': ^0.1.4 '@webcomponents/template-shadowroot': ^0.1.0 - astro: ^1.0.0-beta.29 + astro: ^1.0.0-beta.30 lit: ^2.2.4 preact: ^10.7.2 react: ^18.1.0 @@ -181,7 +181,7 @@ importers: examples/framework-preact: specifiers: '@astrojs/preact': ^0.1.2 - astro: ^1.0.0-beta.29 + astro: ^1.0.0-beta.30 preact: ^10.7.2 dependencies: preact: 10.7.2 @@ -194,7 +194,7 @@ importers: '@astrojs/react': ^0.1.2 '@types/react': ^18.0.9 '@types/react-dom': ^18.0.4 - astro: ^1.0.0-beta.29 + astro: ^1.0.0-beta.30 react: ^18.1.0 react-dom: ^18.1.0 dependencies: @@ -209,7 +209,7 @@ importers: examples/framework-solid: specifiers: '@astrojs/solid-js': ^0.1.2 - astro: ^1.0.0-beta.29 + astro: ^1.0.0-beta.30 solid-js: ^1.4.1 dependencies: solid-js: 1.4.1 @@ -220,7 +220,7 @@ importers: examples/framework-svelte: specifiers: '@astrojs/svelte': ^0.1.3 - astro: ^1.0.0-beta.29 + astro: ^1.0.0-beta.30 svelte: ^3.48.0 dependencies: svelte: 3.48.0 @@ -231,7 +231,7 @@ importers: examples/framework-vue: specifiers: '@astrojs/vue': ^0.1.4 - astro: ^1.0.0-beta.29 + astro: ^1.0.0-beta.30 vue: ^3.2.33 dependencies: vue: 3.2.33 @@ -249,7 +249,7 @@ importers: '@astrojs/tailwind': ^0.2.1 '@astrojs/turbolinks': ^0.1.3 '@webcomponents/template-shadowroot': ^0.1.0 - astro: ^1.0.0-beta.29 + astro: ^1.0.0-beta.30 lit: ^2.2.4 preact: ^10.7.2 react: ^18.1.0 @@ -278,20 +278,20 @@ importers: examples/minimal: specifiers: - astro: ^1.0.0-beta.29 + astro: ^1.0.0-beta.30 devDependencies: astro: link:../../packages/astro examples/non-html-pages: specifiers: - astro: ^1.0.0-beta.29 + astro: ^1.0.0-beta.30 devDependencies: astro: link:../../packages/astro examples/portfolio: specifiers: '@astrojs/preact': ^0.1.2 - astro: ^1.0.0-beta.29 + astro: ^1.0.0-beta.30 preact: ^10.7.2 sass: ^1.51.0 dependencies: @@ -305,7 +305,7 @@ importers: specifiers: '@astrojs/node': ^0.1.1 '@astrojs/svelte': ^0.1.3 - astro: ^1.0.0-beta.29 + astro: ^1.0.0-beta.30 concurrently: ^7.2.0 lightcookie: ^1.0.25 svelte: ^3.48.0 @@ -324,14 +324,14 @@ importers: examples/starter: specifiers: - astro: ^1.0.0-beta.29 + astro: ^1.0.0-beta.30 devDependencies: astro: link:../../packages/astro examples/subpath: specifiers: '@astrojs/react': ^0.1.2 - astro: ^1.0.0-beta.29 + astro: ^1.0.0-beta.30 react: ^18.1.0 react-dom: ^18.1.0 sass: ^1.51.0 @@ -350,7 +350,7 @@ importers: '@astrojs/react': ^0.1.2 '@astrojs/svelte': ^0.1.3 '@astrojs/vue': ^0.1.4 - astro: ^1.0.0-beta.29 + astro: ^1.0.0-beta.30 preact: ^10.7.2 react: ^18.1.0 react-dom: ^18.1.0 @@ -373,7 +373,7 @@ importers: examples/with-markdown-plugins: specifiers: '@astrojs/markdown-remark': ^0.9.4 - astro: ^1.0.0-beta.29 + astro: ^1.0.0-beta.30 hast-util-select: 5.0.1 rehype-autolink-headings: ^6.1.1 rehype-slug: ^5.0.1 @@ -391,7 +391,7 @@ importers: examples/with-markdown-shiki: specifiers: '@astrojs/markdown-remark': ^0.9.4 - astro: ^1.0.0-beta.29 + astro: ^1.0.0-beta.30 devDependencies: '@astrojs/markdown-remark': link:../../packages/markdown/remark astro: link:../../packages/astro @@ -406,7 +406,7 @@ importers: '@nanostores/preact': ^0.1.3 '@nanostores/react': ^0.1.5 '@nanostores/vue': ^0.4.1 - astro: ^1.0.0-beta.29 + astro: ^1.0.0-beta.30 nanostores: ^0.5.12 preact: ^10.7.2 react: ^18.1.0 @@ -434,7 +434,7 @@ importers: examples/with-tailwindcss: specifiers: '@astrojs/tailwind': ^0.2.1 - astro: ^1.0.0-beta.29 + astro: ^1.0.0-beta.30 autoprefixer: ^10.4.7 canvas-confetti: ^1.5.1 postcss: ^8.4.13 @@ -449,7 +449,7 @@ importers: examples/with-vite-plugin-pwa: specifiers: - astro: ^1.0.0-beta.29 + astro: ^1.0.0-beta.30 vite-plugin-pwa: 0.11.11 workbox-window: ^6.5.3 devDependencies: From f0aea849200b3a91218415adc6812ff3dda37553 Mon Sep 17 00:00:00 2001 From: FredKSchott Date: Thu, 19 May 2022 12:02:27 +0000 Subject: [PATCH 09/14] [ci] collect stats --- scripts/stats/stats.csv | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/stats/stats.csv b/scripts/stats/stats.csv index 38cb95bd7..a5f0c1560 100644 --- a/scripts/stats/stats.csv +++ b/scripts/stats/stats.csv @@ -1,4 +1,5 @@ Date,Commits (24hr),Issues (24hr),Issues:BUG (24hr),Issues:RFC (24hr),Issues:DOC (24hr),PRs (24hr),Open PRs,Open Issues,Bugs: Needs Triage,Bugs: Accepted,RFC: In Progress,RFC: Accepted,Date (ISO) +"Thursday, May 19, 2022",12,1,1,0,0,8,14,71,36,28,0,0,"2022-05-19T12:02:20.678Z" "Wednesday, May 18, 2022",6,2,2,0,0,7,14,72,36,29,0,0,"2022-05-18T12:02:14.860Z" "Tuesday, May 17, 2022",15,1,1,0,0,9,11,72,35,30,0,0,"2022-05-17T12:02:18.523Z" "Monday, May 16, 2022",2,1,1,0,0,2,12,75,36,31,0,0,"2022-05-16T12:06:42.223Z" From 0c9f770e8ab361f11549f1e24114e557fdcca65d Mon Sep 17 00:00:00 2001 From: Matthew Phillips Date: Thu, 19 May 2022 08:38:27 -0400 Subject: [PATCH 10/14] Include server CSS in the manifest assets (#3402) * Include server CSS in the manifest assets * Adds a changeset --- .changeset/good-humans-sniff.md | 5 ++++ .../astro/src/core/build/vite-plugin-ssr.ts | 13 ++++++--- .../fixtures/ssr-assets/src/pages/index.astro | 19 +++++++++++++ packages/astro/test/ssr-assets.test.js | 27 +++++++++++++++++++ packages/astro/test/test-utils.js | 6 +++-- 5 files changed, 65 insertions(+), 5 deletions(-) create mode 100644 .changeset/good-humans-sniff.md create mode 100644 packages/astro/test/fixtures/ssr-assets/src/pages/index.astro create mode 100644 packages/astro/test/ssr-assets.test.js diff --git a/.changeset/good-humans-sniff.md b/.changeset/good-humans-sniff.md new file mode 100644 index 000000000..d5174e271 --- /dev/null +++ b/.changeset/good-humans-sniff.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Include server CSS in the SSR manifest assets diff --git a/packages/astro/src/core/build/vite-plugin-ssr.ts b/packages/astro/src/core/build/vite-plugin-ssr.ts index 8c821f608..f7e730115 100644 --- a/packages/astro/src/core/build/vite-plugin-ssr.ts +++ b/packages/astro/src/core/build/vite-plugin-ssr.ts @@ -69,11 +69,18 @@ if(_start in adapter) { return void 0; }, async generateBundle(_opts, bundle) { - const staticFiles = await glob('**/*', { + const staticFiles = new Set(await glob('**/*', { cwd: fileURLToPath(buildOpts.buildConfig.client), - }); + })); - const manifest = buildManifest(buildOpts, internals, staticFiles); + // Add assets from this SSR chunk as well. + for(const [_chunkName, chunk] of Object.entries(bundle)) { + if(chunk.type === 'asset') { + staticFiles.add(chunk.fileName); + } + } + + const manifest = buildManifest(buildOpts, internals, Array.from(staticFiles)); await runHookBuildSsr({ config: buildOpts.astroConfig, manifest }); for (const [_chunkName, chunk] of Object.entries(bundle)) { diff --git a/packages/astro/test/fixtures/ssr-assets/src/pages/index.astro b/packages/astro/test/fixtures/ssr-assets/src/pages/index.astro new file mode 100644 index 000000000..d67c24621 --- /dev/null +++ b/packages/astro/test/fixtures/ssr-assets/src/pages/index.astro @@ -0,0 +1,19 @@ +--- + +--- + + + + + Astro + + + +

Astro

+ + + diff --git a/packages/astro/test/ssr-assets.test.js b/packages/astro/test/ssr-assets.test.js new file mode 100644 index 000000000..ca62fbd88 --- /dev/null +++ b/packages/astro/test/ssr-assets.test.js @@ -0,0 +1,27 @@ +import { expect } from 'chai'; +import { loadFixture } from './test-utils.js'; +import testAdapter from './test-adapter.js'; + +describe('SSR Assets', () => { + /** @type {import('./test-utils').Fixture} */ + let fixture; + + before(async () => { + fixture = await loadFixture({ + root: './fixtures/ssr-assets/', + experimental: { + ssr: true, + }, + adapter: testAdapter(), + }); + await fixture.build(); + }); + + it('Do not have to implement getStaticPaths', async () => { + const app = await fixture.loadTestAdapterApp(); + /** @type {Set} */ + const assets = app.manifest.assets; + expect(assets.size).to.equal(1); + expect(Array.from(assets)[0].endsWith('.css')).to.be.true; + }); +}); diff --git a/packages/astro/test/test-utils.js b/packages/astro/test/test-utils.js index c6c641f0d..1e6ec60f1 100644 --- a/packages/astro/test/test-utils.js +++ b/packages/astro/test/test-utils.js @@ -137,8 +137,10 @@ export async function loadFixture(inlineConfig) { clean: () => fs.promises.rm(config.outDir, { maxRetries: 10, recursive: true, force: true }), loadTestAdapterApp: async () => { const url = new URL('./server/entry.mjs', config.outDir); - const { createApp } = await import(url); - return createApp(); + const { createApp, manifest } = await import(url); + const app =createApp(); + app.manifest = manifest; + return app; }, editFile: async (filePath, newContents) => { const fileUrl = new URL(filePath.replace(/^\//, ''), config.root); From e118b8a91d0a56799d90bfb712e8c3aaaa7f49fe Mon Sep 17 00:00:00 2001 From: matthewp Date: Thu, 19 May 2022 12:39:11 +0000 Subject: [PATCH 11/14] [ci] format --- packages/astro/src/core/build/vite-plugin-ssr.ts | 12 +++++++----- packages/astro/test/test-utils.js | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/astro/src/core/build/vite-plugin-ssr.ts b/packages/astro/src/core/build/vite-plugin-ssr.ts index f7e730115..35d95e6a2 100644 --- a/packages/astro/src/core/build/vite-plugin-ssr.ts +++ b/packages/astro/src/core/build/vite-plugin-ssr.ts @@ -69,13 +69,15 @@ if(_start in adapter) { return void 0; }, async generateBundle(_opts, bundle) { - const staticFiles = new Set(await glob('**/*', { - cwd: fileURLToPath(buildOpts.buildConfig.client), - })); + const staticFiles = new Set( + await glob('**/*', { + cwd: fileURLToPath(buildOpts.buildConfig.client), + }) + ); // Add assets from this SSR chunk as well. - for(const [_chunkName, chunk] of Object.entries(bundle)) { - if(chunk.type === 'asset') { + for (const [_chunkName, chunk] of Object.entries(bundle)) { + if (chunk.type === 'asset') { staticFiles.add(chunk.fileName); } } diff --git a/packages/astro/test/test-utils.js b/packages/astro/test/test-utils.js index 1e6ec60f1..8b4e9d310 100644 --- a/packages/astro/test/test-utils.js +++ b/packages/astro/test/test-utils.js @@ -138,7 +138,7 @@ export async function loadFixture(inlineConfig) { loadTestAdapterApp: async () => { const url = new URL('./server/entry.mjs', config.outDir); const { createApp, manifest } = await import(url); - const app =createApp(); + const app = createApp(); app.manifest = manifest; return app; }, From a7480452b1059e17e0ea93c97ff641111bdbc5fc Mon Sep 17 00:00:00 2001 From: "Fred K. Schott" Date: Thu, 19 May 2022 08:22:27 -0700 Subject: [PATCH 12/14] [ci] update lockfile (#3404) Co-authored-by: FredKSchott --- examples/framework-multiple/package.json | 4 +- examples/framework-solid/package.json | 2 +- examples/framework-vue/package.json | 2 +- examples/integrations-playground/package.json | 4 +- examples/with-markdown/package.json | 2 +- examples/with-nanostores/package.json | 2 +- examples/with-tailwindcss/package.json | 2 +- packages/astro/package.json | 4 +- .../astro/test/fixtures/postcss/package.json | 2 +- .../fixtures/react-component/package.json | 2 +- .../test/fixtures/tailwindcss/package.json | 2 +- packages/integrations/solid/package.json | 4 +- packages/integrations/tailwind/package.json | 2 +- packages/integrations/vue/package.json | 2 +- packages/webapi/package.json | 2 +- pnpm-lock.yaml | 330 +++++++++--------- 16 files changed, 184 insertions(+), 184 deletions(-) diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json index 48ac3debd..f0b5e2046 100644 --- a/examples/framework-multiple/package.json +++ b/examples/framework-multiple/package.json @@ -23,8 +23,8 @@ "preact": "^10.7.2", "react": "^18.1.0", "react-dom": "^18.1.0", - "solid-js": "^1.4.1", + "solid-js": "^1.4.2", "svelte": "^3.48.0", - "vue": "^3.2.33" + "vue": "^3.2.34" } } diff --git a/examples/framework-solid/package.json b/examples/framework-solid/package.json index 4e5f54915..c401c8544 100644 --- a/examples/framework-solid/package.json +++ b/examples/framework-solid/package.json @@ -13,6 +13,6 @@ "astro": "^1.0.0-beta.30" }, "dependencies": { - "solid-js": "^1.4.1" + "solid-js": "^1.4.2" } } diff --git a/examples/framework-vue/package.json b/examples/framework-vue/package.json index 87a66b622..0def95cea 100644 --- a/examples/framework-vue/package.json +++ b/examples/framework-vue/package.json @@ -13,6 +13,6 @@ "astro": "^1.0.0-beta.30" }, "dependencies": { - "vue": "^3.2.33" + "vue": "^3.2.34" } } diff --git a/examples/integrations-playground/package.json b/examples/integrations-playground/package.json index 2d0f9bbc6..71f2b0d6c 100644 --- a/examples/integrations-playground/package.json +++ b/examples/integrations-playground/package.json @@ -17,7 +17,7 @@ "@astrojs/tailwind": "^0.2.1", "@astrojs/turbolinks": "^0.1.3", "astro": "^1.0.0-beta.30", - "solid-js": "^1.4.1" + "solid-js": "^1.4.2" }, "dependencies": { "@webcomponents/template-shadowroot": "^0.1.0", @@ -26,6 +26,6 @@ "react": "^18.1.0", "react-dom": "^18.1.0", "svelte": "^3.48.0", - "vue": "^3.2.33" + "vue": "^3.2.34" } } diff --git a/examples/with-markdown/package.json b/examples/with-markdown/package.json index fde4c54a8..bc8f719ea 100644 --- a/examples/with-markdown/package.json +++ b/examples/with-markdown/package.json @@ -21,6 +21,6 @@ "react": "^18.1.0", "react-dom": "^18.1.0", "svelte": "^3.48.0", - "vue": "^3.2.33" + "vue": "^3.2.34" } } diff --git a/examples/with-nanostores/package.json b/examples/with-nanostores/package.json index b5d982c39..fbe879c23 100644 --- a/examples/with-nanostores/package.json +++ b/examples/with-nanostores/package.json @@ -17,7 +17,7 @@ "react": "^18.1.0", "react-dom": "^18.1.0", "solid-nanostores": "0.0.6", - "vue": "^3.2.33" + "vue": "^3.2.34" }, "devDependencies": { "@astrojs/preact": "^0.1.2", diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index eed2d7235..8635d6760 100644 --- a/examples/with-tailwindcss/package.json +++ b/examples/with-tailwindcss/package.json @@ -13,7 +13,7 @@ "astro": "^1.0.0-beta.30", "autoprefixer": "^10.4.7", "canvas-confetti": "^1.5.1", - "postcss": "^8.4.13", + "postcss": "^8.4.14", "tailwindcss": "^3.0.24" } } diff --git a/packages/astro/package.json b/packages/astro/package.json index 3e47c20dd..81d448951 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -112,14 +112,14 @@ "ora": "^6.1.0", "path-browserify": "^1.0.1", "path-to-regexp": "^6.2.1", - "postcss": "^8.4.13", + "postcss": "^8.4.14", "postcss-load-config": "^3.1.4", "preferred-pm": "^3.0.3", "prismjs": "^1.28.0", "prompts": "^2.4.2", "recast": "^0.20.5", "resolve": "^1.22.0", - "rollup": "^2.73.0", + "rollup": "^2.74.0", "semver": "^7.3.7", "serialize-javascript": "^6.0.0", "shiki": "^0.10.1", diff --git a/packages/astro/test/fixtures/postcss/package.json b/packages/astro/test/fixtures/postcss/package.json index aca6baf22..ff4f0e14d 100644 --- a/packages/astro/test/fixtures/postcss/package.json +++ b/packages/astro/test/fixtures/postcss/package.json @@ -8,6 +8,6 @@ "@astrojs/vue": "workspace:*", "astro": "workspace:*", "autoprefixer": "^10.4.7", - "postcss": "^8.4.13" + "postcss": "^8.4.14" } } diff --git a/packages/astro/test/fixtures/react-component/package.json b/packages/astro/test/fixtures/react-component/package.json index 9e31be691..0ec620e09 100644 --- a/packages/astro/test/fixtures/react-component/package.json +++ b/packages/astro/test/fixtures/react-component/package.json @@ -8,6 +8,6 @@ "astro": "workspace:*", "react": "^18.1.0", "react-dom": "^18.1.0", - "vue": "^3.2.33" + "vue": "^3.2.34" } } diff --git a/packages/astro/test/fixtures/tailwindcss/package.json b/packages/astro/test/fixtures/tailwindcss/package.json index a98b0327c..dcf52d91b 100644 --- a/packages/astro/test/fixtures/tailwindcss/package.json +++ b/packages/astro/test/fixtures/tailwindcss/package.json @@ -6,7 +6,7 @@ "@astrojs/tailwind": "workspace:*", "astro": "workspace:*", "autoprefixer": "^10.4.7", - "postcss": "^8.4.13", + "postcss": "^8.4.14", "tailwindcss": "^3.0.24" } } diff --git a/packages/integrations/solid/package.json b/packages/integrations/solid/package.json index 8646d4165..6360a6c49 100644 --- a/packages/integrations/solid/package.json +++ b/packages/integrations/solid/package.json @@ -31,12 +31,12 @@ "dev": "astro-scripts dev \"src/**/*.ts\"" }, "dependencies": { - "babel-preset-solid": "^1.4.0" + "babel-preset-solid": "^1.4.2" }, "devDependencies": { "astro": "workspace:*", "astro-scripts": "workspace:*", - "solid-js": "^1.4.1" + "solid-js": "^1.4.2" }, "peerDependencies": { "solid-js": "^1.3.6" diff --git a/packages/integrations/tailwind/package.json b/packages/integrations/tailwind/package.json index 72ceaa701..68c0bbd65 100644 --- a/packages/integrations/tailwind/package.json +++ b/packages/integrations/tailwind/package.json @@ -29,7 +29,7 @@ "dependencies": { "@proload/core": "^0.3.2", "autoprefixer": "^10.4.7", - "postcss": "^8.4.13", + "postcss": "^8.4.14", "tailwindcss": "^3.0.24" }, "devDependencies": { diff --git a/packages/integrations/vue/package.json b/packages/integrations/vue/package.json index 65db54dbc..602706d65 100644 --- a/packages/integrations/vue/package.json +++ b/packages/integrations/vue/package.json @@ -37,7 +37,7 @@ "devDependencies": { "astro": "workspace:*", "astro-scripts": "workspace:*", - "vue": "^3.2.33" + "vue": "^3.2.34" }, "peerDependencies": { "vue": "^3.2.30" diff --git a/packages/webapi/package.json b/packages/webapi/package.json index 98715688c..fe34e238c 100644 --- a/packages/webapi/package.json +++ b/packages/webapi/package.json @@ -66,7 +66,7 @@ "magic-string": "^0.25.9", "mocha": "^9.2.2", "node-fetch": "^3.2.4", - "rollup": "^2.73.0", + "rollup": "^2.74.0", "rollup-plugin-terser": "^7.0.2", "tslib": "^2.4.0", "typescript": "^4.6.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 50dff712d..83170c764 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -157,18 +157,18 @@ importers: preact: ^10.7.2 react: ^18.1.0 react-dom: ^18.1.0 - solid-js: ^1.4.1 + solid-js: ^1.4.2 svelte: ^3.48.0 - vue: ^3.2.33 + vue: ^3.2.34 dependencies: '@webcomponents/template-shadowroot': 0.1.0 lit: 2.2.4 preact: 10.7.2 react: 18.1.0 react-dom: 18.1.0_react@18.1.0 - solid-js: 1.4.1 + solid-js: 1.4.2 svelte: 3.48.0 - vue: 3.2.33 + vue: 3.2.34 devDependencies: '@astrojs/lit': link:../../packages/integrations/lit '@astrojs/preact': link:../../packages/integrations/preact @@ -210,9 +210,9 @@ importers: specifiers: '@astrojs/solid-js': ^0.1.2 astro: ^1.0.0-beta.30 - solid-js: ^1.4.1 + solid-js: ^1.4.2 dependencies: - solid-js: 1.4.1 + solid-js: 1.4.2 devDependencies: '@astrojs/solid-js': link:../../packages/integrations/solid astro: link:../../packages/astro @@ -232,9 +232,9 @@ importers: specifiers: '@astrojs/vue': ^0.1.4 astro: ^1.0.0-beta.30 - vue: ^3.2.33 + vue: ^3.2.34 dependencies: - vue: 3.2.33 + vue: 3.2.34 devDependencies: '@astrojs/vue': link:../../packages/integrations/vue astro: link:../../packages/astro @@ -254,9 +254,9 @@ importers: preact: ^10.7.2 react: ^18.1.0 react-dom: ^18.1.0 - solid-js: ^1.4.1 + solid-js: ^1.4.2 svelte: ^3.48.0 - vue: ^3.2.33 + vue: ^3.2.34 dependencies: '@webcomponents/template-shadowroot': 0.1.0 lit: 2.2.4 @@ -264,7 +264,7 @@ importers: react: 18.1.0 react-dom: 18.1.0_react@18.1.0 svelte: 3.48.0 - vue: 3.2.33 + vue: 3.2.34 devDependencies: '@astrojs/lit': link:../../packages/integrations/lit '@astrojs/partytown': link:../../packages/integrations/partytown @@ -274,7 +274,7 @@ importers: '@astrojs/tailwind': link:../../packages/integrations/tailwind '@astrojs/turbolinks': link:../../packages/integrations/turbolinks astro: link:../../packages/astro - solid-js: 1.4.1 + solid-js: 1.4.2 examples/minimal: specifiers: @@ -355,13 +355,13 @@ importers: react: ^18.1.0 react-dom: ^18.1.0 svelte: ^3.48.0 - vue: ^3.2.33 + vue: ^3.2.34 dependencies: preact: 10.7.2 react: 18.1.0 react-dom: 18.1.0_react@18.1.0 svelte: 3.48.0 - vue: 3.2.33 + vue: 3.2.34 devDependencies: '@astrojs/markdown-remark': link:../../packages/markdown/remark '@astrojs/preact': link:../../packages/integrations/preact @@ -412,17 +412,17 @@ importers: react: ^18.1.0 react-dom: ^18.1.0 solid-nanostores: 0.0.6 - vue: ^3.2.33 + vue: ^3.2.34 dependencies: '@nanostores/preact': 0.1.3_57fvx76pa5saeyi2u347ideiqy '@nanostores/react': 0.1.5_ib7jseorxmnfrhevtrqzsp5cr4 - '@nanostores/vue': 0.4.1_vboeo7axrmyjwprm7hcgpjx6rm + '@nanostores/vue': 0.4.1_abgv3lyim3o3bwlwlj5wplxdli nanostores: 0.5.12 preact: 10.7.2 react: 18.1.0 react-dom: 18.1.0_react@18.1.0 solid-nanostores: 0.0.6 - vue: 3.2.33 + vue: 3.2.34 devDependencies: '@astrojs/preact': link:../../packages/integrations/preact '@astrojs/react': link:../../packages/integrations/react @@ -437,14 +437,14 @@ importers: astro: ^1.0.0-beta.30 autoprefixer: ^10.4.7 canvas-confetti: ^1.5.1 - postcss: ^8.4.13 + postcss: ^8.4.14 tailwindcss: ^3.0.24 devDependencies: '@astrojs/tailwind': link:../../packages/integrations/tailwind astro: link:../../packages/astro - autoprefixer: 10.4.7_postcss@8.4.13 + autoprefixer: 10.4.7_postcss@8.4.14 canvas-confetti: 1.5.1 - postcss: 8.4.13 + postcss: 8.4.14 tailwindcss: 3.0.24 examples/with-vite-plugin-pwa: @@ -521,14 +521,14 @@ importers: ora: ^6.1.0 path-browserify: ^1.0.1 path-to-regexp: ^6.2.1 - postcss: ^8.4.13 + postcss: ^8.4.14 postcss-load-config: ^3.1.4 preferred-pm: ^3.0.3 prismjs: ^1.28.0 prompts: ^2.4.2 recast: ^0.20.5 resolve: ^1.22.0 - rollup: ^2.73.0 + rollup: ^2.74.0 sass: ^1.51.0 semver: ^7.3.7 serialize-javascript: ^6.0.0 @@ -581,14 +581,14 @@ importers: ora: 6.1.0 path-browserify: 1.0.1 path-to-regexp: 6.2.1 - postcss: 8.4.13 - postcss-load-config: 3.1.4_postcss@8.4.13 + postcss: 8.4.14 + postcss-load-config: 3.1.4_postcss@8.4.14 preferred-pm: 3.0.3 prismjs: 1.28.0 prompts: 2.4.2 recast: 0.20.5 resolve: 1.22.0 - rollup: 2.73.0 + rollup: 2.74.0 semver: 7.3.7 serialize-javascript: 6.0.0 shiki: 0.10.1 @@ -1101,14 +1101,14 @@ importers: '@astrojs/vue': workspace:* astro: workspace:* autoprefixer: ^10.4.7 - postcss: ^8.4.13 + postcss: ^8.4.14 dependencies: '@astrojs/solid-js': link:../../../../integrations/solid '@astrojs/svelte': link:../../../../integrations/svelte '@astrojs/vue': link:../../../../integrations/vue astro: link:../../.. - autoprefixer: 10.4.7_postcss@8.4.13 - postcss: 8.4.13 + autoprefixer: 10.4.7_postcss@8.4.14 + postcss: 8.4.14 packages/astro/test/fixtures/preact-component: specifiers: @@ -1125,14 +1125,14 @@ importers: astro: workspace:* react: ^18.1.0 react-dom: ^18.1.0 - vue: ^3.2.33 + vue: ^3.2.34 dependencies: '@astrojs/react': link:../../../../integrations/react '@astrojs/vue': link:../../../../integrations/vue astro: link:../../.. react: 18.1.0 react-dom: 18.1.0_react@18.1.0 - vue: 3.2.33 + vue: 3.2.34 packages/astro/test/fixtures/remote-css: specifiers: @@ -1266,13 +1266,13 @@ importers: '@astrojs/tailwind': workspace:* astro: workspace:* autoprefixer: ^10.4.7 - postcss: ^8.4.13 + postcss: ^8.4.14 tailwindcss: ^3.0.24 dependencies: '@astrojs/tailwind': link:../../../../integrations/tailwind astro: link:../../.. - autoprefixer: 10.4.7_postcss@8.4.13 - postcss: 8.4.13 + autoprefixer: 10.4.7_postcss@8.4.14 + postcss: 8.4.14 tailwindcss: 3.0.24 packages/astro/test/fixtures/vue-component: @@ -1475,14 +1475,14 @@ importers: specifiers: astro: workspace:* astro-scripts: workspace:* - babel-preset-solid: ^1.4.0 - solid-js: ^1.4.1 + babel-preset-solid: ^1.4.2 + solid-js: ^1.4.2 dependencies: - babel-preset-solid: 1.4.0 + babel-preset-solid: 1.4.2 devDependencies: astro: link:../../astro astro-scripts: link:../../../scripts - solid-js: 1.4.1 + solid-js: 1.4.2 packages/integrations/svelte: specifiers: @@ -1510,12 +1510,12 @@ importers: astro: workspace:* astro-scripts: workspace:* autoprefixer: ^10.4.7 - postcss: ^8.4.13 + postcss: ^8.4.14 tailwindcss: ^3.0.24 dependencies: '@proload/core': 0.3.2 - autoprefixer: 10.4.7_postcss@8.4.13 - postcss: 8.4.13 + autoprefixer: 10.4.7_postcss@8.4.14 + postcss: 8.4.14 tailwindcss: 3.0.24 devDependencies: '@types/tailwindcss': 3.0.10 @@ -1552,14 +1552,14 @@ importers: astro: workspace:* astro-scripts: workspace:* vite: ^2.9.9 - vue: ^3.2.33 + vue: ^3.2.34 dependencies: - '@vitejs/plugin-vue': 2.3.3_vite@2.9.9+vue@3.2.33 + '@vitejs/plugin-vue': 2.3.3_vite@2.9.9+vue@3.2.34 vite: 2.9.9 devDependencies: astro: link:../../astro astro-scripts: link:../../../scripts - vue: 3.2.33 + vue: 3.2.34 packages/markdown/remark: specifiers: @@ -1659,17 +1659,17 @@ importers: magic-string: ^0.25.9 mocha: ^9.2.2 node-fetch: ^3.2.4 - rollup: ^2.73.0 + rollup: ^2.74.0 rollup-plugin-terser: ^7.0.2 tslib: ^2.4.0 typescript: ^4.6.4 urlpattern-polyfill: ^1.0.0-rc5 web-streams-polyfill: ^3.2.1 devDependencies: - '@rollup/plugin-alias': 3.1.9_rollup@2.73.0 - '@rollup/plugin-inject': 4.0.4_rollup@2.73.0 - '@rollup/plugin-node-resolve': 13.3.0_rollup@2.73.0 - '@rollup/plugin-typescript': 8.3.2_qvmxwb53ll4ofwdq3bekbs74hi + '@rollup/plugin-alias': 3.1.9_rollup@2.74.0 + '@rollup/plugin-inject': 4.0.4_rollup@2.74.0 + '@rollup/plugin-node-resolve': 13.3.0_rollup@2.74.0 + '@rollup/plugin-typescript': 8.3.2_dwhto3eknlchw7qifl3asmnahy '@types/chai': 4.3.1 '@types/mocha': 9.1.1 '@types/node': 14.18.18 @@ -1682,8 +1682,8 @@ importers: magic-string: 0.25.9 mocha: 9.2.2 node-fetch: 3.2.4 - rollup: 2.73.0 - rollup-plugin-terser: 7.0.2_rollup@2.73.0 + rollup: 2.74.0 + rollup-plugin-terser: 7.0.2_rollup@2.74.0 tslib: 2.4.0 typescript: 4.6.4 urlpattern-polyfill: 1.0.0-rc5 @@ -3641,7 +3641,7 @@ packages: react-dom: 18.1.0_react@18.1.0 dev: false - /@nanostores/vue/0.4.1_vboeo7axrmyjwprm7hcgpjx6rm: + /@nanostores/vue/0.4.1_abgv3lyim3o3bwlwlj5wplxdli: resolution: {integrity: sha512-b0nNzKD2fTi8R48Jrlg6j+/InPH9r1HOl0iOnpNmL84BOxl+jQnbgyzNlf+3VWAEQSD955hJ/HTl/N1bjJSz5g==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} peerDependencies: @@ -3653,7 +3653,7 @@ packages: optional: true dependencies: nanostores: 0.5.12 - vue: 3.2.33 + vue: 3.2.34 dev: false /@netlify/edge-handler-types/0.34.1: @@ -3823,17 +3823,17 @@ packages: tsm: 2.2.1 dev: false - /@rollup/plugin-alias/3.1.9_rollup@2.73.0: + /@rollup/plugin-alias/3.1.9_rollup@2.74.0: resolution: {integrity: sha512-QI5fsEvm9bDzt32k39wpOwZhVzRcL5ydcffUHMyLVaVaLeC70I8TJZ17F1z1eMoLu4E/UOcH9BWVkKpIKdrfiw==} engines: {node: '>=8.0.0'} peerDependencies: rollup: ^1.20.0||^2.0.0 dependencies: - rollup: 2.73.0 + rollup: 2.74.0 slash: 3.0.0 dev: true - /@rollup/plugin-babel/5.3.1_cozkpsv5bxi2sl4sehld7oc7ze: + /@rollup/plugin-babel/5.3.1_swzzuhxpnwpceuiankqfict4vm: resolution: {integrity: sha512-WFfdLWU/xVWKeRQnKmIAQULUI7Il0gZnBIH/ZFO069wYIfPu+8zrfp/KMW0atmELoRDq8FbiP3VCss9MhCut7Q==} engines: {node: '>= 10.0.0'} peerDependencies: @@ -3848,62 +3848,62 @@ packages: dependencies: '@babel/core': 7.17.12 '@babel/helper-module-imports': 7.16.7 - '@rollup/pluginutils': 3.1.0_rollup@2.73.0 - rollup: 2.73.0 + '@rollup/pluginutils': 3.1.0_rollup@2.74.0 + rollup: 2.74.0 dev: true - /@rollup/plugin-inject/4.0.4_rollup@2.73.0: + /@rollup/plugin-inject/4.0.4_rollup@2.74.0: resolution: {integrity: sha512-4pbcU4J/nS+zuHk+c+OL3WtmEQhqxlZ9uqfjQMQDOHOPld7PsCd8k5LWs8h5wjwJN7MgnAn768F2sDxEP4eNFQ==} peerDependencies: rollup: ^1.20.0 || ^2.0.0 dependencies: - '@rollup/pluginutils': 3.1.0_rollup@2.73.0 + '@rollup/pluginutils': 3.1.0_rollup@2.74.0 estree-walker: 2.0.2 magic-string: 0.25.9 - rollup: 2.73.0 + rollup: 2.74.0 dev: true - /@rollup/plugin-node-resolve/11.2.1_rollup@2.73.0: + /@rollup/plugin-node-resolve/11.2.1_rollup@2.74.0: resolution: {integrity: sha512-yc2n43jcqVyGE2sqV5/YCmocy9ArjVAP/BeXyTtADTBBX6V0e5UMqwO8CdQ0kzjb6zu5P1qMzsScCMRvE9OlVg==} engines: {node: '>= 10.0.0'} peerDependencies: rollup: ^1.20.0||^2.0.0 dependencies: - '@rollup/pluginutils': 3.1.0_rollup@2.73.0 + '@rollup/pluginutils': 3.1.0_rollup@2.74.0 '@types/resolve': 1.17.1 builtin-modules: 3.3.0 deepmerge: 4.2.2 is-module: 1.0.0 resolve: 1.22.0 - rollup: 2.73.0 + rollup: 2.74.0 dev: true - /@rollup/plugin-node-resolve/13.3.0_rollup@2.73.0: + /@rollup/plugin-node-resolve/13.3.0_rollup@2.74.0: resolution: {integrity: sha512-Lus8rbUo1eEcnS4yTFKLZrVumLPY+YayBdWXgFSHYhTT2iJbMhoaaBL3xl5NCdeRytErGr8tZ0L71BMRmnlwSw==} engines: {node: '>= 10.0.0'} peerDependencies: rollup: ^2.42.0 dependencies: - '@rollup/pluginutils': 3.1.0_rollup@2.73.0 + '@rollup/pluginutils': 3.1.0_rollup@2.74.0 '@types/resolve': 1.17.1 deepmerge: 4.2.2 is-builtin-module: 3.1.0 is-module: 1.0.0 resolve: 1.22.0 - rollup: 2.73.0 + rollup: 2.74.0 dev: true - /@rollup/plugin-replace/2.4.2_rollup@2.73.0: + /@rollup/plugin-replace/2.4.2_rollup@2.74.0: resolution: {integrity: sha512-IGcu+cydlUMZ5En85jxHH4qj2hta/11BHq95iHEyb2sbgiN0eCdzvUcHw5gt9pBL5lTi4JDYJ1acCoMGpTvEZg==} peerDependencies: rollup: ^1.20.0 || ^2.0.0 dependencies: - '@rollup/pluginutils': 3.1.0_rollup@2.73.0 + '@rollup/pluginutils': 3.1.0_rollup@2.74.0 magic-string: 0.25.9 - rollup: 2.73.0 + rollup: 2.74.0 dev: true - /@rollup/plugin-typescript/8.3.2_qvmxwb53ll4ofwdq3bekbs74hi: + /@rollup/plugin-typescript/8.3.2_dwhto3eknlchw7qifl3asmnahy: resolution: {integrity: sha512-MtgyR5LNHZr3GyN0tM7gNO9D0CS+Y+vflS4v/PHmrX17JCkHUYKvQ5jN5o3cz1YKllM3duXUqu3yOHwMPUxhDg==} engines: {node: '>=8.0.0'} peerDependencies: @@ -3911,14 +3911,14 @@ packages: tslib: '*' typescript: '>=3.7.0' dependencies: - '@rollup/pluginutils': 3.1.0_rollup@2.73.0 + '@rollup/pluginutils': 3.1.0_rollup@2.74.0 resolve: 1.22.0 - rollup: 2.73.0 + rollup: 2.74.0 tslib: 2.4.0 typescript: 4.6.4 dev: true - /@rollup/pluginutils/3.1.0_rollup@2.73.0: + /@rollup/pluginutils/3.1.0_rollup@2.74.0: resolution: {integrity: sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==} engines: {node: '>= 8.0.0'} peerDependencies: @@ -3927,7 +3927,7 @@ packages: '@types/estree': 0.0.39 estree-walker: 1.0.1 picomatch: 2.3.1 - rollup: 2.73.0 + rollup: 2.74.0 dev: true /@rollup/pluginutils/4.2.1: @@ -4511,7 +4511,7 @@ packages: - supports-color dev: false - /@vitejs/plugin-vue/2.3.3_vite@2.9.9+vue@3.2.33: + /@vitejs/plugin-vue/2.3.3_vite@2.9.9+vue@3.2.34: resolution: {integrity: sha512-SmQLDyhz+6lGJhPELsBdzXGc+AcaT8stgkbiTFGpXPe8Tl1tJaBw1A6pxDqDuRsVkD8uscrkx3hA7QDOoKYtyw==} engines: {node: '>=12.0.0'} peerDependencies: @@ -4522,7 +4522,7 @@ packages: optional: true dependencies: vite: 2.9.9 - vue: 3.2.33 + vue: 3.2.34 dev: false /@vscode/emmet-helper/2.8.4: @@ -4536,46 +4536,46 @@ packages: vscode-uri: 2.1.2 dev: false - /@vue/compiler-core/3.2.33: - resolution: {integrity: sha512-AAmr52ji3Zhk7IKIuigX2osWWsb2nQE5xsdFYjdnmtQ4gymmqXbjLvkSE174+fF3A3kstYrTgGkqgOEbsdLDpw==} + /@vue/compiler-core/3.2.34: + resolution: {integrity: sha512-Y53lv04ZhDfqflhk4yEgBZrCL1RipbxqmqJFfl1PRkjOzt0bvJpf1sCNN81QNfXohVwFGf+Hng2ztwLwOZgbuA==} dependencies: '@babel/parser': 7.17.12 - '@vue/shared': 3.2.33 + '@vue/shared': 3.2.34 estree-walker: 2.0.2 source-map: 0.6.1 - /@vue/compiler-dom/3.2.33: - resolution: {integrity: sha512-GhiG1C8X98Xz9QUX/RlA6/kgPBWJkjq0Rq6//5XTAGSYrTMBgcLpP9+CnlUg1TFxnnCVughAG+KZl28XJqw8uQ==} + /@vue/compiler-dom/3.2.34: + resolution: {integrity: sha512-MFLUYDgy0aES9x1goU/pgxpzgT9IZOndO8qwQVSyVfUvl/CywEBtfBi5+8fsiBDhoGIT7g8qcsUUF1NYViU2vQ==} dependencies: - '@vue/compiler-core': 3.2.33 - '@vue/shared': 3.2.33 + '@vue/compiler-core': 3.2.34 + '@vue/shared': 3.2.34 - /@vue/compiler-sfc/3.2.33: - resolution: {integrity: sha512-H8D0WqagCr295pQjUYyO8P3IejM3vEzeCO1apzByAEaAR/WimhMYczHfZVvlCE/9yBaEu/eu9RdiWr0kF8b71Q==} + /@vue/compiler-sfc/3.2.34: + resolution: {integrity: sha512-I+vT4soKJtdsoREBDYAcz56+yGpZ5T3GUigvBFgC2yTeTtBtREOPzYw8kZyMuD2ZlryPYBkbV8D9xxcvU0j/aw==} dependencies: '@babel/parser': 7.17.12 - '@vue/compiler-core': 3.2.33 - '@vue/compiler-dom': 3.2.33 - '@vue/compiler-ssr': 3.2.33 - '@vue/reactivity-transform': 3.2.33 - '@vue/shared': 3.2.33 + '@vue/compiler-core': 3.2.34 + '@vue/compiler-dom': 3.2.34 + '@vue/compiler-ssr': 3.2.34 + '@vue/reactivity-transform': 3.2.34 + '@vue/shared': 3.2.34 estree-walker: 2.0.2 magic-string: 0.25.9 - postcss: 8.4.13 + postcss: 8.4.14 source-map: 0.6.1 - /@vue/compiler-ssr/3.2.33: - resolution: {integrity: sha512-XQh1Xdk3VquDpXsnoCd7JnMoWec9CfAzQDQsaMcSU79OrrO2PNR0ErlIjm/mGq3GmBfkQjzZACV+7GhfRB8xMQ==} + /@vue/compiler-ssr/3.2.34: + resolution: {integrity: sha512-zyaMdGJhxoA34ibWsXF7VH1PO5yrNB1MZg/ByRfXGM8JefGQaz+PpHvBy/5OI0ehEyhAyCb7279JdhYHacMZbw==} dependencies: - '@vue/compiler-dom': 3.2.33 - '@vue/shared': 3.2.33 + '@vue/compiler-dom': 3.2.34 + '@vue/shared': 3.2.34 - /@vue/reactivity-transform/3.2.33: - resolution: {integrity: sha512-4UL5KOIvSQb254aqenW4q34qMXbfZcmEsV/yVidLUgvwYQQ/D21bGX3DlgPUGI3c4C+iOnNmDCkIxkILoX/Pyw==} + /@vue/reactivity-transform/3.2.34: + resolution: {integrity: sha512-OtsrL4/i6Md279pMhZ8wRijeDhPSdnXrH9wmqAcKDhVcp1L2kSWlgVVLa1jGIyyFYE806YiJNJiGBvXPGXMzxw==} dependencies: '@babel/parser': 7.17.12 - '@vue/compiler-core': 3.2.33 - '@vue/shared': 3.2.33 + '@vue/compiler-core': 3.2.34 + '@vue/shared': 3.2.34 estree-walker: 2.0.2 magic-string: 0.25.9 @@ -4585,39 +4585,39 @@ packages: '@vue/shared': 3.1.5 dev: false - /@vue/reactivity/3.2.33: - resolution: {integrity: sha512-62Sq0mp9/0bLmDuxuLD5CIaMG2susFAGARLuZ/5jkU1FCf9EDbwUuF+BO8Ub3Rbodx0ziIecM/NsmyjardBxfQ==} + /@vue/reactivity/3.2.34: + resolution: {integrity: sha512-xbRIOPqxdNOr0zS47moRS6zf4BKd0z+55R85UJlo4r5ezqCktk6fYy1atY4tGzo7Maqh6QoKw3LtIKvpz8d7WA==} dependencies: - '@vue/shared': 3.2.33 + '@vue/shared': 3.2.34 - /@vue/runtime-core/3.2.33: - resolution: {integrity: sha512-N2D2vfaXsBPhzCV3JsXQa2NECjxP3eXgZlFqKh4tgakp3iX6LCGv76DLlc+IfFZq+TW10Y8QUfeihXOupJ1dGw==} + /@vue/runtime-core/3.2.34: + resolution: {integrity: sha512-GtaHqYiuEb56OA0cbMh20UPpDiXGRX+NS1buKif4OL341JJ3NtmNOIchCzknaN76oN6KqrLiO82/+TEZXl2Xtw==} dependencies: - '@vue/reactivity': 3.2.33 - '@vue/shared': 3.2.33 + '@vue/reactivity': 3.2.34 + '@vue/shared': 3.2.34 - /@vue/runtime-dom/3.2.33: - resolution: {integrity: sha512-LSrJ6W7CZTSUygX5s8aFkraDWlO6K4geOwA3quFF2O+hC3QuAMZt/0Xb7JKE3C4JD4pFwCSO7oCrZmZ0BIJUnw==} + /@vue/runtime-dom/3.2.34: + resolution: {integrity: sha512-uqizbaJqmNH3O4TRr+8cM1tid5ODWHyQYZ3CLWcjn3dLkf0N7wvNuhUELQUZU/wQLvVMhJUQNrmOqckHLm6Xpw==} dependencies: - '@vue/runtime-core': 3.2.33 - '@vue/shared': 3.2.33 + '@vue/runtime-core': 3.2.34 + '@vue/shared': 3.2.34 csstype: 2.6.20 - /@vue/server-renderer/3.2.33_vue@3.2.33: - resolution: {integrity: sha512-4jpJHRD4ORv8PlbYi+/MfP8ec1okz6rybe36MdpkDrGIdEItHEUyaHSKvz+ptNEyQpALmmVfRteHkU9F8vxOew==} + /@vue/server-renderer/3.2.34_vue@3.2.34: + resolution: {integrity: sha512-PMnBAq1BexPFXBxuLngp4lQvc0XQD1CBDIHtEsG0pRusGWVJddBUKlR/EnnSvGaJ34YmKkAl9kdvczOz0kddew==} peerDependencies: - vue: 3.2.33 + vue: 3.2.34 dependencies: - '@vue/compiler-ssr': 3.2.33 - '@vue/shared': 3.2.33 - vue: 3.2.33 + '@vue/compiler-ssr': 3.2.34 + '@vue/shared': 3.2.34 + vue: 3.2.34 /@vue/shared/3.1.5: resolution: {integrity: sha512-oJ4F3TnvpXaQwZJNF3ZK+kLPHKarDmJjJ6jyzVNDKH9md1dptjC7lWR//jrGuLdek/U6iltWxqAnYOu8gCiOvA==} dev: false - /@vue/shared/3.2.33: - resolution: {integrity: sha512-UBc1Pg1T3yZ97vsA2ueER0F6GbJebLHYlEi4ou1H5YL4KWvMOOWwpYo9/QpWq93wxKG6Wo13IY74Hcn/f7c7Bg==} + /@vue/shared/3.2.34: + resolution: {integrity: sha512-zhEeB8TrFmTXmTXmu/wcjEhgrjO4xqdDQrCdPhjX7NxfoLqoBVKguOm8qyihWNLbP+41svYY4za9mqXyqFLzNg==} /@webcomponents/template-shadowroot/0.1.0: resolution: {integrity: sha512-ry84Vft6xtRBbd4M/ptRodbOLodV5AD15TYhyRghCRgIcJJKmYmJ2v2BaaWxygENwh6Uq3zTfGPmlckKT/GXsQ==} @@ -4877,7 +4877,7 @@ packages: engines: {node: '>= 4.0.0'} dev: true - /autoprefixer/10.4.7_postcss@8.4.13: + /autoprefixer/10.4.7_postcss@8.4.14: resolution: {integrity: sha512-ypHju4Y2Oav95SipEcCcI5J7CGPuvz8oat7sUtYj3ClK44bldfvtvcxK6IEK++7rqB7YchDGzweZIBG+SD0ZAA==} engines: {node: ^10 || ^12 || >=14} hasBin: true @@ -4889,7 +4889,7 @@ packages: fraction.js: 4.2.0 normalize-range: 0.1.2 picocolors: 1.0.0 - postcss: 8.4.13 + postcss: 8.4.14 postcss-value-parser: 4.2.0 /available-typed-arrays/1.0.5: @@ -4903,8 +4903,8 @@ packages: object.assign: 4.1.2 dev: true - /babel-plugin-jsx-dom-expressions/0.33.0: - resolution: {integrity: sha512-f70XzLfr+x8pOxRAZPNe7MBaILcgIp10RE6AVA7BZqtZYclsT/h/9Bj2GZU6rXG+ud1fEZCW1lAIt6gv9kt3Cw==} + /babel-plugin-jsx-dom-expressions/0.33.7: + resolution: {integrity: sha512-2RsP7+i8KAd7EPxw3L1mJ9YGhxF56YJ0qQgWgPRiWWECzmxd3RYc+gaIwPw0yZRTN5Z0xQfa+3yTdNgDzq36dQ==} dependencies: '@babel/helper-module-imports': 7.16.0 '@babel/plugin-syntax-jsx': 7.17.12 @@ -4959,10 +4959,10 @@ packages: - supports-color dev: true - /babel-preset-solid/1.4.0: - resolution: {integrity: sha512-mcnAtsQj4cxX+rPomhH+XgNunTFxW6CnkyaD9nZqzpcBULtfSTnqqlfFx0+OqaD5/71Q90UgOSNv7NJp+GGU4g==} + /babel-preset-solid/1.4.2: + resolution: {integrity: sha512-dDAYTT4UcBvUjdnlf1SOBNTospI/L1wWyzrMxEie3B4Auofo0lSFaCc95Pn5AZY8sdAew13Rp4a1ImByIsZlsQ==} dependencies: - babel-plugin-jsx-dom-expressions: 0.33.0 + babel-plugin-jsx-dom-expressions: 0.33.7 transitivePeerDependencies: - '@babel/core' dev: false @@ -7686,12 +7686,12 @@ packages: unist-util-visit: 3.1.0 dev: false - /mdast-util-find-and-replace/2.1.0: - resolution: {integrity: sha512-1w1jbqAd13oU78QPBf5223+xB+37ecNtQ1JElq2feWols5oEYAl+SgNDnOZipe7NfLemoEt362yUS15/wip4mw==} + /mdast-util-find-and-replace/2.2.0: + resolution: {integrity: sha512-bz8hUWkMX7UcasORORcyBEsTKJ+dBiFwRPrm43hHC9NMRylIMLbfO5rwfeCN+UtY4AAi7s8WqXftb9eX6ZsqCg==} dependencies: escape-string-regexp: 5.0.0 unist-util-is: 5.1.1 - unist-util-visit-parents: 4.1.1 + unist-util-visit-parents: 5.1.0 dev: false /mdast-util-from-markdown/1.2.0: @@ -7718,7 +7718,7 @@ packages: dependencies: '@types/mdast': 3.0.10 ccount: 2.0.1 - mdast-util-find-and-replace: 2.1.0 + mdast-util-find-and-replace: 2.2.0 micromark-util-character: 1.1.0 dev: false @@ -8842,14 +8842,14 @@ packages: hasBin: true dev: true - /postcss-js/4.0.0_postcss@8.4.13: + /postcss-js/4.0.0_postcss@8.4.14: resolution: {integrity: sha512-77QESFBwgX4irogGVPgQ5s07vLvFqWr228qZY+w6lW599cRlK/HmnlivnnVUxkjHnCu4J16PDMHcH+e+2HbvTQ==} engines: {node: ^12 || ^14 || >= 16} peerDependencies: postcss: ^8.3.3 dependencies: camelcase-css: 2.0.1 - postcss: 8.4.13 + postcss: 8.4.14 /postcss-load-config/3.1.4: resolution: {integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==} @@ -8867,7 +8867,7 @@ packages: yaml: 1.10.2 dev: false - /postcss-load-config/3.1.4_postcss@8.4.13: + /postcss-load-config/3.1.4_postcss@8.4.14: resolution: {integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==} engines: {node: '>= 10'} peerDependencies: @@ -8880,16 +8880,16 @@ packages: optional: true dependencies: lilconfig: 2.0.5 - postcss: 8.4.13 + postcss: 8.4.14 yaml: 1.10.2 - /postcss-nested/5.0.6_postcss@8.4.13: + /postcss-nested/5.0.6_postcss@8.4.14: resolution: {integrity: sha512-rKqm2Fk0KbA8Vt3AdGN0FB9OBOMDVajMG6ZCf/GoHgdxUJ4sBFp0A/uMIRm+MJUdo33YXEtjqIz8u7DAp8B7DA==} engines: {node: '>=12.0'} peerDependencies: postcss: ^8.2.14 dependencies: - postcss: 8.4.13 + postcss: 8.4.14 postcss-selector-parser: 6.0.10 /postcss-selector-parser/6.0.10: @@ -8902,8 +8902,8 @@ packages: /postcss-value-parser/4.2.0: resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} - /postcss/8.4.13: - resolution: {integrity: sha512-jtL6eTBrza5MPzy8oJLFuUscHDXTV5KcLlqAWHl5q5WYRfnNRGSmOZmOZ1T6Gy7A99mOZfqungmZMpMmCVJ8ZA==} + /postcss/8.4.14: + resolution: {integrity: sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==} engines: {node: ^10 || ^12 || >=14} dependencies: nanoid: 3.3.4 @@ -9441,14 +9441,14 @@ packages: dependencies: glob: 7.2.3 - /rollup-plugin-terser/7.0.2_rollup@2.73.0: + /rollup-plugin-terser/7.0.2_rollup@2.74.0: resolution: {integrity: sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==} peerDependencies: rollup: ^2.0.0 dependencies: '@babel/code-frame': 7.16.7 jest-worker: 26.6.2 - rollup: 2.73.0 + rollup: 2.74.0 serialize-javascript: 4.0.0 terser: 5.13.1 dev: true @@ -9459,8 +9459,8 @@ packages: estree-walker: 0.6.1 dev: false - /rollup/2.73.0: - resolution: {integrity: sha512-h/UngC3S4Zt28mB3g0+2YCMegT5yoftnQplwzPqGZcKvlld5e+kT/QRmJiL+qxGyZKOYpgirWGdLyEO1b0dpLQ==} + /rollup/2.74.0: + resolution: {integrity: sha512-RRwXTX5+ObPJhcMV6zP3RdHvy90/lBOUfbzL7IKkFjMJGAqeBGZiv9nZWm/DoTESaTE3GBkkzbU9QVN2AuCkjw==} engines: {node: '>=10.0.0'} hasBin: true optionalDependencies: @@ -9734,14 +9734,14 @@ packages: smart-buffer: 4.2.0 dev: true - /solid-js/1.4.1: - resolution: {integrity: sha512-ts480PccmUW9WAludSXET2dbBevjv+l6XMmN/OyG/a/xA8ZQoX4hNBN3gGhW785ZZv90fowbUSuSQUwOISm3YA==} + /solid-js/1.4.2: + resolution: {integrity: sha512-IU5yKuT8P/n5F5g8j1rTXqxUdPYmoZDk/074TG94AEYf/nyXAeG82BSge4/lLIbCfUcnGUJ6DRdebIjujOAYyg==} /solid-nanostores/0.0.6: resolution: {integrity: sha512-iwbgdBzQSxBKoxkzaZgC9MGGUsHWJ74at9i7FF0naoqtwGuKdLYOgOJ9QRlA353DHDS/ttH2e0SRS6s3gz8NLQ==} dependencies: nanostores: 0.5.12 - solid-js: 1.4.1 + solid-js: 1.4.2 dev: false /sorcery/0.10.0: @@ -10116,10 +10116,10 @@ packages: normalize-path: 3.0.0 object-hash: 3.0.0 picocolors: 1.0.0 - postcss: 8.4.13 - postcss-js: 4.0.0_postcss@8.4.13 - postcss-load-config: 3.1.4_postcss@8.4.13 - postcss-nested: 5.0.6_postcss@8.4.13 + postcss: 8.4.14 + postcss-js: 4.0.0_postcss@8.4.14 + postcss-load-config: 3.1.4_postcss@8.4.14 + postcss-nested: 5.0.6_postcss@8.4.14 postcss-selector-parser: 6.0.10 postcss-value-parser: 4.2.0 quick-lru: 5.1.1 @@ -10778,7 +10778,7 @@ packages: debug: 4.3.4 fast-glob: 3.2.11 pretty-bytes: 5.6.0 - rollup: 2.73.0 + rollup: 2.74.0 workbox-build: 6.5.3 workbox-window: 6.5.3 transitivePeerDependencies: @@ -10803,9 +10803,9 @@ packages: optional: true dependencies: esbuild: 0.14.39 - postcss: 8.4.13 + postcss: 8.4.14 resolve: 1.22.0 - rollup: 2.73.0 + rollup: 2.74.0 optionalDependencies: fsevents: 2.3.2 dev: false @@ -10827,9 +10827,9 @@ packages: optional: true dependencies: esbuild: 0.14.39 - postcss: 8.4.13 + postcss: 8.4.14 resolve: 1.22.0 - rollup: 2.73.0 + rollup: 2.74.0 sass: 1.51.0 optionalDependencies: fsevents: 2.3.2 @@ -10925,14 +10925,14 @@ packages: resolution: {integrity: sha512-EcswR2S8bpR7fD0YPeS7r2xXExrScVMxg4MedACaWHEtx9ftCF/qHG1xGkolzTPcEmjTavCQgbVzHUIdTMzFGA==} dev: false - /vue/3.2.33: - resolution: {integrity: sha512-si1ExAlDUrLSIg/V7D/GgA4twJwfsfgG+t9w10z38HhL/HA07132pUQ2KuwAo8qbCyMJ9e6OqrmWrOCr+jW7ZQ==} + /vue/3.2.34: + resolution: {integrity: sha512-gXRg5v8OSmGT4ZiQ/X/Pcz6Fr2igHQx/wvRH/pLnt0VvjfGGqrwhnwjYZilLP4HBcO211rMD9PpU6lfWfIv3wg==} dependencies: - '@vue/compiler-dom': 3.2.33 - '@vue/compiler-sfc': 3.2.33 - '@vue/runtime-dom': 3.2.33 - '@vue/server-renderer': 3.2.33_vue@3.2.33 - '@vue/shared': 3.2.33 + '@vue/compiler-dom': 3.2.34 + '@vue/compiler-sfc': 3.2.34 + '@vue/runtime-dom': 3.2.34 + '@vue/server-renderer': 3.2.34_vue@3.2.34 + '@vue/shared': 3.2.34 /wcwidth/1.0.1: resolution: {integrity: sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=} @@ -11052,9 +11052,9 @@ packages: '@babel/core': 7.17.12 '@babel/preset-env': 7.17.12_@babel+core@7.17.12 '@babel/runtime': 7.17.9 - '@rollup/plugin-babel': 5.3.1_cozkpsv5bxi2sl4sehld7oc7ze - '@rollup/plugin-node-resolve': 11.2.1_rollup@2.73.0 - '@rollup/plugin-replace': 2.4.2_rollup@2.73.0 + '@rollup/plugin-babel': 5.3.1_swzzuhxpnwpceuiankqfict4vm + '@rollup/plugin-node-resolve': 11.2.1_rollup@2.74.0 + '@rollup/plugin-replace': 2.4.2_rollup@2.74.0 '@surma/rollup-plugin-off-main-thread': 2.2.3 ajv: 8.11.0 common-tags: 1.8.2 @@ -11063,8 +11063,8 @@ packages: glob: 7.2.3 lodash: 4.17.21 pretty-bytes: 5.6.0 - rollup: 2.73.0 - rollup-plugin-terser: 7.0.2_rollup@2.73.0 + rollup: 2.74.0 + rollup-plugin-terser: 7.0.2_rollup@2.74.0 source-map: 0.8.0-beta.0 stringify-object: 3.3.0 strip-comments: 2.0.1 From d34859d75008812fcd101e197ce835bcc1ee2017 Mon Sep 17 00:00:00 2001 From: Nate Moore Date: Thu, 19 May 2022 10:49:14 -0500 Subject: [PATCH 13/14] Expose `file` and `url` for Astro files (#3385) * feat: update test * feat: return `file` and `url` for astro files * chore: add changeset * fix: use private names $$file and $$url * test: update markdown test * chore: update fileId logic to strip query params --- .changeset/quiet-pumpkins-hunt.md | 5 +++++ packages/astro/src/@types/astro.ts | 8 +++++++- packages/astro/src/vite-plugin-astro/index.ts | 3 +++ .../astro/src/vite-plugin-markdown/index.ts | 15 +++------------ packages/astro/src/vite-plugin-utils/index.ts | 17 +++++++++++++++++ packages/astro/test/astro-global.test.js | 9 ++++++++- .../fixtures/astro-global/src/pages/glob.astro | 17 +++++++++++++++++ .../astro-global/src/pages/post/post-3.astro | 1 + 8 files changed, 61 insertions(+), 14 deletions(-) create mode 100644 .changeset/quiet-pumpkins-hunt.md create mode 100644 packages/astro/src/vite-plugin-utils/index.ts create mode 100644 packages/astro/test/fixtures/astro-global/src/pages/glob.astro create mode 100644 packages/astro/test/fixtures/astro-global/src/pages/post/post-3.astro diff --git a/.changeset/quiet-pumpkins-hunt.md b/.changeset/quiet-pumpkins-hunt.md new file mode 100644 index 000000000..17cd703c2 --- /dev/null +++ b/.changeset/quiet-pumpkins-hunt.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Expose `file` and `url` properties when fetching `.astro` files with `Astro.glob()` diff --git a/packages/astro/src/@types/astro.ts b/packages/astro/src/@types/astro.ts index 85e3d26c5..642fe9ffb 100644 --- a/packages/astro/src/@types/astro.ts +++ b/packages/astro/src/@types/astro.ts @@ -216,7 +216,7 @@ export interface AstroGlobalPartial { * * [Astro reference](https://docs.astro.build/en/reference/api-reference/#astroglob) */ - glob(globStr: `${any}.astro`): Promise; + glob(globStr: `${any}.astro`): Promise; glob>(globStr: `${any}.md`): Promise[]>; glob>(globStr: string): Promise; /** @@ -752,6 +752,12 @@ export interface ComponentInstance { getStaticPaths?: (options: GetStaticPathsOptions) => GetStaticPathsResult; } +export interface AstroInstance { + file: string; + url: string | undefined; + default: AstroComponentFactory; +} + export interface MarkdownInstance> { frontmatter: T; file: string; diff --git a/packages/astro/src/vite-plugin-astro/index.ts b/packages/astro/src/vite-plugin-astro/index.ts index b13b85494..4589adce5 100644 --- a/packages/astro/src/vite-plugin-astro/index.ts +++ b/packages/astro/src/vite-plugin-astro/index.ts @@ -14,6 +14,7 @@ import ancestor from 'common-ancestor-path'; import { trackCSSDependencies, handleHotUpdate } from './hmr.js'; import { isRelativePath, startsWithForwardSlash } from '../core/path.js'; import { PAGE_SCRIPT_ID, PAGE_SSR_SCRIPT_ID } from '../vite-plugin-scripts/index.js'; +import { getFileInfo } from '../vite-plugin-utils/index.js'; import { resolvePages } from '../core/util.js'; const FRONTMATTER_PARSE_REGEXP = /^\-\-\-(.*)^\-\-\-/ms; @@ -168,6 +169,7 @@ export default function astro({ config, logging }: AstroPluginOptions): vite.Plu try { const transformResult = await cachedCompilation(compileProps); + const { fileId: file, fileUrl: url } = getFileInfo(id, config); // Compile all TypeScript to JavaScript. // Also, catches invalid JS/TS in the compiled output before returning. @@ -180,6 +182,7 @@ export default function astro({ config, logging }: AstroPluginOptions): vite.Plu }); let SUFFIX = ''; + SUFFIX += `\nconst $$file = ${JSON.stringify(file)};\nconst $$url = ${JSON.stringify(url)};export { $$file as file, $$url as url };\n`; // Add HMR handling in dev mode. if (!resolvedConfig.isProduction) { // HACK: extract dependencies from metadata until compiler static extraction handles them diff --git a/packages/astro/src/vite-plugin-markdown/index.ts b/packages/astro/src/vite-plugin-markdown/index.ts index 8e702054d..9c7577fc3 100644 --- a/packages/astro/src/vite-plugin-markdown/index.ts +++ b/packages/astro/src/vite-plugin-markdown/index.ts @@ -9,8 +9,9 @@ import type { Plugin } from 'vite'; import type { AstroConfig } from '../@types/astro'; import { PAGE_SSR_SCRIPT_ID } from '../vite-plugin-scripts/index.js'; import { pagesVirtualModuleId } from '../core/app/index.js'; -import { appendForwardSlash, prependForwardSlash } from '../core/path.js'; +import { prependForwardSlash } from '../core/path.js'; import { resolvePages, viteID } from '../core/util.js'; +import { getFileInfo } from '../vite-plugin-utils/index.js'; interface AstroPluginOptions { config: AstroConfig; @@ -78,17 +79,7 @@ export default function markdown({ config }: AstroPluginOptions): Plugin { // Return the file's JS representation, including all Markdown // frontmatter and a deferred `import() of the compiled markdown content. if (id.endsWith(`.md${MARKDOWN_IMPORT_FLAG}`)) { - const sitePathname = appendForwardSlash( - config.site ? new URL(config.base, config.site).pathname : config.base - ); - - const fileId = id.replace(MARKDOWN_IMPORT_FLAG, ''); - let fileUrl = fileId.includes('/pages/') - ? fileId.replace(/^.*?\/pages\//, sitePathname).replace(/(\/index)?\.md$/, '') - : undefined; - if (fileUrl && config.trailingSlash === 'always') { - fileUrl = appendForwardSlash(fileUrl); - } + const { fileId, fileUrl } = getFileInfo(id, config); const source = await fs.promises.readFile(fileId, 'utf8'); const { data: frontmatter } = matter(source); diff --git a/packages/astro/src/vite-plugin-utils/index.ts b/packages/astro/src/vite-plugin-utils/index.ts new file mode 100644 index 000000000..d6ccd58b0 --- /dev/null +++ b/packages/astro/src/vite-plugin-utils/index.ts @@ -0,0 +1,17 @@ +import type { AstroConfig } from '../@types/astro'; +import { appendForwardSlash } from '../core/path.js'; + +export function getFileInfo(id: string, config: AstroConfig) { + const sitePathname = appendForwardSlash( + config.site ? new URL(config.base, config.site).pathname : config.base + ); + + const fileId = id.split('?')[0]; + let fileUrl = fileId.includes('/pages/') + ? fileId.replace(/^.*?\/pages\//, sitePathname).replace(/(\/index)?\.(md|astro)$/, '') + : undefined; + if (fileUrl && config.trailingSlash === 'always') { + fileUrl = appendForwardSlash(fileUrl); + } + return { fileId, fileUrl }; +} diff --git a/packages/astro/test/astro-global.test.js b/packages/astro/test/astro-global.test.js index 17520dacf..799f89071 100644 --- a/packages/astro/test/astro-global.test.js +++ b/packages/astro/test/astro-global.test.js @@ -2,7 +2,7 @@ import { expect } from 'chai'; import * as cheerio from 'cheerio'; import { loadFixture } from './test-utils.js'; -describe('Astro.*', () => { +describe('Astro Global', () => { let fixture; before(async () => { @@ -76,5 +76,12 @@ describe('Astro.*', () => { const $ = cheerio.load(html); expect($('.post-url').attr('href')).to.equal('/blog/post/post-2'); }); + + it('Astro.glob() correctly returns meta info for MD and Astro files', async () => { + const html = await fixture.readFile('/glob/index.html'); + const $ = cheerio.load(html); + expect($('[data-file]').length).to.equal(3); + expect($('.post-url[href]').length).to.equal(3); + }); }); }); diff --git a/packages/astro/test/fixtures/astro-global/src/pages/glob.astro b/packages/astro/test/fixtures/astro-global/src/pages/glob.astro new file mode 100644 index 000000000..cf237581a --- /dev/null +++ b/packages/astro/test/fixtures/astro-global/src/pages/glob.astro @@ -0,0 +1,17 @@ +--- +const data = await Astro.glob('./post/**/*'); +--- + + + + All Posts + + + {data.map((page: any) => ( +
+

Title

+ Read +
+ ))} + + diff --git a/packages/astro/test/fixtures/astro-global/src/pages/post/post-3.astro b/packages/astro/test/fixtures/astro-global/src/pages/post/post-3.astro new file mode 100644 index 000000000..31826b62d --- /dev/null +++ b/packages/astro/test/fixtures/astro-global/src/pages/post/post-3.astro @@ -0,0 +1 @@ +

Post 3

From e9c137cf5f25199d7c9368b24d63947f3cef22cc Mon Sep 17 00:00:00 2001 From: natemoo-re Date: Thu, 19 May 2022 15:50:10 +0000 Subject: [PATCH 14/14] [ci] format --- packages/astro/src/vite-plugin-astro/index.ts | 4 +++- packages/astro/src/vite-plugin-utils/index.ts | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/astro/src/vite-plugin-astro/index.ts b/packages/astro/src/vite-plugin-astro/index.ts index 4589adce5..4be0472cb 100644 --- a/packages/astro/src/vite-plugin-astro/index.ts +++ b/packages/astro/src/vite-plugin-astro/index.ts @@ -182,7 +182,9 @@ export default function astro({ config, logging }: AstroPluginOptions): vite.Plu }); let SUFFIX = ''; - SUFFIX += `\nconst $$file = ${JSON.stringify(file)};\nconst $$url = ${JSON.stringify(url)};export { $$file as file, $$url as url };\n`; + SUFFIX += `\nconst $$file = ${JSON.stringify(file)};\nconst $$url = ${JSON.stringify( + url + )};export { $$file as file, $$url as url };\n`; // Add HMR handling in dev mode. if (!resolvedConfig.isProduction) { // HACK: extract dependencies from metadata until compiler static extraction handles them diff --git a/packages/astro/src/vite-plugin-utils/index.ts b/packages/astro/src/vite-plugin-utils/index.ts index d6ccd58b0..32d896e15 100644 --- a/packages/astro/src/vite-plugin-utils/index.ts +++ b/packages/astro/src/vite-plugin-utils/index.ts @@ -8,8 +8,8 @@ export function getFileInfo(id: string, config: AstroConfig) { const fileId = id.split('?')[0]; let fileUrl = fileId.includes('/pages/') - ? fileId.replace(/^.*?\/pages\//, sitePathname).replace(/(\/index)?\.(md|astro)$/, '') - : undefined; + ? fileId.replace(/^.*?\/pages\//, sitePathname).replace(/(\/index)?\.(md|astro)$/, '') + : undefined; if (fileUrl && config.trailingSlash === 'always') { fileUrl = appendForwardSlash(fileUrl); }