Merge branch 'main' into feat/images

This commit is contained in:
Princesseuh 2023-02-03 16:30:39 +01:00
commit af1bc13417
No known key found for this signature in database
GPG key ID: 105BBD6D57F2B0C0
82 changed files with 850 additions and 312 deletions

View file

@ -1,5 +0,0 @@
---
'@astrojs/solid-js': patch
---
Bump vitefu for peerDep warning with Vite 4

View file

@ -0,0 +1,5 @@
---
'@astrojs/cloudflare': patch
---
Uses config root path as location for Cloudflare Pages Functions

View file

@ -0,0 +1,5 @@
---
'astro': patch
---
Fix sourcemap generation when scanning files

View file

@ -1,5 +0,0 @@
---
'@astrojs/vercel': patch
---
Added second build step through esbuild, to allow framework defined build (vite build) and target defined bundling (esbuilt step)

View file

@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.0.5"
"astro": "^2.0.6"
}
}

View file

@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.0.5",
"astro": "^2.0.6",
"@astrojs/mdx": "^0.16.0",
"@astrojs/rss": "^2.1.0",
"@astrojs/sitemap": "^1.0.1"

View file

@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^2.0.5"
"astro": "^2.0.6"
},
"peerDependencies": {
"astro": "^2.0.0-beta.0"

View file

@ -10,7 +10,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.0.5"
"astro": "^2.0.6"
},
"devDependencies": {
"@astrojs/deno": "^4.0.0"

View file

@ -11,12 +11,12 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.0.5",
"astro": "^2.0.6",
"preact": "^10.7.3",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"@astrojs/react": "^2.0.2",
"@astrojs/preact": "^2.0.1",
"@astrojs/preact": "^2.0.2",
"@algolia/client-search": "^4.13.1",
"@docsearch/css": "^3.1.0",
"@docsearch/react": "^3.1.0",

View file

@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.0.5",
"astro": "^2.0.6",
"alpinejs": "^3.10.2",
"@astrojs/alpinejs": "^0.1.3",
"@types/alpinejs": "^3.7.0"

View file

@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.0.5",
"astro": "^2.0.6",
"lit": "^2.2.5",
"@astrojs/lit": "^1.1.2",
"@webcomponents/template-shadowroot": "^0.1.0"

View file

@ -11,16 +11,16 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.0.5",
"astro": "^2.0.6",
"preact": "^10.7.3",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"solid-js": "^1.4.3",
"svelte": "^3.48.0",
"vue": "^3.2.37",
"@astrojs/preact": "^2.0.1",
"@astrojs/preact": "^2.0.2",
"@astrojs/react": "^2.0.2",
"@astrojs/solid-js": "^2.0.1",
"@astrojs/solid-js": "^2.0.2",
"@astrojs/svelte": "^2.0.1",
"@astrojs/vue": "^2.0.1"
}

View file

@ -11,9 +11,9 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.0.5",
"astro": "^2.0.6",
"preact": "^10.7.3",
"@astrojs/preact": "^2.0.1",
"@astrojs/preact": "^2.0.2",
"@preact/signals": "^1.1.0"
}
}

View file

@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.0.5",
"astro": "^2.0.6",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"@astrojs/react": "^2.0.2",

View file

@ -11,8 +11,8 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.0.5",
"astro": "^2.0.6",
"solid-js": "^1.4.3",
"@astrojs/solid-js": "^2.0.1"
"@astrojs/solid-js": "^2.0.2"
}
}

View file

@ -13,6 +13,6 @@
"dependencies": {
"svelte": "^3.48.0",
"@astrojs/svelte": "^2.0.1",
"astro": "^2.0.5"
"astro": "^2.0.6"
}
}

View file

@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.0.5",
"astro": "^2.0.6",
"vue": "^3.2.37",
"@astrojs/vue": "^2.0.1"
}

View file

@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/node": "^5.0.2",
"astro": "^2.0.5"
"@astrojs/node": "^5.0.3",
"astro": "^2.0.6"
}
}

View file

@ -15,7 +15,7 @@
],
"scripts": {},
"devDependencies": {
"astro": "^2.0.5"
"astro": "^2.0.6"
},
"peerDependencies": {
"astro": "^2.0.0-beta.0"

View file

@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.0.5"
"astro": "^2.0.6"
}
}

View file

@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.0.5"
"astro": "^2.0.6"
}
}

View file

@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.0.5"
"astro": "^2.0.6"
}
}

View file

@ -12,10 +12,10 @@
"server": "node dist/server/entry.mjs"
},
"dependencies": {
"astro": "^2.0.5",
"astro": "^2.0.6",
"svelte": "^3.48.0",
"@astrojs/svelte": "^2.0.1",
"@astrojs/node": "^5.0.2",
"@astrojs/node": "^5.0.3",
"concurrently": "^7.2.1",
"unocss": "^0.15.6",
"vite-imagetools": "^4.0.4"

View file

@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.0.5",
"astro": "^2.0.6",
"@astrojs/markdown-remark": "^2.0.1",
"hast-util-select": "5.0.1",
"rehype-autolink-headings": "^6.1.1",

View file

@ -11,6 +11,6 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.0.5"
"astro": "^2.0.6"
}
}

View file

@ -11,9 +11,9 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.0.5",
"astro": "^2.0.6",
"preact": "^10.6.5",
"@astrojs/preact": "^2.0.1",
"@astrojs/preact": "^2.0.2",
"@astrojs/mdx": "^0.16.0"
}
}

View file

@ -11,9 +11,9 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.0.5",
"astro": "^2.0.6",
"preact": "^10.7.3",
"@astrojs/preact": "^2.0.1",
"@astrojs/preact": "^2.0.2",
"nanostores": "^0.5.12",
"@nanostores/preact": "^0.1.3"
}

View file

@ -14,7 +14,7 @@
"@astrojs/mdx": "^0.16.0",
"@astrojs/tailwind": "^3.0.1",
"@types/canvas-confetti": "^1.4.3",
"astro": "^2.0.5",
"astro": "^2.0.6",
"autoprefixer": "^10.4.7",
"canvas-confetti": "^1.5.1",
"postcss": "^8.4.14",

View file

@ -11,7 +11,7 @@
"astro": "astro"
},
"dependencies": {
"astro": "^2.0.5",
"astro": "^2.0.6",
"vite-plugin-pwa": "0.11.11",
"workbox-window": "^6.5.3"
}

View file

@ -12,7 +12,7 @@
"test": "vitest"
},
"dependencies": {
"astro": "^2.0.5",
"astro": "^2.0.6",
"vitest": "^0.20.3"
}
}

View file

@ -1,5 +1,11 @@
# astro
## 2.0.6
### Patch Changes
- [#6107](https://github.com/withastro/astro/pull/6107) [`9bec6bc41`](https://github.com/withastro/astro/commit/9bec6bc410f324a41c67e5d185fa86f78d7625f2) Thanks [@matthewp](https://github.com/matthewp)! - Fixes head contents being placed in body in MDX components
## 2.0.5
### Patch Changes

View file

@ -1,6 +1,6 @@
{
"name": "astro",
"version": "2.0.5",
"version": "2.0.6",
"description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
"type": "module",
"author": "withastro",

View file

@ -1455,6 +1455,10 @@ export interface SSRResult {
): AstroGlobal;
resolve: (s: string) => Promise<string>;
response: ResponseInit;
// Bits 1 = astro, 2 = jsx, 4 = slot
// As rendering occurs these bits are manipulated to determine where content
// is within a slot. This is used for head injection.
scope: number;
_metadata: SSRMetadata;
}

View file

@ -2,6 +2,7 @@ import { pathToFileURL } from 'url';
import type { Plugin } from 'vite';
import { moduleIsTopLevelPage, walkParentInfos } from '../core/build/graph.js';
import { BuildInternals, getPageDataByViteID } from '../core/build/internal.js';
import { AstroBuildPlugin } from '../core/build/plugin.js';
import type { ModuleLoader } from '../core/module-loader/loader.js';
import { createViteLoader } from '../core/module-loader/vite.js';
import { getStylesForURL } from '../core/render/dev/css.js';
@ -98,3 +99,16 @@ export function astroContentProdBundlePlugin({ internals }: { internals: BuildIn
},
};
}
export function astroConfigBuildPlugin(internals: BuildInternals): AstroBuildPlugin {
return {
build: 'ssr',
hooks: {
'build:before': () => {
return {
vitePlugin: astroContentProdBundlePlugin({ internals }),
};
},
},
};
}

View file

@ -0,0 +1,120 @@
import type { Plugin as VitePlugin } from 'vite';
import type { BuildInternals } from './internal';
import type { StaticBuildOptions, ViteBuildReturn } from './types';
type RollupOutputArray = Extract<ViteBuildReturn, Array<any>>;
type OutputChunkorAsset = RollupOutputArray[number]['output'][number];
type OutputChunk = Extract<OutputChunkorAsset, { type: 'chunk' }>;
type MutateChunk = (chunk: OutputChunk, build: 'server' | 'client', newCode: string) => void;
export type AstroBuildPlugin = {
build: 'ssr' | 'client' | 'both';
hooks?: {
'build:before'?: (opts: { build: 'ssr' | 'client'; input: Set<string> }) => {
enforce?: 'after-user-plugins';
vitePlugin: VitePlugin | VitePlugin[] | undefined;
};
'build:post'?: (opts: {
ssrOutputs: RollupOutputArray;
clientOutputs: RollupOutputArray;
mutate: MutateChunk;
}) => void | Promise<void>;
};
};
export function createPluginContainer(options: StaticBuildOptions, internals: BuildInternals) {
const clientPlugins: AstroBuildPlugin[] = [];
const ssrPlugins: AstroBuildPlugin[] = [];
const allPlugins = new Set<AstroBuildPlugin>();
return {
options,
internals,
register(plugin: AstroBuildPlugin) {
allPlugins.add(plugin);
switch (plugin.build) {
case 'client': {
clientPlugins.push(plugin);
break;
}
case 'ssr': {
ssrPlugins.push(plugin);
break;
}
case 'both': {
clientPlugins.push(plugin);
ssrPlugins.push(plugin);
break;
}
}
},
// Hooks
runBeforeHook(build: 'ssr' | 'client', input: Set<string>) {
let plugins = build === 'ssr' ? ssrPlugins : clientPlugins;
let vitePlugins: Array<VitePlugin | VitePlugin[]> = [];
let lastVitePlugins: Array<VitePlugin | VitePlugin[]> = [];
for (const plugin of plugins) {
if (plugin.hooks?.['build:before']) {
let result = plugin.hooks['build:before']({ build, input });
if (result.vitePlugin) {
vitePlugins.push(result.vitePlugin);
}
}
}
return {
vitePlugins,
lastVitePlugins,
};
},
async runPostHook(ssrReturn: ViteBuildReturn, clientReturn: ViteBuildReturn | null) {
const mutations = new Map<
string,
{
build: 'server' | 'client';
code: string;
}
>();
const ssrOutputs: RollupOutputArray = [];
const clientOutputs: RollupOutputArray = [];
if (Array.isArray(ssrReturn)) {
ssrOutputs.push(...ssrReturn);
} else if ('output' in ssrReturn) {
ssrOutputs.push(ssrReturn);
}
if (Array.isArray(clientReturn)) {
clientOutputs.push(...clientReturn);
} else if (clientReturn && 'output' in clientReturn) {
clientOutputs.push(clientReturn);
}
const mutate: MutateChunk = (chunk, build, newCode) => {
chunk.code = newCode;
mutations.set(chunk.fileName, {
build,
code: newCode,
});
};
for (const plugin of allPlugins) {
const postHook = plugin.hooks?.['build:post'];
if (postHook) {
await postHook({
ssrOutputs,
clientOutputs,
mutate,
});
}
}
return mutations;
},
};
}
export type AstroBuildPluginContainer = ReturnType<typeof createPluginContainer>;

View file

@ -0,0 +1,22 @@
import { astroConfigBuildPlugin } from '../../../content/vite-plugin-content-assets.js';
import type { AstroBuildPluginContainer } from '../plugin';
import { pluginAliasResolve } from './plugin-alias-resolve.js';
import { pluginAnalyzer } from './plugin-analyzer.js';
import { pluginCSS } from './plugin-css.js';
import { pluginHoistedScripts } from './plugin-hoisted-scripts.js';
import { pluginInternals } from './plugin-internals.js';
import { pluginPages } from './plugin-pages.js';
import { pluginPrerender } from './plugin-prerender.js';
import { pluginSSR } from './plugin-ssr.js';
export function registerAllPlugins({ internals, options, register }: AstroBuildPluginContainer) {
register(pluginAliasResolve(internals));
register(pluginAnalyzer(internals));
register(pluginInternals(internals));
register(pluginPages(options, internals));
register(pluginCSS(options, internals));
register(pluginPrerender(options, internals));
register(astroConfigBuildPlugin(internals));
register(pluginHoistedScripts(options, internals));
register(pluginSSR(options, internals));
}

View file

@ -1,5 +1,6 @@
import type { Alias, Plugin as VitePlugin } from 'vite';
import type { BuildInternals } from '../../core/build/internal.js';
import type { BuildInternals } from '../internal.js';
import { AstroBuildPlugin } from '../plugin.js';
/**
* `@rollup/plugin-alias` doesn't resolve aliases in Rollup input by default. This plugin fixes it
@ -48,3 +49,16 @@ function matches(pattern: string | RegExp, importee: string) {
}
return importee.startsWith(pattern + '/');
}
export function pluginAliasResolve(internals: BuildInternals): AstroBuildPlugin {
return {
build: 'client',
hooks: {
'build:before': () => {
return {
vitePlugin: vitePluginAliasResolve(internals),
};
},
},
};
}

View file

@ -1,11 +1,12 @@
import type { PluginContext } from 'rollup';
import type { Plugin as VitePlugin } from 'vite';
import type { BuildInternals } from '../../core/build/internal.js';
import type { PluginMetadata as AstroPluginMetadata } from '../../vite-plugin-astro/types';
import type { PluginMetadata as AstroPluginMetadata } from '../../../vite-plugin-astro/types';
import type { BuildInternals } from '../internal.js';
import type { AstroBuildPlugin } from '../plugin.js';
import { prependForwardSlash } from '../../core/path.js';
import { getTopLevelPages } from './graph.js';
import { getPageDataByViteID, trackClientOnlyPageDatas } from './internal.js';
import { prependForwardSlash } from '../../path.js';
import { getTopLevelPages } from '../graph.js';
import { getPageDataByViteID, trackClientOnlyPageDatas } from '../internal.js';
export function vitePluginAnalyzer(internals: BuildInternals): VitePlugin {
function hoistedScriptScanner() {
@ -122,3 +123,16 @@ export function vitePluginAnalyzer(internals: BuildInternals): VitePlugin {
},
};
}
export function pluginAnalyzer(internals: BuildInternals): AstroBuildPlugin {
return {
build: 'ssr',
hooks: {
'build:before': () => {
return {
vitePlugin: vitePluginAnalyzer(internals),
};
},
},
};
}

View file

@ -2,20 +2,22 @@ import * as crypto from 'node:crypto';
import * as npath from 'node:path';
import type { GetModuleInfo } from 'rollup';
import { Plugin as VitePlugin, ResolvedConfig, transformWithEsbuild } from 'vite';
import { isCSSRequest } from '../render/util.js';
import type { BuildInternals } from './internal';
import type { PageBuildData, StaticBuildOptions } from './types';
import { isCSSRequest } from '../../render/util.js';
import type { BuildInternals } from '../internal';
import type { AstroBuildPlugin } from '../plugin';
import type { PageBuildData, StaticBuildOptions } from '../types';
import { PROPAGATED_ASSET_FLAG } from '../../content/consts.js';
import * as assetName from './css-asset-name.js';
import { moduleIsTopLevelPage, walkParentInfos } from './graph.js';
import { PROPAGATED_ASSET_FLAG } from '../../../content/consts.js';
import * as assetName from '../css-asset-name.js';
import { moduleIsTopLevelPage, walkParentInfos } from '../graph.js';
import {
eachPageData,
getPageDataByViteID,
getPageDatasByClientOnlyID,
getPageDatasByHoistedScriptId,
isHoistedScript,
} from './internal.js';
} from '../internal.js';
import { extendManualChunks } from './util.js';
interface PluginOptions {
internals: BuildInternals;
@ -54,40 +56,30 @@ export function rollupPluginAstroBuildCSS(options: PluginOptions): VitePlugin[]
name: 'astro:rollup-plugin-build-css',
outputOptions(outputOptions) {
const manualChunks = outputOptions.manualChunks || Function.prototype;
const assetFileNames = outputOptions.assetFileNames;
const namingIncludesHash = assetFileNames?.toString().includes('[hash]');
const createNameForParentPages = namingIncludesHash
? assetName.shortHashedName
: assetName.createSlugger(settings);
outputOptions.manualChunks = function (id, ...args) {
// Defer to user-provided `manualChunks`, if it was provided.
if (typeof manualChunks == 'object') {
if (id in manualChunks) {
return manualChunks[id];
}
} else if (typeof manualChunks === 'function') {
const outid = manualChunks.call(this, id, ...args);
if (outid) {
return outid;
}
}
// For CSS, create a hash of all of the pages that use it.
// This causes CSS to be built into shared chunks when used by multiple pages.
if (isCSSRequest(id)) {
for (const [pageInfo] of walkParentInfos(id, {
getModuleInfo: args[0].getModuleInfo,
})) {
if (new URL(pageInfo.id, 'file://').searchParams.has(PROPAGATED_ASSET_FLAG)) {
// Split delayed assets to separate modules
// so they can be injected where needed
return createNameHash(id, [id]);
extendManualChunks(outputOptions, {
after(id, meta) {
// For CSS, create a hash of all of the pages that use it.
// This causes CSS to be built into shared chunks when used by multiple pages.
if (isCSSRequest(id)) {
for (const [pageInfo] of walkParentInfos(id, {
getModuleInfo: meta.getModuleInfo,
})) {
if (new URL(pageInfo.id, 'file://').searchParams.has(PROPAGATED_ASSET_FLAG)) {
// Split delayed assets to separate modules
// so they can be injected where needed
return createNameHash(id, [id]);
}
}
return createNameForParentPages(id, meta);
}
return createNameForParentPages(id, args[0]);
}
};
},
});
},
async generateBundle(_outputOptions, bundle) {
@ -272,3 +264,25 @@ export function rollupPluginAstroBuildCSS(options: PluginOptions): VitePlugin[]
},
];
}
export function pluginCSS(
options: StaticBuildOptions,
internals: BuildInternals
): AstroBuildPlugin {
return {
build: 'both',
hooks: {
'build:before': ({ build }) => {
let plugins = rollupPluginAstroBuildCSS({
buildOptions: options,
internals,
target: build === 'ssr' ? 'server' : 'client',
});
return {
vitePlugin: plugins,
};
},
},
};
}

View file

@ -1,8 +1,10 @@
import type { Plugin as VitePlugin } from 'vite';
import type { AstroSettings } from '../../@types/astro';
import type { BuildInternals } from '../../core/build/internal.js';
import { viteID } from '../util.js';
import { getPageDataByViteID } from './internal.js';
import type { AstroSettings } from '../../../@types/astro';
import { viteID } from '../../util.js';
import type { BuildInternals } from '../internal.js';
import { getPageDataByViteID } from '../internal.js';
import { AstroBuildPlugin } from '../plugin';
import { StaticBuildOptions } from '../types';
function virtualHoistedEntry(id: string) {
return id.startsWith('/astro/hoisted.js?q=');
@ -91,3 +93,19 @@ export function vitePluginHoistedScripts(
},
};
}
export function pluginHoistedScripts(
options: StaticBuildOptions,
internals: BuildInternals
): AstroBuildPlugin {
return {
build: 'client',
hooks: {
'build:before': () => {
return {
vitePlugin: vitePluginHoistedScripts(options.settings, internals),
};
},
},
};
}

View file

@ -1,5 +1,6 @@
import type { Plugin as VitePlugin, UserConfig } from 'vite';
import type { BuildInternals } from './internal.js';
import type { BuildInternals } from '../internal.js';
import type { AstroBuildPlugin } from '../plugin';
export function vitePluginInternals(input: Set<string>, internals: BuildInternals): VitePlugin {
return {
@ -60,3 +61,16 @@ export function vitePluginInternals(input: Set<string>, internals: BuildInternal
},
};
}
export function pluginInternals(internals: BuildInternals): AstroBuildPlugin {
return {
build: 'both',
hooks: {
'build:before': ({ input }) => {
return {
vitePlugin: vitePluginInternals(input, internals),
};
},
},
};
}

View file

@ -1,8 +1,10 @@
import type { Plugin as VitePlugin } from 'vite';
import { pagesVirtualModuleId, resolvedPagesVirtualModuleId } from '../app/index.js';
import { addRollupInput } from './add-rollup-input.js';
import { BuildInternals, eachPageData, hasPrerenderedPages } from './internal.js';
import type { StaticBuildOptions } from './types';
import type { AstroBuildPlugin } from '../plugin';
import type { StaticBuildOptions } from '../types';
import { pagesVirtualModuleId, resolvedPagesVirtualModuleId } from '../../app/index.js';
import { addRollupInput } from '../add-rollup-input.js';
import { BuildInternals, eachPageData, hasPrerenderedPages } from '../internal.js';
export function vitePluginPages(opts: StaticBuildOptions, internals: BuildInternals): VitePlugin {
return {
@ -53,3 +55,16 @@ export const renderers = [${rendererItems}];`;
},
};
}
export function pluginPages(opts: StaticBuildOptions, internals: BuildInternals): AstroBuildPlugin {
return {
build: 'ssr',
hooks: {
'build:before': () => {
return {
vitePlugin: vitePluginPages(opts, internals),
};
},
},
};
}

View file

@ -0,0 +1,51 @@
import type { Plugin as VitePlugin } from 'vite';
import type { BuildInternals } from '../internal.js';
import type { AstroBuildPlugin } from '../plugin.js';
import type { StaticBuildOptions } from '../types';
import { extendManualChunks } from './util.js';
export function vitePluginPrerender(
opts: StaticBuildOptions,
internals: BuildInternals
): VitePlugin {
return {
name: 'astro:rollup-plugin-prerender',
outputOptions(outputOptions) {
extendManualChunks(outputOptions, {
after(id, meta) {
// Split the Astro runtime into a separate chunk for readability
if (id.includes('astro/dist')) {
return 'astro';
}
const pageInfo = internals.pagesByViteID.get(id);
if (pageInfo) {
// prerendered pages should be split into their own chunk
// Important: this can't be in the `pages/` directory!
if (meta.getModuleInfo(id)?.meta.astro?.pageOptions?.prerender) {
return 'prerender';
}
// dynamic pages should all go in their own chunk in the pages/* directory
return `pages/all`;
}
},
});
},
};
}
export function pluginPrerender(
opts: StaticBuildOptions,
internals: BuildInternals
): AstroBuildPlugin {
return {
build: 'ssr',
hooks: {
'build:before': () => {
return {
vitePlugin: vitePluginPrerender(opts, internals),
};
},
},
};
}

View file

@ -1,21 +1,21 @@
import type { Plugin as VitePlugin } from 'vite';
import type { AstroAdapter } from '../../@types/astro';
import type { SerializedRouteInfo, SerializedSSRManifest } from '../app/types';
import type { BuildInternals } from './internal.js';
import type { StaticBuildOptions } from './types';
import type { AstroAdapter } from '../../../@types/astro';
import type { SerializedRouteInfo, SerializedSSRManifest } from '../../app/types';
import type { BuildInternals } from '../internal.js';
import type { StaticBuildOptions } from '../types';
import glob from 'fast-glob';
import * as fs from 'fs';
import { fileURLToPath } from 'url';
import { getContentPaths } from '../../content/index.js';
import { runHookBuildSsr } from '../../integrations/index.js';
import { BEFORE_HYDRATION_SCRIPT_ID, PAGE_SCRIPT_ID } from '../../vite-plugin-scripts/index.js';
import { pagesVirtualModuleId } from '../app/index.js';
import { removeLeadingForwardSlash, removeTrailingForwardSlash } from '../path.js';
import { serializeRouteData } from '../routing/index.js';
import { addRollupInput } from './add-rollup-input.js';
import { getOutFile, getOutFolder } from './common.js';
import { eachPrerenderedPageData, eachServerPageData, sortedCSS } from './internal.js';
import { getContentPaths } from '../../../content/index.js';
import { runHookBuildSsr } from '../../../integrations/index.js';
import { BEFORE_HYDRATION_SCRIPT_ID, PAGE_SCRIPT_ID } from '../../../vite-plugin-scripts/index.js';
import { pagesVirtualModuleId } from '../../app/index.js';
import { removeLeadingForwardSlash, removeTrailingForwardSlash } from '../../path.js';
import { serializeRouteData } from '../../routing/index.js';
import { addRollupInput } from '../add-rollup-input.js';
import { getOutFile, getOutFolder } from '../common.js';
import { eachPrerenderedPageData, eachServerPageData, sortedCSS } from '../internal.js';
import { AstroBuildPlugin } from '../plugin';
export const virtualModuleId = '@astrojs-ssr-virtual-entry';
const resolvedVirtualModuleId = '\0' + virtualModuleId;
@ -29,7 +29,7 @@ export function vitePluginSSR(internals: BuildInternals, adapter: AstroAdapter):
options(opts) {
return addRollupInput(opts, [virtualModuleId]);
},
resolveId(id) {
resolveId(id, parent) {
if (id === virtualModuleId) {
return resolvedVirtualModuleId;
}
@ -114,12 +114,10 @@ export async function injectManifest(buildOpts: StaticBuildOptions, internals: B
const chunk = internals.ssrEntryChunk;
const code = chunk.code;
chunk.code = code.replace(replaceExp, () => {
return code.replace(replaceExp, () => {
return JSON.stringify(manifest);
});
const serverEntryURL = new URL(buildOpts.buildConfig.serverEntry, buildOpts.buildConfig.server);
await fs.promises.mkdir(new URL('./', serverEntryURL), { recursive: true });
await fs.promises.writeFile(serverEntryURL, chunk.code, 'utf-8');
}
function buildManifest(
@ -220,3 +218,37 @@ function buildManifest(
return ssrManifest;
}
export function pluginSSR(
options: StaticBuildOptions,
internals: BuildInternals
): AstroBuildPlugin {
const ssr = options.settings.config.output === 'server';
return {
build: 'ssr',
hooks: {
'build:before': () => {
let vitePlugin = ssr ? vitePluginSSR(internals, options.settings.adapter!) : undefined;
return {
enforce: 'after-user-plugins',
vitePlugin,
};
},
'build:post': async ({ mutate }) => {
if (!ssr) {
return;
}
if (!internals.ssrEntryChunk) {
throw new Error(`Did not generate an entry chunk for SSR`);
}
// Mutate the filename
internals.ssrEntryChunk.fileName = options.settings.config.build.serverEntry;
const code = await injectManifest(options, internals);
mutate(internals.ssrEntryChunk, 'server', code);
},
},
};
}

View file

@ -0,0 +1,40 @@
import type { Plugin as VitePlugin } from 'vite';
// eslint-disable-next-line @typescript-eslint/ban-types
type OutputOptionsHook = Extract<VitePlugin['outputOptions'], Function>;
type OutputOptions = Parameters<OutputOptionsHook>[0];
type ExtendManualChunksHooks = {
before?: (id: string, meta: any) => string | undefined;
after?: (id: string, meta: any) => string | undefined;
};
export function extendManualChunks(outputOptions: OutputOptions, hooks: ExtendManualChunksHooks) {
const manualChunks = outputOptions.manualChunks;
outputOptions.manualChunks = function (id, meta) {
if (hooks.before) {
let value = hooks.before(id, meta);
if (value) {
return value;
}
}
// Defer to user-provided `manualChunks`, if it was provided.
if (typeof manualChunks == 'object') {
if (id in manualChunks) {
let value = manualChunks[id];
return value[0];
}
} else if (typeof manualChunks === 'function') {
const outid = manualChunks.call(this, id, meta);
if (outid) {
return outid;
}
}
if (hooks.after) {
return hooks.after(id, meta) || null;
}
return null;
};
}

View file

@ -4,7 +4,6 @@ import fs from 'fs';
import { bgGreen, bgMagenta, black, dim } from 'kleur/colors';
import { fileURLToPath } from 'url';
import * as vite from 'vite';
import { astroContentProdBundlePlugin } from '../../content/index.js';
import {
BuildInternals,
createBuildInternals,
@ -21,16 +20,10 @@ import { info } from '../logger/core.js';
import { getOutDirWithinCwd } from './common.js';
import { generatePages } from './generate.js';
import { trackPageData } from './internal.js';
import { AstroBuildPluginContainer, createPluginContainer } from './plugin.js';
import { registerAllPlugins } from './plugins/index.js';
import type { PageBuildData, StaticBuildOptions } from './types';
import { getTimeStat } from './util.js';
import { vitePluginAliasResolve } from './vite-plugin-alias-resolve.js';
import { vitePluginAnalyzer } from './vite-plugin-analyzer.js';
import { rollupPluginAstroBuildCSS } from './vite-plugin-css.js';
import { vitePluginHoistedScripts } from './vite-plugin-hoisted-scripts.js';
import { vitePluginInternals } from './vite-plugin-internals.js';
import { vitePluginPages } from './vite-plugin-pages.js';
import { vitePluginPrerender } from './vite-plugin-prerender.js';
import { injectManifest, vitePluginSSR } from './vite-plugin-ssr.js';
export async function staticBuild(opts: StaticBuildOptions) {
const { allPages, settings } = opts;
@ -70,10 +63,14 @@ export async function staticBuild(opts: StaticBuildOptions) {
// condition, so we are doing it ourselves
emptyDir(settings.config.outDir, new Set('.git'));
// Register plugins
const container = createPluginContainer(opts, internals);
registerAllPlugins(container);
// Build your project (SSR application code, assets, client JS, etc.)
timer.ssr = performance.now();
info(opts.logging, 'build', `Building ${settings.config.output} entrypoints...`);
await ssrBuild(opts, internals, pageInput);
const ssrOutput = await ssrBuild(opts, internals, pageInput, container);
info(opts.logging, 'build', dim(`Completed in ${getTimeStat(timer.ssr, performance.now())}.`));
const rendererClientEntrypoints = settings.renderers
@ -93,9 +90,11 @@ export async function staticBuild(opts: StaticBuildOptions) {
// Run client build first, so the assets can be fed into the SSR rendered version.
timer.clientBuild = performance.now();
await clientBuild(opts, internals, clientInput);
const clientOutput = await clientBuild(opts, internals, clientInput, container);
timer.generate = performance.now();
await runPostBuildHooks(container, ssrOutput, clientOutput);
switch (settings.config.output) {
case 'static': {
await generatePages(opts, internals);
@ -103,7 +102,6 @@ export async function staticBuild(opts: StaticBuildOptions) {
return;
}
case 'server': {
await injectManifest(opts, internals);
await generatePages(opts, internals);
await cleanStaticOutput(opts, internals);
info(opts.logging, null, `\n${bgMagenta(black(' finalizing server assets '))}\n`);
@ -113,11 +111,18 @@ export async function staticBuild(opts: StaticBuildOptions) {
}
}
async function ssrBuild(opts: StaticBuildOptions, internals: BuildInternals, input: Set<string>) {
async function ssrBuild(
opts: StaticBuildOptions,
internals: BuildInternals,
input: Set<string>,
container: AstroBuildPluginContainer
) {
const { settings, viteConfig } = opts;
const ssr = settings.config.output === 'server';
const out = ssr ? opts.buildConfig.server : getOutDirWithinCwd(settings.config.outDir);
const { lastVitePlugins, vitePlugins } = container.runBeforeHook('ssr', input);
const viteBuildConfig: vite.InlineConfig = {
...viteConfig,
mode: viteConfig.mode || 'production',
@ -154,21 +159,7 @@ async function ssrBuild(opts: StaticBuildOptions, internals: BuildInternals, inp
modulePreload: { polyfill: false },
reportCompressedSize: false,
},
plugins: [
vitePluginAnalyzer(internals),
vitePluginInternals(input, internals),
vitePluginPages(opts, internals),
rollupPluginAstroBuildCSS({
buildOptions: opts,
internals,
target: 'server',
}),
vitePluginPrerender(opts, internals),
...(viteConfig.plugins || []),
astroContentProdBundlePlugin({ internals }),
// SSR needs to be last
ssr && vitePluginSSR(internals, settings.adapter!),
],
plugins: [...vitePlugins, ...(viteConfig.plugins || []), ...lastVitePlugins],
envPrefix: viteConfig.envPrefix ?? 'PUBLIC_',
base: settings.config.base,
};
@ -187,7 +178,8 @@ async function ssrBuild(opts: StaticBuildOptions, internals: BuildInternals, inp
async function clientBuild(
opts: StaticBuildOptions,
internals: BuildInternals,
input: Set<string>
input: Set<string>,
container: AstroBuildPluginContainer
) {
const { settings, viteConfig } = opts;
const timer = performance.now();
@ -204,6 +196,7 @@ async function clientBuild(
return null;
}
const { lastVitePlugins, vitePlugins } = container.runBeforeHook('client', input);
info(opts.logging, null, `\n${bgGreen(black(' building client '))}`);
const viteBuildConfig: vite.InlineConfig = {
@ -228,17 +221,7 @@ async function clientBuild(
preserveEntrySignatures: 'exports-only',
},
},
plugins: [
vitePluginAliasResolve(internals),
vitePluginInternals(input, internals),
vitePluginHoistedScripts(settings, internals),
rollupPluginAstroBuildCSS({
buildOptions: opts,
internals,
target: 'client',
}),
...(viteConfig.plugins || []),
],
plugins: [...vitePlugins, ...(viteConfig.plugins || []), ...lastVitePlugins],
envPrefix: viteConfig.envPrefix ?? 'PUBLIC_',
base: settings.config.base,
};
@ -256,6 +239,21 @@ async function clientBuild(
return buildResult;
}
async function runPostBuildHooks(
container: AstroBuildPluginContainer,
ssrReturn: Awaited<ReturnType<typeof ssrBuild>>,
clientReturn: Awaited<ReturnType<typeof clientBuild>>
) {
const mutations = await container.runPostHook(ssrReturn, clientReturn);
const buildConfig = container.options.settings.config.build;
for (const [fileName, mutation] of mutations) {
const root = mutation.build === 'server' ? buildConfig.server : buildConfig.client;
const fileURL = new URL(fileName, root);
await fs.promises.mkdir(new URL('./', fileURL), { recursive: true });
await fs.promises.writeFile(fileURL, mutation.code, 'utf-8');
}
}
/**
* For each statically prerendered page, replace their SSR file with a noop.
* This allows us to run the SSR build only once, but still remove dependencies for statically rendered routes.

View file

@ -1,4 +1,4 @@
import type { InlineConfig } from 'vite';
import type { default as vite, InlineConfig } from 'vite';
import type {
AstroConfig,
AstroSettings,
@ -44,3 +44,10 @@ export interface SingleFileBuiltModule {
pageMap: Map<ComponentPath, ComponentInstance>;
renderers: SSRLoadedRenderer[];
}
export type ViteBuildReturn = Awaited<ReturnType<typeof vite.build>>;
export type RollupOutput = Extract<
Extract<ViteBuildReturn, Exclude<ViteBuildReturn, Array<any>>>,
{ output: any }
>;
export type OutputChunk = Extract<RollupOutput['output'][number], { type: 'chunk' }>;

View file

@ -1,43 +0,0 @@
import type { Plugin as VitePlugin } from 'vite';
import type { BuildInternals } from './internal.js';
import type { StaticBuildOptions } from './types';
export function vitePluginPrerender(
opts: StaticBuildOptions,
internals: BuildInternals
): VitePlugin {
return {
name: 'astro:rollup-plugin-prerender',
outputOptions(outputOptions) {
const manualChunks = outputOptions.manualChunks || Function.prototype;
outputOptions.manualChunks = function (id, api, ...args) {
// Defer to user-provided `manualChunks`, if it was provided.
if (typeof manualChunks == 'object') {
if (id in manualChunks) {
return manualChunks[id];
}
} else if (typeof manualChunks === 'function') {
const outid = manualChunks.call(this, id, api, ...args);
if (outid) {
return outid;
}
}
// Split the Astro runtime into a separate chunk for readability
if (id.includes('astro/dist')) {
return 'astro';
}
const pageInfo = internals.pagesByViteID.get(id);
if (pageInfo) {
// prerendered pages should be split into their own chunk
// Important: this can't be in the `pages/` directory!
if (api.getModuleInfo(id)?.meta.astro?.pageOptions?.prerender) {
return `prerender`;
}
// dynamic pages should all go in their own chunk in the pages/* directory
return `pages/all`;
}
};
},
};
}

View file

@ -156,6 +156,7 @@ export function createResult(args: CreateResultArgs): SSRResult {
propagation: args.propagation ?? new Map(),
propagators: new Map(),
extraHead: [],
scope: 0,
cookies,
/** This function returns the `Astro` faux-global */
createAstro(

View file

@ -12,6 +12,7 @@ import {
} from './index.js';
import { HTMLParts } from './render/common.js';
import type { ComponentIterable } from './render/component';
import { ScopeFlags } from './render/util.js';
const ClientOnlyPlaceholder = 'astro-client-only';
@ -94,6 +95,7 @@ Did you forget to import the component or is it possible there is a typo?`);
props[key] = value;
}
}
result.scope |= ScopeFlags.JSX;
return markHTMLString(await renderToString(result, vnode.type as any, props, slots));
}
case !vnode.type && (vnode.type as any) !== 0:

View file

@ -3,6 +3,7 @@ import type { HeadAndContent } from './head-and-content';
import type { RenderTemplateResult } from './render-template';
import { HTMLParts } from '../common.js';
import { ScopeFlags } from '../util.js';
import { isHeadAndContent } from './head-and-content.js';
import { renderAstroTemplateResult } from './render-template.js';
@ -27,6 +28,7 @@ export async function renderToString(
props: any,
children: any
): Promise<string> {
result.scope |= ScopeFlags.Astro;
const factoryResult = await componentFactory(result, props, children);
if (factoryResult instanceof Response) {

View file

@ -1,7 +1,7 @@
import type { SSRResult } from '../../../@types/astro';
import { markHTMLString } from '../escape.js';
import { renderElement } from './util.js';
import { renderElement, ScopeFlags } from './util.js';
// Filter out duplicate elements in our set
const uniqueElements = (item: any, index: number, all: any[]) => {
@ -52,6 +52,14 @@ export function* maybeRenderHead(result: SSRResult) {
return;
}
// Don't render the head inside of a JSX component that's inside of an Astro component
// as the Astro component will be the one to render the head.
switch (result.scope) {
case ScopeFlags.JSX | ScopeFlags.Slot | ScopeFlags.Astro: {
return;
}
}
// This is an instruction informing the page rendering that head might need rendering.
// This allows the page to deduplicate head injections.
yield { type: 'head', result } as const;

View file

@ -3,6 +3,7 @@ import type { RenderInstruction } from './types.js';
import { HTMLString, markHTMLString } from '../escape.js';
import { renderChild } from './any.js';
import { ScopeFlags } from './util.js';
const slotString = Symbol.for('astro:slot-string');
@ -20,8 +21,13 @@ export function isSlotString(str: string): str is any {
return !!(str as any)[slotString];
}
export async function renderSlot(_result: any, slotted: string, fallback?: any): Promise<string> {
export async function renderSlot(
result: SSRResult,
slotted: string,
fallback?: any
): Promise<string> {
if (slotted) {
result.scope |= ScopeFlags.Slot;
let iterator = renderChild(slotted);
let content = '';
let instructions: null | RenderInstruction[] = null;
@ -35,6 +41,8 @@ export async function renderSlot(_result: any, slotted: string, fallback?: any):
content += chunk;
}
}
// Remove the flag since we are now outside of the scope.
result.scope &= ~ScopeFlags.Slot;
return markHTMLString(new SlotString(content, instructions));
}
return fallback;

View file

@ -128,3 +128,9 @@ export function renderElement(
}
return `<${name}${internalSpreadAttributes(props, shouldEscape)}>${children}</${name}>`;
}
export const ScopeFlags = {
Astro: 1 << 0,
JSX: 1 << 1,
Slot: 1 << 2,
};

View file

@ -29,6 +29,7 @@ export default function astroScannerPlugin({ settings }: { settings: AstroSettin
const { meta = {} } = this.getModuleInfo(id) ?? {};
return {
code,
map: null,
meta: {
...meta,
astro: {

View file

@ -38,7 +38,7 @@
"tiny-glob": "^0.2.9"
},
"peerDependencies": {
"astro": "workspace:^2.0.5"
"astro": "workspace:^2.0.6"
},
"devDependencies": {
"astro": "workspace:*",

View file

@ -203,7 +203,7 @@ export default function createIntegration(args?: Options): AstroIntegration {
}
if (isModeDirectory) {
const functionsUrl = new URL(`file://${process.cwd()}/functions/`);
const functionsUrl = new URL('functions', _config.root);
await fs.promises.mkdir(functionsUrl, { recursive: true });
const directoryUrl = new URL('[[path]].js', functionsUrl);
await fs.promises.rename(finalBuildUrl, directoryUrl);

View file

@ -1,20 +1,21 @@
import { loadFixture, runCLI } from './test-utils.js';
import { loadFixture } from './test-utils.js';
import { expect } from 'chai';
import * as cheerio from 'cheerio';
import cloudflare from '../dist/index.js';
/** @type {import('./test-utils').Fixture} */
describe('mode: "directory"', () => {
/** @type {import('./test-utils').Fixture} */
let fixture;
before(async () => {
fixture = await loadFixture({
root: './fixtures/basics/',
output: 'server',
adapter: cloudflare({ mode: 'directory' }),
});
});
it('Builds', async () => {
await fixture.build();
});
it('generates functions folder inside the project root', async () => {
expect(await fixture.pathExists('../functions')).to.be.true;
});
});

View file

@ -32,7 +32,7 @@
"esbuild": "^0.15.18"
},
"peerDependencies": {
"astro": "workspace:^2.0.5"
"astro": "workspace:^2.0.6"
},
"devDependencies": {
"astro": "workspace:*",

View file

@ -63,7 +63,7 @@
"vite": "^4.0.3"
},
"peerDependencies": {
"astro": "workspace:^2.0.5",
"astro": "workspace:^2.0.6",
"sharp": ">=0.31.0"
},
"peerDependenciesMeta": {

View file

@ -23,10 +23,10 @@ describe('Head injection w/ MDX', () => {
const html = await fixture.readFile('/indexThree/index.html');
const { document } = parseHTML(html);
const links = document.querySelectorAll('link[rel=stylesheet]');
const links = document.querySelectorAll('head link[rel=stylesheet]');
expect(links).to.have.a.lengthOf(1);
const scripts = document.querySelectorAll('script[type=module]');
const scripts = document.querySelectorAll('head script[type=module]');
expect(scripts).to.have.a.lengthOf(1);
});
});

View file

@ -39,7 +39,7 @@
"esbuild": "^0.15.18"
},
"peerDependencies": {
"astro": "workspace:^2.0.5"
"astro": "workspace:^2.0.6"
},
"devDependencies": {
"@netlify/edge-handler-types": "^0.34.1",

View file

@ -1,5 +1,11 @@
# @astrojs/node
## 5.0.3
### Patch Changes
- [#6110](https://github.com/withastro/astro/pull/6110) [`67ccec9e1`](https://github.com/withastro/astro/commit/67ccec9e168f241318d9dac40096016982d89b7b) Thanks [@matthewp](https://github.com/matthewp)! - Fixes support for prerendering and query params
## 5.0.2
### Patch Changes

View file

@ -1,7 +1,7 @@
{
"name": "@astrojs/node",
"description": "Deploy your site to a Node.js server",
"version": "5.0.2",
"version": "5.0.3",
"type": "module",
"types": "./dist/index.d.ts",
"author": "withastro",
@ -31,13 +31,15 @@
},
"dependencies": {
"@astrojs/webapi": "^2.0.0",
"send": "^0.18.0"
"send": "^0.18.0",
"server-destroy": "^1.0.1"
},
"peerDependencies": {
"astro": "workspace:^2.0.5"
"astro": "workspace:^2.0.6"
},
"devDependencies": {
"@types/send": "^0.17.1",
"@types/server-destroy": "^1.0.1",
"astro": "workspace:*",
"astro-scripts": "workspace:*",
"chai": "^4.3.6",

View file

@ -2,6 +2,7 @@ import fs from 'fs';
import http from 'http';
import https from 'https';
import send from 'send';
import enableDestroy from 'server-destroy';
import { fileURLToPath } from 'url';
interface CreateServerOptions {
@ -19,6 +20,7 @@ export function createServer(
if (req.url) {
let pathname = removeBase(req.url);
pathname = pathname[0] === '/' ? pathname : '/' + pathname;
pathname = new URL(pathname, `http://${host}:${port}`).pathname;
const stream = send(req, encodeURI(decodeURI(pathname)), {
root: fileURLToPath(client),
dotfiles: pathname.startsWith('/.well-known/') ? 'allow' : 'deny',
@ -63,6 +65,7 @@ export function createServer(
httpServer = http.createServer(listener);
}
httpServer.listen(port, host);
enableDestroy(httpServer);
// Resolves once the server is closed
const closed = new Promise<void>((resolve, reject) => {
@ -79,7 +82,7 @@ export function createServer(
server: httpServer,
stop: async () => {
await new Promise((resolve, reject) => {
httpServer.close((err) => (err ? reject(err) : resolve(undefined)));
httpServer.destroy((err) => (err ? reject(err) : resolve(undefined)));
});
},
};

View file

@ -6,7 +6,7 @@ export function getAdapter(options: Options): AstroAdapter {
name: '@astrojs/node',
serverEntrypoint: '@astrojs/node/server.js',
previewEntrypoint: '@astrojs/node/preview.js',
exports: ['handler'],
exports: ['handler', 'startServer'],
args: options,
};
}

View file

@ -13,6 +13,7 @@ export function createExports(manifest: SSRManifest, options: Options) {
const app = new NodeApp(manifest);
return {
handler: middleware(app, options.mode),
startServer: () => startServer(app, options),
};
}

View file

@ -55,8 +55,12 @@ export default function startServer(app: NodeApp, options: Options) {
);
const protocol = server.server instanceof https.Server ? 'https' : 'http';
// eslint-disable-next-line no-console
console.log(`Server listening on ${protocol}://${host}:${port}`);
return server.closed();
return {
server,
done: server.closed(),
};
}

View file

@ -0,0 +1,9 @@
{
"name": "@test/nodejs-encoded",
"version": "0.0.0",
"private": true,
"dependencies": {
"astro": "workspace:*",
"@astrojs/node": "workspace:*"
}
}

View file

@ -0,0 +1,10 @@
---
---
<html>
<head>
<title>One</title>
</head>
<body>
<h1>One</h1>
</body>
</html>

View file

@ -0,0 +1,11 @@
---
export const prerender = true;
---
<html>
<head>
<title>Two</title>
</head>
<body>
<h1>Two</h1>
</body>
</html>

View file

@ -0,0 +1,60 @@
import nodejs from '../dist/index.js';
import { loadFixture, createRequestAndResponse } from './test-utils.js';
import { expect } from 'chai';
import * as cheerio from 'cheerio';
import { fetch } from 'undici';
describe('Prerendering', () => {
/** @type {import('./test-utils').Fixture} */
let fixture;
let server;
before(async () => {
process.env.ASTRO_NODE_AUTOSTART = 'disabled';
fixture = await loadFixture({
root: './fixtures/prerender/',
output: 'server',
adapter: nodejs({ mode: 'standalone' }),
});
await fixture.build();
const { startServer } = await await load();
let res = startServer();
server = res.server;
});
after(async () => {
await server.stop();
});
async function load() {
const mod = await import('./fixtures/prerender/dist/server/entry.mjs');
return mod;
}
it('Can render SSR route', async () => {
const res = await fetch(`http://${server.host}:${server.port}/one`);
const html = await res.text();
const $ = cheerio.load(html);
expect(res.status).to.equal(200);
expect($('h1').text()).to.equal('One');
});
it('Can render prerendered route', async () => {
const res = await fetch(`http://${server.host}:${server.port}/two`);
const html = await res.text();
const $ = cheerio.load(html);
expect(res.status).to.equal(200);
expect($('h1').text()).to.equal('Two');
});
it('Can render prerendered route with query params', async () => {
const res = await fetch(`http://${server.host}:${server.port}/two?foo=bar`);
const html = await res.text();
const $ = cheerio.load(html);
expect(res.status).to.equal(200);
expect($('h1').text()).to.equal('Two');
});
});

View file

@ -1,5 +1,11 @@
# @astrojs/preact
## 2.0.2
### Patch Changes
- [#6108](https://github.com/withastro/astro/pull/6108) [`f9babc38b`](https://github.com/withastro/astro/commit/f9babc38b48049f73a3a282f48d8cb26969cb0a0) Thanks [@matthewp](https://github.com/matthewp)! - Upgrade babel dependency to fix security vuln
## 2.0.1
### Patch Changes

View file

@ -1,7 +1,7 @@
{
"name": "@astrojs/preact",
"description": "Use Preact components within Astro",
"version": "2.0.1",
"version": "2.0.2",
"type": "module",
"types": "./dist/index.d.ts",
"author": "withastro",
@ -34,7 +34,7 @@
"dependencies": {
"@babel/core": ">=7.0.0-0 <8.0.0",
"@babel/plugin-transform-react-jsx": "^7.17.12",
"babel-plugin-module-resolver": "^4.1.0",
"babel-plugin-module-resolver": "^5.0.0",
"preact-render-to-string": "^5.2.4",
"@preact/signals": "^1.1.0"
},

View file

@ -1,5 +1,11 @@
# @astrojs/solid-js
## 2.0.2
### Patch Changes
- [#6104](https://github.com/withastro/astro/pull/6104) [`8c80e78dd`](https://github.com/withastro/astro/commit/8c80e78dd5ebfe0528390f42222aadf4786a90fe) Thanks [@yasserhennawi](https://github.com/yasserhennawi)! - Bump vitefu for peerDep warning with Vite 4
## 2.0.1
### Patch Changes

View file

@ -1,6 +1,6 @@
{
"name": "@astrojs/solid-js",
"version": "2.0.1",
"version": "2.0.2",
"description": "Use Solid components within Astro",
"type": "module",
"types": "./dist/index.d.ts",

View file

@ -44,7 +44,7 @@
},
"peerDependencies": {
"svelte": "^3.54.0",
"astro": "workspace:^2.0.5"
"astro": "workspace:^2.0.6"
},
"engines": {
"node": ">=16.12.0"

View file

@ -41,7 +41,7 @@
},
"peerDependencies": {
"tailwindcss": "^3.0.24",
"astro": "workspace:^2.0.5"
"astro": "workspace:^2.0.6"
},
"pnpm": {
"peerDependencyRules": {

View file

@ -1,5 +1,14 @@
# @astrojs/vercel
## 3.0.1
### Patch Changes
- [#6085](https://github.com/withastro/astro/pull/6085) [`b236b5cc8`](https://github.com/withastro/astro/commit/b236b5cc8eb9e078758d9c6cb77d88c39bb1fc3d) Thanks [@AirBorne04](https://github.com/AirBorne04)! - Added second build step through esbuild, to allow framework defined build (vite build) and target defined bundling (esbuilt step)
- Updated dependencies [[`9bec6bc41`](https://github.com/withastro/astro/commit/9bec6bc410f324a41c67e5d185fa86f78d7625f2)]:
- astro@2.0.6
## 3.0.0
### Major Changes

View file

@ -1,7 +1,7 @@
{
"name": "@astrojs/vercel",
"description": "Deploy your site to Vercel",
"version": "3.0.0",
"version": "3.0.1",
"type": "module",
"author": "withastro",
"license": "MIT",
@ -50,7 +50,7 @@
"set-cookie-parser": "^2.5.1"
},
"peerDependencies": {
"astro": "workspace:^2.0.5"
"astro": "workspace:^2.0.6"
},
"devDependencies": {
"@types/set-cookie-parser": "^2.4.2",

View file

@ -51,7 +51,7 @@
},
"peerDependencies": {
"vue": "^3.2.30",
"astro": "workspace:^2.0.5"
"astro": "workspace:^2.0.6"
},
"engines": {
"node": ">=16.12.0"

View file

@ -63,7 +63,7 @@ importers:
examples/basics:
specifiers:
astro: ^2.0.5
astro: ^2.0.6
dependencies:
astro: link:../../packages/astro
@ -72,7 +72,7 @@ importers:
'@astrojs/mdx': ^0.16.0
'@astrojs/rss': ^2.1.0
'@astrojs/sitemap': ^1.0.1
astro: ^2.0.5
astro: ^2.0.6
dependencies:
'@astrojs/mdx': link:../../packages/integrations/mdx
'@astrojs/rss': link:../../packages/astro-rss
@ -81,14 +81,14 @@ importers:
examples/component:
specifiers:
astro: ^2.0.5
astro: ^2.0.6
devDependencies:
astro: link:../../packages/astro
examples/deno:
specifiers:
'@astrojs/deno': ^4.0.0
astro: ^2.0.5
astro: ^2.0.6
dependencies:
astro: link:../../packages/astro
devDependencies:
@ -97,14 +97,14 @@ importers:
examples/docs:
specifiers:
'@algolia/client-search': ^4.13.1
'@astrojs/preact': ^2.0.1
'@astrojs/preact': ^2.0.2
'@astrojs/react': ^2.0.2
'@docsearch/css': ^3.1.0
'@docsearch/react': ^3.1.0
'@types/node': ^18.0.0
'@types/react': ^17.0.45
'@types/react-dom': ^18.0.0
astro: ^2.0.5
astro: ^2.0.6
html-escaper: ^3.0.3
preact: ^10.7.3
react: ^18.1.0
@ -130,7 +130,7 @@ importers:
'@astrojs/alpinejs': ^0.1.3
'@types/alpinejs': ^3.7.0
alpinejs: ^3.10.2
astro: ^2.0.5
astro: ^2.0.6
dependencies:
'@astrojs/alpinejs': link:../../packages/integrations/alpinejs
'@types/alpinejs': 3.7.1
@ -141,7 +141,7 @@ importers:
specifiers:
'@astrojs/lit': ^1.1.2
'@webcomponents/template-shadowroot': ^0.1.0
astro: ^2.0.5
astro: ^2.0.6
lit: ^2.2.5
dependencies:
'@astrojs/lit': link:../../packages/integrations/lit
@ -151,12 +151,12 @@ importers:
examples/framework-multiple:
specifiers:
'@astrojs/preact': ^2.0.1
'@astrojs/preact': ^2.0.2
'@astrojs/react': ^2.0.2
'@astrojs/solid-js': ^2.0.1
'@astrojs/solid-js': ^2.0.2
'@astrojs/svelte': ^2.0.1
'@astrojs/vue': ^2.0.1
astro: ^2.0.5
astro: ^2.0.6
preact: ^10.7.3
react: ^18.1.0
react-dom: ^18.1.0
@ -179,9 +179,9 @@ importers:
examples/framework-preact:
specifiers:
'@astrojs/preact': ^2.0.1
'@astrojs/preact': ^2.0.2
'@preact/signals': ^1.1.0
astro: ^2.0.5
astro: ^2.0.6
preact: ^10.7.3
dependencies:
'@astrojs/preact': link:../../packages/integrations/preact
@ -194,7 +194,7 @@ importers:
'@astrojs/react': ^2.0.2
'@types/react': ^18.0.10
'@types/react-dom': ^18.0.5
astro: ^2.0.5
astro: ^2.0.6
react: ^18.1.0
react-dom: ^18.1.0
dependencies:
@ -207,8 +207,8 @@ importers:
examples/framework-solid:
specifiers:
'@astrojs/solid-js': ^2.0.1
astro: ^2.0.5
'@astrojs/solid-js': ^2.0.2
astro: ^2.0.6
solid-js: ^1.4.3
dependencies:
'@astrojs/solid-js': link:../../packages/integrations/solid
@ -218,7 +218,7 @@ importers:
examples/framework-svelte:
specifiers:
'@astrojs/svelte': ^2.0.1
astro: ^2.0.5
astro: ^2.0.6
svelte: ^3.48.0
dependencies:
'@astrojs/svelte': link:../../packages/integrations/svelte
@ -228,7 +228,7 @@ importers:
examples/framework-vue:
specifiers:
'@astrojs/vue': ^2.0.1
astro: ^2.0.5
astro: ^2.0.6
vue: ^3.2.37
dependencies:
'@astrojs/vue': link:../../packages/integrations/vue
@ -237,8 +237,8 @@ importers:
examples/hackernews:
specifiers:
'@astrojs/node': ^5.0.2
astro: ^2.0.5
'@astrojs/node': ^5.0.3
astro: ^2.0.6
dependencies:
'@astrojs/node': link:../../packages/integrations/node
astro: link:../../packages/astro
@ -251,33 +251,33 @@ importers:
examples/integration:
specifiers:
astro: ^2.0.5
astro: ^2.0.6
devDependencies:
astro: link:../../packages/astro
examples/minimal:
specifiers:
astro: ^2.0.5
astro: ^2.0.6
dependencies:
astro: link:../../packages/astro
examples/non-html-pages:
specifiers:
astro: ^2.0.5
astro: ^2.0.6
dependencies:
astro: link:../../packages/astro
examples/portfolio:
specifiers:
astro: ^2.0.5
astro: ^2.0.6
dependencies:
astro: link:../../packages/astro
examples/ssr:
specifiers:
'@astrojs/node': ^5.0.2
'@astrojs/node': ^5.0.3
'@astrojs/svelte': ^2.0.1
astro: ^2.0.5
astro: ^2.0.6
concurrently: ^7.2.1
svelte: ^3.48.0
unocss: ^0.15.6
@ -294,7 +294,7 @@ importers:
examples/with-markdown-plugins:
specifiers:
'@astrojs/markdown-remark': ^2.0.1
astro: ^2.0.5
astro: ^2.0.6
hast-util-select: 5.0.1
rehype-autolink-headings: ^6.1.1
rehype-slug: ^5.0.1
@ -311,15 +311,15 @@ importers:
examples/with-markdown-shiki:
specifiers:
astro: ^2.0.5
astro: ^2.0.6
dependencies:
astro: link:../../packages/astro
examples/with-mdx:
specifiers:
'@astrojs/mdx': ^0.16.0
'@astrojs/preact': ^2.0.1
astro: ^2.0.5
'@astrojs/preact': ^2.0.2
astro: ^2.0.6
preact: ^10.6.5
dependencies:
'@astrojs/mdx': link:../../packages/integrations/mdx
@ -329,9 +329,9 @@ importers:
examples/with-nanostores:
specifiers:
'@astrojs/preact': ^2.0.1
'@astrojs/preact': ^2.0.2
'@nanostores/preact': ^0.1.3
astro: ^2.0.5
astro: ^2.0.6
nanostores: ^0.5.12
preact: ^10.7.3
dependencies:
@ -346,7 +346,7 @@ importers:
'@astrojs/mdx': ^0.16.0
'@astrojs/tailwind': ^3.0.1
'@types/canvas-confetti': ^1.4.3
astro: ^2.0.5
astro: ^2.0.6
autoprefixer: ^10.4.7
canvas-confetti: ^1.5.1
postcss: ^8.4.14
@ -363,7 +363,7 @@ importers:
examples/with-vite-plugin-pwa:
specifiers:
astro: ^2.0.5
astro: ^2.0.6
vite-plugin-pwa: 0.11.11
workbox-window: ^6.5.3
dependencies:
@ -373,7 +373,7 @@ importers:
examples/with-vitest:
specifiers:
astro: ^2.0.5
astro: ^2.0.6
vitest: ^0.20.3
dependencies:
astro: link:../../packages/astro
@ -478,7 +478,7 @@ importers:
'@astrojs/webapi': link:../webapi
'@babel/core': 7.20.12
'@babel/generator': 7.20.14
'@babel/parser': 7.20.13
'@babel/parser': 7.20.15
'@babel/plugin-transform-react-jsx': 7.20.13_@babel+core@7.20.12
'@babel/traverse': 7.20.13
'@babel/types': 7.20.7
@ -519,8 +519,8 @@ importers:
typescript: 4.9.5
unist-util-visit: 4.1.2
vfile: 5.3.6
vite: 4.1.0_sass@1.58.0
vitefu: 0.2.4_vite@4.1.0
vite: 4.1.1_sass@1.58.0
vitefu: 0.2.4_vite@4.1.1
yargs-parser: 21.1.1
zod: 3.20.2
devDependencies:
@ -587,7 +587,7 @@ importers:
kleur: ^4.1.5
mocha: ^9.2.2
dependencies:
fast-xml-parser: 4.1.0
fast-xml-parser: 4.1.1
kleur: 4.1.5
devDependencies:
'@types/chai': 4.3.4
@ -2731,7 +2731,7 @@ importers:
mocha: 9.2.2
rollup-plugin-copy: 3.4.0
sharp: 0.31.3
vite: 4.1.0
vite: 4.1.1
packages/integrations/image/test/fixtures/background-color-image:
specifiers:
@ -2939,7 +2939,7 @@ importers:
remark-rehype: 10.1.0
remark-shiki-twoslash: 3.1.0
remark-toc: 8.0.1
vite: 4.1.0
vite: 4.1.1
packages/integrations/mdx/test/fixtures/mdx-frontmatter-injection:
specifiers:
@ -3040,7 +3040,7 @@ importers:
chai: 4.3.7
cheerio: 1.0.0-rc.12
mocha: 9.2.2
vite: 4.1.0_@types+node@14.18.36
vite: 4.1.1_@types+node@14.18.36
packages/integrations/netlify/test/edge-functions/fixtures/dynimport:
specifiers:
@ -3076,6 +3076,7 @@ importers:
specifiers:
'@astrojs/webapi': ^2.0.0
'@types/send': ^0.17.1
'@types/server-destroy': ^1.0.1
astro: workspace:*
astro-scripts: workspace:*
chai: ^4.3.6
@ -3083,12 +3084,15 @@ importers:
mocha: ^9.2.2
node-mocks-http: ^1.11.0
send: ^0.18.0
server-destroy: ^1.0.1
undici: ^5.14.0
dependencies:
'@astrojs/webapi': link:../../webapi
send: 0.18.0
server-destroy: 1.0.1
devDependencies:
'@types/send': 0.17.1
'@types/server-destroy': 1.0.1
astro: link:../../astro
astro-scripts: link:../../../scripts
chai: 4.3.7
@ -3121,6 +3125,14 @@ importers:
'@astrojs/node': link:../../..
astro: link:../../../../../astro
packages/integrations/node/test/fixtures/prerender:
specifiers:
'@astrojs/node': workspace:*
astro: workspace:*
dependencies:
'@astrojs/node': link:../../..
astro: link:../../../../../astro
packages/integrations/node/test/fixtures/url-protocol:
specifiers:
'@astrojs/node': workspace:*
@ -3157,14 +3169,14 @@ importers:
'@preact/signals': ^1.1.0
astro: workspace:*
astro-scripts: workspace:*
babel-plugin-module-resolver: ^4.1.0
babel-plugin-module-resolver: ^5.0.0
preact: ^10.7.3
preact-render-to-string: ^5.2.4
dependencies:
'@babel/core': 7.20.12
'@babel/plugin-transform-react-jsx': 7.20.13_@babel+core@7.20.12
'@preact/signals': 1.1.3_preact@10.11.3
babel-plugin-module-resolver: 4.1.0
babel-plugin-module-resolver: 5.0.0
preact-render-to-string: 5.2.6_preact@10.11.3
devDependencies:
astro: link:../../astro
@ -3280,13 +3292,13 @@ importers:
svelte2tsx: ^0.5.11
vite: ^4.0.3
dependencies:
'@sveltejs/vite-plugin-svelte': 2.0.2_svelte@3.55.1+vite@4.1.0
'@sveltejs/vite-plugin-svelte': 2.0.2_svelte@3.55.1+vite@4.1.1
svelte2tsx: 0.5.23_svelte@3.55.1
devDependencies:
astro: link:../../astro
astro-scripts: link:../../../scripts
svelte: 3.55.1
vite: 4.1.0
vite: 4.1.1
packages/integrations/tailwind:
specifiers:
@ -3307,7 +3319,7 @@ importers:
astro: link:../../astro
astro-scripts: link:../../../scripts
tailwindcss: 3.2.4_postcss@8.4.21
vite: 4.1.0
vite: 4.1.1
packages/integrations/turbolinks:
specifiers:
@ -3366,8 +3378,8 @@ importers:
vite: ^4.0.3
vue: ^3.2.37
dependencies:
'@vitejs/plugin-vue': 4.0.0_vite@4.1.0+vue@3.2.47
'@vitejs/plugin-vue-jsx': 3.0.0_vite@4.1.0+vue@3.2.47
'@vitejs/plugin-vue': 4.0.0_vite@4.1.1+vue@3.2.47
'@vitejs/plugin-vue-jsx': 3.0.0_vite@4.1.1+vue@3.2.47
'@vue/babel-plugin-jsx': 1.1.1
'@vue/compiler-sfc': 3.2.47
devDependencies:
@ -3377,7 +3389,7 @@ importers:
chai: 4.3.7
linkedom: 0.14.21
mocha: 9.2.2
vite: 4.1.0
vite: 4.1.1
vue: 3.2.47
packages/integrations/vue/test/fixtures/app-entrypoint:
@ -3940,7 +3952,7 @@ packages:
'@babel/helper-compilation-targets': 7.20.7_@babel+core@7.20.12
'@babel/helper-module-transforms': 7.20.11
'@babel/helpers': 7.20.13
'@babel/parser': 7.20.13
'@babel/parser': 7.20.15
'@babel/template': 7.20.7
'@babel/traverse': 7.20.13
'@babel/types': 7.20.7
@ -4215,8 +4227,8 @@ packages:
chalk: 2.4.2
js-tokens: 4.0.0
/@babel/parser/7.20.13:
resolution: {integrity: sha512-gFDLKMfpiXCsjt4za2JA9oTMn70CeseCehb11kRZgvd7+F67Hih3OHOK24cRrWECJ/ljfPGac6ygXAs/C8kIvw==}
/@babel/parser/7.20.15:
resolution: {integrity: sha512-DI4a1oZuf8wC+oAJA9RW6ga3Zbe8RZFt7kD9i4qAspz3I/yHet1VvC3DiSy/fsUvv5pvJuNPh0LPOdCcqinDPg==}
engines: {node: '>=6.0.0'}
hasBin: true
dependencies:
@ -4744,8 +4756,8 @@ packages:
'@babel/helper-plugin-utils': 7.20.2
dev: false
/@babel/plugin-transform-block-scoping/7.20.14_@babel+core@7.20.12:
resolution: {integrity: sha512-sMPepQtsOs5fM1bwNvuJJHvaCfOEQfmc01FGw0ELlTpTJj5Ql/zuNRRldYhAPys4ghXdBIQJbRVYi44/7QflQQ==}
/@babel/plugin-transform-block-scoping/7.20.15_@babel+core@7.20.12:
resolution: {integrity: sha512-Vv4DMZ6MiNOhu/LdaZsT/bsLRxgL94d269Mv4R/9sp6+Mp++X/JqypZYypJXLlM4mlL352/Egzbzr98iABH1CA==}
engines: {node: '>=6.9.0'}
peerDependencies:
'@babel/core': ^7.0.0-0
@ -5241,7 +5253,7 @@ packages:
'@babel/plugin-transform-arrow-functions': 7.20.7_@babel+core@7.20.12
'@babel/plugin-transform-async-to-generator': 7.20.7_@babel+core@7.20.12
'@babel/plugin-transform-block-scoped-functions': 7.18.6_@babel+core@7.20.12
'@babel/plugin-transform-block-scoping': 7.20.14_@babel+core@7.20.12
'@babel/plugin-transform-block-scoping': 7.20.15_@babel+core@7.20.12
'@babel/plugin-transform-classes': 7.20.7_@babel+core@7.20.12
'@babel/plugin-transform-computed-properties': 7.20.7_@babel+core@7.20.12
'@babel/plugin-transform-destructuring': 7.20.7_@babel+core@7.20.12
@ -5308,7 +5320,7 @@ packages:
engines: {node: '>=6.9.0'}
dependencies:
'@babel/code-frame': 7.18.6
'@babel/parser': 7.20.13
'@babel/parser': 7.20.15
'@babel/types': 7.20.7
dev: false
@ -5322,7 +5334,7 @@ packages:
'@babel/helper-function-name': 7.19.0
'@babel/helper-hoist-variables': 7.18.6
'@babel/helper-split-export-declaration': 7.18.6
'@babel/parser': 7.20.13
'@babel/parser': 7.20.15
'@babel/types': 7.20.7
debug: 4.3.4
globals: 11.12.0
@ -6770,7 +6782,7 @@ packages:
string.prototype.matchall: 4.0.8
dev: false
/@sveltejs/vite-plugin-svelte/2.0.2_svelte@3.55.1+vite@4.1.0:
/@sveltejs/vite-plugin-svelte/2.0.2_svelte@3.55.1+vite@4.1.1:
resolution: {integrity: sha512-xCEan0/NNpQuL0l5aS42FjwQ6wwskdxC3pW1OeFtEKNZwRg7Evro9lac9HesGP6TdFsTv2xMes5ASQVKbCacxg==}
engines: {node: ^14.18.0 || >= 16}
peerDependencies:
@ -6786,8 +6798,8 @@ packages:
magic-string: 0.27.0
svelte: 3.55.1
svelte-hmr: 0.15.1_svelte@3.55.1
vite: 4.1.0
vitefu: 0.2.4_vite@4.1.0
vite: 4.1.1
vitefu: 0.2.4_vite@4.1.1
transitivePeerDependencies:
- supports-color
dev: false
@ -6821,7 +6833,7 @@ packages:
/@types/babel__core/7.20.0:
resolution: {integrity: sha512-+n8dL/9GWblDO0iU6eZAwEIJVr5DWigtle+Q6HLOrh/pdbXOhOtqzq8VPPE2zvNJzSKY4vH/z3iT3tn0A3ypiQ==}
dependencies:
'@babel/parser': 7.20.13
'@babel/parser': 7.20.15
'@babel/types': 7.20.7
'@types/babel__generator': 7.6.4
'@types/babel__template': 7.4.1
@ -6836,7 +6848,7 @@ packages:
/@types/babel__template/7.4.1:
resolution: {integrity: sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==}
dependencies:
'@babel/parser': 7.20.13
'@babel/parser': 7.20.15
'@babel/types': 7.20.7
dev: false
@ -7440,7 +7452,7 @@ packages:
- supports-color
dev: false
/@vitejs/plugin-vue-jsx/3.0.0_vite@4.1.0+vue@3.2.47:
/@vitejs/plugin-vue-jsx/3.0.0_vite@4.1.1+vue@3.2.47:
resolution: {integrity: sha512-vurkuzgac5SYuxd2HUZqAFAWGTF10diKBwJNbCvnWijNZfXd+7jMtqjPFbGt7idOJUn584fP1Ar9j/GN2jQ3Ew==}
engines: {node: ^14.18.0 || >=16.0.0}
peerDependencies:
@ -7453,13 +7465,13 @@ packages:
'@babel/core': 7.20.12
'@babel/plugin-transform-typescript': 7.20.13_@babel+core@7.20.12
'@vue/babel-plugin-jsx': 1.1.1_@babel+core@7.20.12
vite: 4.1.0
vite: 4.1.1
vue: 3.2.47
transitivePeerDependencies:
- supports-color
dev: false
/@vitejs/plugin-vue/4.0.0_vite@4.1.0+vue@3.2.47:
/@vitejs/plugin-vue/4.0.0_vite@4.1.1+vue@3.2.47:
resolution: {integrity: sha512-e0X4jErIxAB5oLtDqbHvHpJe/uWNkdpYV83AOG2xo2tEVSzCzewgJMtREZM30wXnM5ls90hxiOtAuVU6H5JgbA==}
engines: {node: ^14.18.0 || >=16.0.0}
peerDependencies:
@ -7469,7 +7481,7 @@ packages:
vite:
optional: true
dependencies:
vite: 4.1.0
vite: 4.1.1
vue: 3.2.47
dev: false
@ -7528,7 +7540,7 @@ packages:
/@vue/compiler-core/3.2.47:
resolution: {integrity: sha512-p4D7FDnQb7+YJmO2iPEv0SQNeNzcbHdGByJDsT4lynf63AFkOTFN07HsiRSvjGo0QrxR/o3d0hUyNCUnBU2Tig==}
dependencies:
'@babel/parser': 7.20.13
'@babel/parser': 7.20.15
'@vue/shared': 3.2.47
estree-walker: 2.0.2
source-map: 0.6.1
@ -7542,7 +7554,7 @@ packages:
/@vue/compiler-sfc/3.2.47:
resolution: {integrity: sha512-rog05W+2IFfxjMcFw10tM9+f7i/+FFpZJJ5XHX72NP9eC2uRD+42M3pYcQqDXVYoj74kHMSEdQ/WmCjt8JFksQ==}
dependencies:
'@babel/parser': 7.20.13
'@babel/parser': 7.20.15
'@vue/compiler-core': 3.2.47
'@vue/compiler-dom': 3.2.47
'@vue/compiler-ssr': 3.2.47
@ -7562,7 +7574,7 @@ packages:
/@vue/reactivity-transform/3.2.47:
resolution: {integrity: sha512-m8lGXw8rdnPVVIdIFhf0LeQ/ixyHkH5plYuS83yop5n7ggVJU+z5v0zecwEnX7fa7HNLBhh2qngJJkxpwEEmYA==}
dependencies:
'@babel/parser': 7.20.13
'@babel/parser': 7.20.15
'@vue/compiler-core': 3.2.47
'@vue/shared': 3.2.47
estree-walker: 2.0.2
@ -7918,6 +7930,17 @@ packages:
resolve: 1.22.1
dev: false
/babel-plugin-module-resolver/5.0.0:
resolution: {integrity: sha512-g0u+/ChLSJ5+PzYwLwP8Rp8Rcfowz58TJNCe+L/ui4rpzE/mg//JVX0EWBUYoxaextqnwuGHzfGp2hh0PPV25Q==}
engines: {node: '>= 16'}
dependencies:
find-babel-config: 2.0.0
glob: 8.1.0
pkg-up: 3.1.0
reselect: 4.1.7
resolve: 1.22.1
dev: false
/babel-plugin-polyfill-corejs2/0.3.3_@babel+core@7.20.12:
resolution: {integrity: sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q==}
peerDependencies:
@ -8095,7 +8118,7 @@ packages:
hasBin: true
dependencies:
caniuse-lite: 1.0.30001450
electron-to-chromium: 1.4.284
electron-to-chromium: 1.4.285
node-releases: 2.0.9
update-browserslist-db: 1.0.10_browserslist@4.21.5
@ -8935,8 +8958,8 @@ packages:
jake: 10.8.5
dev: false
/electron-to-chromium/1.4.284:
resolution: {integrity: sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA==}
/electron-to-chromium/1.4.285:
resolution: {integrity: sha512-47o4PPgxfU1KMNejz+Dgaodf7YTcg48uOfV1oM6cs3adrl2+7R+dHkt3Jpxqo0LRCbGJEzTKMUt0RdvByb/leg==}
/emmet/2.3.6:
resolution: {integrity: sha512-pLS4PBPDdxuUAmw7Me7+TcHbykTsBKN/S9XJbUOMFQrNv9MoshzyMFK/R57JBm94/6HSL4vHnDeEmxlC82NQ4A==}
@ -9823,8 +9846,8 @@ packages:
resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==}
dev: true
/fast-xml-parser/4.1.0:
resolution: {integrity: sha512-IuFUr5zpPwsoy6NRtgLK1pEuJe89Sd0gYS0U4dIP5tRbpzALraOcxJVQT6ZBNheMVdX7nBkNpeagHVpOYnLcmQ==}
/fast-xml-parser/4.1.1:
resolution: {integrity: sha512-4gAP5PvNyrqePBOIIcpaEeE+nKBry1n6qTQiJsE59sLP0OC+YwhU7/XVmLLEMexbiluFQX1yEYm82Pk9B7xEiw==}
hasBin: true
dependencies:
strnum: 1.0.5
@ -9889,6 +9912,14 @@ packages:
path-exists: 3.0.0
dev: false
/find-babel-config/2.0.0:
resolution: {integrity: sha512-dOKT7jvF3hGzlW60Gc3ONox/0rRZ/tz7WCil0bqA1In/3I8f1BctpXahRnEKDySZqci7u+dqq93sZST9fOJpFw==}
engines: {node: '>=16.0.0'}
dependencies:
json5: 2.2.3
path-exists: 4.0.0
dev: false
/find-up/3.0.0:
resolution: {integrity: sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==}
engines: {node: '>=6'}
@ -10151,6 +10182,17 @@ packages:
once: 1.4.0
path-is-absolute: 1.0.1
/glob/8.1.0:
resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==}
engines: {node: '>=12'}
dependencies:
fs.realpath: 1.0.0
inflight: 1.0.6
inherits: 2.0.4
minimatch: 5.1.6
once: 1.4.0
dev: false
/global-agent/3.0.0:
resolution: {integrity: sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==}
engines: {node: '>=10.0'}
@ -10600,8 +10642,8 @@ packages:
sharp: 0.31.3
dev: false
/immutable/4.2.2:
resolution: {integrity: sha512-fTMKDwtbvO5tldky9QZ2fMX7slR0mYpY5nbnFWYp0fOzDhHqhgIw9KoYgxLWsoNTS9ZHGauHj18DTyEw6BK3Og==}
/immutable/4.2.3:
resolution: {integrity: sha512-IHpmvaOIX4VLJwPOuQr1NpeBr2ZG6vpIj3blsLVxXRWJscLioaJRStqC+NcBsLeCDsnGlPpXd5/WZmnE7MbsKA==}
/import-fresh/3.3.0:
resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==}
@ -13733,7 +13775,7 @@ packages:
hasBin: true
dependencies:
chokidar: 3.5.3
immutable: 4.2.2
immutable: 4.2.3
source-map-js: 1.0.2
/sax/1.2.4:
@ -15112,8 +15154,8 @@ packages:
fsevents: 2.3.2
dev: false
/vite/4.1.0:
resolution: {integrity: sha512-YoUKE/9bbK4C8ZeSYMDDEF8H5aypmWUq4WisftDhntR1gkI2zt2SGT/5Wd2xu6ZoVXkCyO3U4844KWG9e4nFoQ==}
/vite/4.1.1:
resolution: {integrity: sha512-LM9WWea8vsxhr782r9ntg+bhSFS06FJgCvvB0+8hf8UWtvaiDagKYWXndjfX6kGl74keHJUcpzrQliDXZlF5yg==}
engines: {node: ^14.18.0 || >=16.0.0}
hasBin: true
peerDependencies:
@ -15144,8 +15186,8 @@ packages:
optionalDependencies:
fsevents: 2.3.2
/vite/4.1.0_@types+node@14.18.36:
resolution: {integrity: sha512-YoUKE/9bbK4C8ZeSYMDDEF8H5aypmWUq4WisftDhntR1gkI2zt2SGT/5Wd2xu6ZoVXkCyO3U4844KWG9e4nFoQ==}
/vite/4.1.1_@types+node@14.18.36:
resolution: {integrity: sha512-LM9WWea8vsxhr782r9ntg+bhSFS06FJgCvvB0+8hf8UWtvaiDagKYWXndjfX6kGl74keHJUcpzrQliDXZlF5yg==}
engines: {node: ^14.18.0 || >=16.0.0}
hasBin: true
peerDependencies:
@ -15178,8 +15220,8 @@ packages:
fsevents: 2.3.2
dev: true
/vite/4.1.0_sass@1.58.0:
resolution: {integrity: sha512-YoUKE/9bbK4C8ZeSYMDDEF8H5aypmWUq4WisftDhntR1gkI2zt2SGT/5Wd2xu6ZoVXkCyO3U4844KWG9e4nFoQ==}
/vite/4.1.1_sass@1.58.0:
resolution: {integrity: sha512-LM9WWea8vsxhr782r9ntg+bhSFS06FJgCvvB0+8hf8UWtvaiDagKYWXndjfX6kGl74keHJUcpzrQliDXZlF5yg==}
engines: {node: ^14.18.0 || >=16.0.0}
hasBin: true
peerDependencies:
@ -15221,7 +15263,7 @@ packages:
optional: true
dev: false
/vitefu/0.2.4_vite@4.1.0:
/vitefu/0.2.4_vite@4.1.1:
resolution: {integrity: sha512-fanAXjSaf9xXtOOeno8wZXIhgia+CZury481LsDaV++lSvcU2R9Ch2bPh3PYFyoHW+w9LqAeYRISVQjUIew14g==}
peerDependencies:
vite: ^3.0.0 || ^4.0.0
@ -15229,7 +15271,7 @@ packages:
vite:
optional: true
dependencies:
vite: 4.1.0_sass@1.58.0
vite: 4.1.1_sass@1.58.0
dev: false
/vitest/0.20.3: