From 18e0b0e077f48b9778171fd7c99c6e06f73d1e7f Mon Sep 17 00:00:00 2001 From: "Fred K. Schott" <fkschott@gmail.com> Date: Sat, 22 Jul 2023 22:58:20 -0700 Subject: [PATCH] JSX refactor --- .changeset/cool-feet-rest.md | 7 + .changeset/large-countries-share.md | 7 + .changeset/perfect-horses-tell.md | 25 + .changeset/slimy-carrots-sell.md | 9 + package.json | 2 +- .../core/build/plugins/plugin-renderers.ts | 2 + packages/astro/src/core/config/settings.ts | 3 +- packages/astro/src/core/create-vite.ts | 6 +- packages/astro/src/vite-plugin-jsx/index.ts | 251 --------- .../astro/src/vite-plugin-markdown/index.ts | 42 +- .../README.md | 0 .../import-source.ts | 0 packages/astro/src/vite-plugin-mdx/index.ts | 134 +++++ .../tag.ts | 0 .../astro/test/fixtures/jsx/astro.config.mjs | 19 +- packages/astro/test/fixtures/jsx/package.json | 1 + .../fixtures/jsx/src/components/Content.mdx | 5 + .../jsx/src/components/Frameworks.jsx | 28 - .../components/{ => preact}/PreactCounter.tsx | 2 + .../components/{ => react}/ReactCounter.jsx | 2 + .../components/{ => solid}/SolidCounter.jsx | 0 .../fixtures/jsx/src/pages/frameworks.astro | 34 +- packages/astro/test/jsx.test.js | 28 +- packages/integrations/mdx/src/index.ts | 4 +- packages/integrations/preact/package.json | 4 +- packages/integrations/preact/src/index.ts | 102 +--- packages/integrations/preact/src/server.ts | 4 +- packages/integrations/react/package.json | 3 +- packages/integrations/react/src/index.ts | 47 +- packages/integrations/solid/package.json | 6 +- packages/integrations/solid/src/index.ts | 70 ++- pnpm-lock.yaml | 514 +++++++++++------- 32 files changed, 674 insertions(+), 687 deletions(-) create mode 100644 .changeset/cool-feet-rest.md create mode 100644 .changeset/large-countries-share.md create mode 100644 .changeset/perfect-horses-tell.md create mode 100644 .changeset/slimy-carrots-sell.md delete mode 100644 packages/astro/src/vite-plugin-jsx/index.ts rename packages/astro/src/{vite-plugin-jsx => vite-plugin-mdx}/README.md (100%) rename packages/astro/src/{vite-plugin-jsx => vite-plugin-mdx}/import-source.ts (100%) create mode 100644 packages/astro/src/vite-plugin-mdx/index.ts rename packages/astro/src/{vite-plugin-jsx => vite-plugin-mdx}/tag.ts (100%) create mode 100644 packages/astro/test/fixtures/jsx/src/components/Content.mdx delete mode 100644 packages/astro/test/fixtures/jsx/src/components/Frameworks.jsx rename packages/astro/test/fixtures/jsx/src/components/{ => preact}/PreactCounter.tsx (97%) rename packages/astro/test/fixtures/jsx/src/components/{ => react}/ReactCounter.jsx (97%) rename packages/astro/test/fixtures/jsx/src/components/{ => solid}/SolidCounter.jsx (100%) diff --git a/.changeset/cool-feet-rest.md b/.changeset/cool-feet-rest.md new file mode 100644 index 000000000000..c2e724d8002c --- /dev/null +++ b/.changeset/cool-feet-rest.md @@ -0,0 +1,7 @@ +--- +'@astrojs/solid-js': major +--- + +New `include` and `exclude` config options + +The Solid integration now has new `include` and `exclude` config options. Use these if you want to use Solid alongside another JSX framework; include specifies files to be compiled for Solid and `exclude` does the opposite. diff --git a/.changeset/large-countries-share.md b/.changeset/large-countries-share.md new file mode 100644 index 000000000000..b3101d2f2225 --- /dev/null +++ b/.changeset/large-countries-share.md @@ -0,0 +1,7 @@ +--- +'@astrojs/preact': major +--- + +New `include` and `exclude` config options + +The Preact integration now has new `include` and `exclude` config options. Use these if you want to use Preact alongside another JSX framework; include specifies files to be compiled for Preact and `exclude` does the opposite. diff --git a/.changeset/perfect-horses-tell.md b/.changeset/perfect-horses-tell.md new file mode 100644 index 000000000000..e8826c015536 --- /dev/null +++ b/.changeset/perfect-horses-tell.md @@ -0,0 +1,25 @@ +--- +'astro': major +--- + +JSX refactor + +JSX in Astro has been refactored to better support each framework. In order to support multiple JSX frameworks at the same time, new `include` and `exclude` config options have been added to each integration to control which files to target. For example: + +```js +export default defineConfig({ + integrations: [ + preact({ + include: ['**/preact/*'] + }), + react({ + include: ['**/react/*'] + }), + solid({ + include: ['**/solid/*'], + }), + ] +}); +``` + +This config is only needed in projects that use multiple JSX frameworks; if only using one no config is needed. diff --git a/.changeset/slimy-carrots-sell.md b/.changeset/slimy-carrots-sell.md new file mode 100644 index 000000000000..c1c9e694f56f --- /dev/null +++ b/.changeset/slimy-carrots-sell.md @@ -0,0 +1,9 @@ +--- +'@astrojs/react': major +--- + +Support for React Refresh + +The React integration now fully supports React Refresh and is backed by `@vitejs/plugin-react`. + +Also included in this change are new `include` and `exclude` config options. Use these if you want to use React alongside another JSX framework; include specifies files to be compiled for React and `exclude` does the opposite. diff --git a/package.json b/package.json index 0c75669ae0be..4bf7436b2dc0 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "astro-benchmark": "workspace:*" }, "devDependencies": { - "@astrojs/check": "^0.1.0", + "@babel/plugin-transform-react-jsx": "^7.22.5", "@changesets/changelog-github": "^0.4.8", "@changesets/cli": "^2.26.1", "@types/node": "^18.16.18", diff --git a/packages/astro/src/core/build/plugins/plugin-renderers.ts b/packages/astro/src/core/build/plugins/plugin-renderers.ts index 912df42418f0..f0cdf898331b 100644 --- a/packages/astro/src/core/build/plugins/plugin-renderers.ts +++ b/packages/astro/src/core/build/plugins/plugin-renderers.ts @@ -38,6 +38,8 @@ export function vitePluginRenderers(opts: StaticBuildOptions): VitePlugin { exports.push(`export const renderers = [${rendererItems}];`); return `${imports.join('\n')}\n${exports.join('\n')}`; + } else { + return `export const renderers = [];`; } } }, diff --git a/packages/astro/src/core/config/settings.ts b/packages/astro/src/core/config/settings.ts index c0274f60293f..1d0938c00f33 100644 --- a/packages/astro/src/core/config/settings.ts +++ b/packages/astro/src/core/config/settings.ts @@ -3,7 +3,6 @@ import path from 'node:path'; import { fileURLToPath, pathToFileURL } from 'node:url'; import type { AstroConfig, AstroSettings } from '../../@types/astro'; import { getContentPaths } from '../../content/index.js'; -import jsxRenderer from '../../jsx/renderer.js'; import { markdownContentEntryType } from '../../vite-plugin-markdown/content-entry-type.js'; import { getDefaultClientDirectives } from '../client-directive/index.js'; import { AstroError, AstroErrorData } from '../errors/index.js'; @@ -96,7 +95,7 @@ export function createBaseSettings(config: AstroConfig): AstroSettings { }, }, ], - renderers: [jsxRenderer], + renderers: [], scripts: [], clientDirectives: getDefaultClientDirectives(), watchFiles: [], diff --git a/packages/astro/src/core/create-vite.ts b/packages/astro/src/core/create-vite.ts index efb78d137496..eca6740e815d 100644 --- a/packages/astro/src/core/create-vite.ts +++ b/packages/astro/src/core/create-vite.ts @@ -19,9 +19,9 @@ import configAliasVitePlugin from '../vite-plugin-config-alias/index.js'; import envVitePlugin from '../vite-plugin-env/index.js'; import astroHeadPlugin from '../vite-plugin-head/index.js'; import htmlVitePlugin from '../vite-plugin-html/index.js'; +import mdxVitePlugin from '../vite-plugin-mdx/index.js'; import { astroInjectEnvTsPlugin } from '../vite-plugin-inject-env-ts/index.js'; import astroIntegrationsContainerPlugin from '../vite-plugin-integrations-container/index.js'; -import jsxVitePlugin from '../vite-plugin-jsx/index.js'; import astroLoadFallbackPlugin from '../vite-plugin-load-fallback/index.js'; import markdownVitePlugin from '../vite-plugin-markdown/index.js'; import astroScannerPlugin from '../vite-plugin-scanner/index.js'; @@ -121,7 +121,8 @@ export async function createVite( envVitePlugin({ settings }), markdownVitePlugin({ settings, logging }), htmlVitePlugin(), - jsxVitePlugin({ settings, logging }), + // jsxVitePlugin({ settings, logging }), + mdxVitePlugin({ settings, logging }), astroPostprocessVitePlugin(), astroIntegrationsContainerPlugin({ settings, logging }), astroScriptsPageSSRPlugin({ settings }), @@ -134,6 +135,7 @@ export async function createVite( vitePluginSSRManifest(), settings.config.experimental.assets ? [astroAssetsPlugin({ settings, logging, mode })] : [], astroTransitions({ config: settings.config }), + ], publicDir: fileURLToPath(settings.config.publicDir), root: fileURLToPath(settings.config.root), diff --git a/packages/astro/src/vite-plugin-jsx/index.ts b/packages/astro/src/vite-plugin-jsx/index.ts deleted file mode 100644 index 7aa7e7b1642b..000000000000 --- a/packages/astro/src/vite-plugin-jsx/index.ts +++ /dev/null @@ -1,251 +0,0 @@ -import type { TransformResult } from 'rollup'; -import { - transformWithEsbuild, - type EsbuildTransformOptions, - type Plugin, - type ResolvedConfig, -} from 'vite'; -import type { AstroRenderer, AstroSettings } from '../@types/astro'; -import type { LogOptions } from '../core/logger/core.js'; -import type { PluginMetadata } from '../vite-plugin-astro/types'; - -import babel from '@babel/core'; -import * as colors from 'kleur/colors'; -import path from 'node:path'; -import { CONTENT_FLAG, PROPAGATED_ASSET_FLAG } from '../content/index.js'; -import { astroEntryPrefix } from '../core/build/plugins/plugin-component-entry.js'; -import { error } from '../core/logger/core.js'; -import { removeQueryString } from '../core/path.js'; -import { detectImportSource } from './import-source.js'; -import tagExportsPlugin from './tag.js'; - -const JSX_EXTENSIONS = new Set(['.jsx', '.tsx', '.mdx']); -const IMPORT_STATEMENTS: Record<string, string> = { - react: "import React from 'react'", - preact: "import { h } from 'preact'", - 'solid-js': "import 'solid-js'", - astro: "import 'astro/jsx-runtime'", -}; - -function getEsbuildLoader(filePath: string): EsbuildTransformOptions['loader'] { - const fileExt = path.extname(filePath); - if (fileExt === '.mdx') return 'jsx'; - return fileExt.slice(1) as EsbuildTransformOptions['loader']; -} - -function collectJSXRenderers(renderers: AstroRenderer[]): Map<string, AstroRenderer> { - const renderersWithJSXSupport = renderers.filter((r) => r.jsxImportSource); - return new Map( - renderersWithJSXSupport.map((r) => [r.jsxImportSource, r] as [string, AstroRenderer]) - ); -} - -interface TransformJSXOptions { - code: string; - id: string; - mode: string; - renderer: AstroRenderer; - ssr: boolean; - root: URL; -} - -async function transformJSX({ - code, - mode, - id, - ssr, - renderer, - root, -}: TransformJSXOptions): Promise<TransformResult> { - const { jsxTransformOptions } = renderer; - const options = await jsxTransformOptions!({ mode, ssr }); - const plugins = [...(options.plugins || [])]; - if (ssr) { - plugins.push(await tagExportsPlugin({ rendererName: renderer.name, root })); - } - const result = await babel.transformAsync(code, { - presets: options.presets, - plugins, - cwd: process.cwd(), - filename: id, - ast: false, - compact: false, - sourceMaps: true, - configFile: false, - babelrc: false, - inputSourceMap: options.inputSourceMap, - }); - // TODO: Be more strict about bad return values here. - // Should we throw an error instead? Should we never return `{code: ""}`? - if (!result) return null; - - if (renderer.name === 'astro:jsx') { - const { astro } = result.metadata as unknown as PluginMetadata; - return { - code: result.code || '', - map: result.map, - meta: { - astro, - vite: { - // Setting this vite metadata to `ts` causes Vite to resolve .js - // extensions to .ts files. - lang: 'ts', - }, - }, - }; - } - - return { - code: result.code || '', - map: result.map, - }; -} - -interface AstroPluginJSXOptions { - settings: AstroSettings; - logging: LogOptions; -} - -// Format inspired by https://github.com/vitejs/vite/blob/main/packages/vite/src/node/constants.ts#L54 -const SPECIAL_QUERY_REGEX = new RegExp( - `[?&](?:worker|sharedworker|raw|url|${CONTENT_FLAG}|${PROPAGATED_ASSET_FLAG})\\b` -); - -/** Use Astro config to allow for alternate or multiple JSX renderers (by default Vite will assume React) */ -export default function jsx({ settings, logging }: AstroPluginJSXOptions): Plugin { - let viteConfig: ResolvedConfig; - const jsxRenderers = new Map<string, AstroRenderer>(); - const jsxRenderersIntegrationOnly = new Map<string, AstroRenderer>(); - // A reference to Astro's internal JSX renderer. - let astroJSXRenderer: AstroRenderer; - // The first JSX renderer provided is considered the default renderer. - // This is a useful reference for when the user only gives a single render. - let defaultJSXRendererEntry: [string, AstroRenderer] | undefined; - - return { - name: 'astro:jsx', - enforce: 'pre', // run transforms before other plugins - async configResolved(resolvedConfig) { - viteConfig = resolvedConfig; - const possibleRenderers = collectJSXRenderers(settings.renderers); - for (const [importSource, renderer] of possibleRenderers) { - jsxRenderers.set(importSource, renderer); - if (importSource === 'astro') { - astroJSXRenderer = renderer; - } else { - jsxRenderersIntegrationOnly.set(importSource, renderer); - } - } - defaultJSXRendererEntry = [...jsxRenderersIntegrationOnly.entries()][0]; - }, - async transform(code, id, opts) { - const ssr = Boolean(opts?.ssr); - // Skip special queries and astro entries. We skip astro entries here as we know it doesn't contain - // JSX code, and also because we can't detect the import source to apply JSX transforms. - if (SPECIAL_QUERY_REGEX.test(id) || id.startsWith(astroEntryPrefix)) { - return null; - } - id = removeQueryString(id); - if (!JSX_EXTENSIONS.has(path.extname(id))) { - return null; - } - - const { mode } = viteConfig; - // Shortcut: only use Astro renderer for MD and MDX files - if (id.endsWith('.mdx')) { - const { code: jsxCode } = await transformWithEsbuild(code, id, { - loader: getEsbuildLoader(id), - jsx: 'preserve', - sourcemap: 'inline', - tsconfigRaw: { - compilerOptions: { - // Ensure client:only imports are treeshaken - verbatimModuleSyntax: false, - importsNotUsedAsValues: 'remove', - }, - }, - }); - return transformJSX({ - code: jsxCode, - id, - renderer: astroJSXRenderer, - mode, - ssr, - root: settings.config.root, - }); - } - if (defaultJSXRendererEntry && jsxRenderersIntegrationOnly.size === 1) { - // downlevel any non-standard syntax, but preserve JSX - const { code: jsxCode } = await transformWithEsbuild(code, id, { - loader: getEsbuildLoader(id), - jsx: 'preserve', - sourcemap: 'inline', - }); - return transformJSX({ - code: jsxCode, - id, - renderer: defaultJSXRendererEntry[1], - mode, - ssr, - root: settings.config.root, - }); - } - - const importSource = await detectImportSource(code, jsxRenderers, settings.tsConfig); - - // if we still can’t tell the import source, now is the time to throw an error. - if (!importSource && defaultJSXRendererEntry) { - const [defaultRendererName] = defaultJSXRendererEntry; - error( - logging, - 'renderer', - `${colors.yellow(id)} -Unable to resolve a renderer that handles this file! With more than one renderer enabled, you should include an import or use a pragma comment. -Add ${colors.cyan( - IMPORT_STATEMENTS[defaultRendererName] || `import '${defaultRendererName}';` - )} or ${colors.cyan(`/** @jsxImportSource: ${defaultRendererName} */`)} to this file. -` - ); - return null; - } else if (!importSource) { - error( - logging, - 'renderer', - `${colors.yellow(id)} -Unable to find a renderer for JSX. Do you have one configured in your Astro config? See this page to learn how: -https://docs.astro.build/en/core-concepts/framework-components/#installing-integrations -` - ); - return null; - } - - const selectedJsxRenderer = jsxRenderers.get(importSource); - // if the renderer is not installed for this JSX source, throw error - if (!selectedJsxRenderer) { - error( - logging, - 'renderer', - `${colors.yellow( - id - )} No renderer installed for ${importSource}. Try adding \`@astrojs/${importSource}\` to your project.` - ); - return null; - } - - // downlevel any non-standard syntax, but preserve JSX - const { code: jsxCode } = await transformWithEsbuild(code, id, { - loader: getEsbuildLoader(id), - jsx: 'preserve', - sourcemap: 'inline', - }); - return await transformJSX({ - code: jsxCode, - id, - renderer: selectedJsxRenderer, - mode, - ssr, - root: settings.config.root, - }); - }, - }; -} diff --git a/packages/astro/src/vite-plugin-markdown/index.ts b/packages/astro/src/vite-plugin-markdown/index.ts index dd2cbcd85cf4..aff27f7a6d4b 100644 --- a/packages/astro/src/vite-plugin-markdown/index.ts +++ b/packages/astro/src/vite-plugin-markdown/index.ts @@ -49,11 +49,6 @@ function safeMatter(source: string, id: string) { } } -// absolute path of "astro/jsx-runtime" -const astroJsxRuntimeModulePath = normalizePath( - fileURLToPath(new URL('../jsx-runtime/index.js', import.meta.url)) -); - const astroServerRuntimeModulePath = normalizePath( fileURLToPath(new URL('../runtime/server/index.js', import.meta.url)) ); @@ -115,8 +110,7 @@ export default function markdown({ settings, logging }: AstroPluginOptions): Plu } const code = escapeViteEnvReferences(` - import { Fragment, jsx as h } from ${JSON.stringify(astroJsxRuntimeModulePath)}; - import { spreadAttributes } from ${JSON.stringify(astroServerRuntimeModulePath)}; + import { unescapeHTML, spreadAttributes, createComponent, render, renderComponent } from ${JSON.stringify(astroServerRuntimeModulePath)}; import { AstroError, AstroErrorData } from ${JSON.stringify(astroErrorModulePath)}; ${layout ? `import Layout from ${JSON.stringify(layout)};` : ''} @@ -167,27 +161,29 @@ export default function markdown({ settings, logging }: AstroPluginOptions): Plu export function getHeadings() { return ${JSON.stringify(headings)}; } - export async function Content() { + + export const Content = createComponent((result, _props, slots) => { const { layout, ...content } = frontmatter; content.file = file; content.url = url; - const contentFragment = h(Fragment, { 'set:html': html }); + return ${ layout - ? `h(Layout, { - file, - url, - content, - frontmatter: content, - headings: getHeadings(), - rawContent, - compiledContent, - 'server:root': true, - children: contentFragment - })` - : `contentFragment` - }; - } + ? `render\`\${renderComponent(result, 'Layout', Layout, { + file, + url, + content, + frontmatter: content, + headings: getHeadings(), + rawContent, + compiledContent, + 'server:root': true, + }, { + 'default': () => render\`\${unescapeHTML(html)}\` + })}\`;` + : `render\`\${unescapeHTML(html)}\`;` + } + }); Content[Symbol.for('astro.needsHeadRendering')] = ${layout ? 'false' : 'true'}; export default Content; `); diff --git a/packages/astro/src/vite-plugin-jsx/README.md b/packages/astro/src/vite-plugin-mdx/README.md similarity index 100% rename from packages/astro/src/vite-plugin-jsx/README.md rename to packages/astro/src/vite-plugin-mdx/README.md diff --git a/packages/astro/src/vite-plugin-jsx/import-source.ts b/packages/astro/src/vite-plugin-mdx/import-source.ts similarity index 100% rename from packages/astro/src/vite-plugin-jsx/import-source.ts rename to packages/astro/src/vite-plugin-mdx/import-source.ts diff --git a/packages/astro/src/vite-plugin-mdx/index.ts b/packages/astro/src/vite-plugin-mdx/index.ts new file mode 100644 index 000000000000..473c4a78e12b --- /dev/null +++ b/packages/astro/src/vite-plugin-mdx/index.ts @@ -0,0 +1,134 @@ +import type { TransformResult } from 'rollup'; +import { + transformWithEsbuild, + type Plugin, + type ResolvedConfig, +} from 'vite'; +import type { AstroRenderer, AstroSettings } from '../@types/astro'; +import type { LogOptions } from '../core/logger/core.js'; +import type { PluginMetadata } from '../vite-plugin-astro/types'; + +import babel from '@babel/core'; +import { CONTENT_FLAG, PROPAGATED_ASSET_FLAG } from '../content/index.js'; +import { astroEntryPrefix } from '../core/build/plugins/plugin-component-entry.js'; +import { removeQueryString } from '../core/path.js'; +import tagExportsPlugin from './tag.js'; + +interface TransformJSXOptions { + code: string; + id: string; + mode: string; + renderer: AstroRenderer; + ssr: boolean; + root: URL; +} + +async function transformJSX({ + code, + mode, + id, + ssr, + renderer, + root, +}: TransformJSXOptions): Promise<TransformResult> { + const { jsxTransformOptions } = renderer; + const options = await jsxTransformOptions!({ mode, ssr }); + const plugins = [...(options.plugins || [])]; + if (ssr) { + plugins.push(await tagExportsPlugin({ rendererName: renderer.name, root })); + } + const result = await babel.transformAsync(code, { + presets: options.presets, + plugins, + cwd: process.cwd(), + filename: id, + ast: false, + compact: false, + sourceMaps: true, + configFile: false, + babelrc: false, + inputSourceMap: options.inputSourceMap, + }); + // TODO: Be more strict about bad return values here. + // Should we throw an error instead? Should we never return `{code: ""}`? + if (!result) return null; + + if (renderer.name === 'astro:jsx') { + const { astro } = result.metadata as unknown as PluginMetadata; + return { + code: result.code || '', + map: result.map, + meta: { + astro, + vite: { + // Setting this vite metadata to `ts` causes Vite to resolve .js + // extensions to .ts files. + lang: 'ts', + }, + }, + }; + } + + return { + code: result.code || '', + map: result.map, + }; +} + +interface AstroPluginJSXOptions { + settings: AstroSettings; + logging: LogOptions; +} + +// Format inspired by https://github.com/vitejs/vite/blob/main/packages/vite/src/node/constants.ts#L54 +const SPECIAL_QUERY_REGEX = new RegExp( + `[?&](?:worker|sharedworker|raw|url|${CONTENT_FLAG}|${PROPAGATED_ASSET_FLAG})\\b` +); + +/** Use Astro config to allow for alternate or multiple JSX renderers (by default Vite will assume React) */ +export default function mdxVitePlugin({ settings }: AstroPluginJSXOptions): Plugin { + let viteConfig: ResolvedConfig; + // A reference to Astro's internal JSX renderer. + let astroJSXRenderer: AstroRenderer; + + return { + name: 'astro:jsx', + enforce: 'pre', // run transforms before other plugins + async configResolved(resolvedConfig) { + viteConfig = resolvedConfig; + astroJSXRenderer = settings.renderers.find((r) => r.jsxImportSource === 'astro')!; + }, + async transform(code, id, opts) { + // Skip special queries and astro entries. We skip astro entries here as we know it doesn't contain + // JSX code, and also because we can't detect the import source to apply JSX transforms. + if (SPECIAL_QUERY_REGEX.test(id) || id.startsWith(astroEntryPrefix)) { + return null; + } + id = removeQueryString(id); + // Shortcut: only use Astro renderer for MD and MDX files + if (!id.endsWith('.mdx')) { + return null; + } + const { code: jsxCode } = await transformWithEsbuild(code, id, { + loader: 'jsx', + jsx: 'preserve', + sourcemap: 'inline', + tsconfigRaw: { + compilerOptions: { + // Ensure client:only imports are treeshaken + verbatimModuleSyntax: false, + importsNotUsedAsValues: 'remove', + }, + }, + }); + return transformJSX({ + code: jsxCode, + id, + renderer: astroJSXRenderer, + mode: viteConfig.mode, + ssr: Boolean(opts?.ssr), + root: settings.config.root, + }); + }, + }; +} diff --git a/packages/astro/src/vite-plugin-jsx/tag.ts b/packages/astro/src/vite-plugin-mdx/tag.ts similarity index 100% rename from packages/astro/src/vite-plugin-jsx/tag.ts rename to packages/astro/src/vite-plugin-mdx/tag.ts diff --git a/packages/astro/test/fixtures/jsx/astro.config.mjs b/packages/astro/test/fixtures/jsx/astro.config.mjs index 5b84d23a8f20..61d0d075e336 100644 --- a/packages/astro/test/fixtures/jsx/astro.config.mjs +++ b/packages/astro/test/fixtures/jsx/astro.config.mjs @@ -1,13 +1,27 @@ import { defineConfig } from 'astro/config'; import renderer from 'astro/jsx/renderer.js'; +import mdx from '@astrojs/mdx'; import preact from '@astrojs/preact'; import react from '@astrojs/react'; import svelte from '@astrojs/svelte'; import vue from '@astrojs/vue'; import solid from '@astrojs/solid-js'; + export default defineConfig({ integrations: [ + preact({ + include: ['**/preact/*'] + }), + react({ + include: ['**/react/*'] + }), + solid({ + include: ['**/solid/*'], + }), + mdx(), + svelte(), + vue(), { name: '@astrojs/test-jsx', hooks: { @@ -16,10 +30,5 @@ export default defineConfig({ } } }, - preact(), - react(), - svelte(), - vue(), - solid(), ] }) diff --git a/packages/astro/test/fixtures/jsx/package.json b/packages/astro/test/fixtures/jsx/package.json index 1e7001b47ea3..e5b12ece4221 100644 --- a/packages/astro/test/fixtures/jsx/package.json +++ b/packages/astro/test/fixtures/jsx/package.json @@ -3,6 +3,7 @@ "version": "0.0.0", "private": true, "devDependencies": { + "@astrojs/mdx": "workspace:*", "@astrojs/preact": "workspace:*", "@astrojs/react": "workspace:*", "@astrojs/solid-js": "workspace:*", diff --git a/packages/astro/test/fixtures/jsx/src/components/Content.mdx b/packages/astro/test/fixtures/jsx/src/components/Content.mdx new file mode 100644 index 000000000000..7a8bbc0f4309 --- /dev/null +++ b/packages/astro/test/fixtures/jsx/src/components/Content.mdx @@ -0,0 +1,5 @@ +import ReactCounter from './react/ReactCounter.jsx' + +# Hello world + +<ReactCounter /> diff --git a/packages/astro/test/fixtures/jsx/src/components/Frameworks.jsx b/packages/astro/test/fixtures/jsx/src/components/Frameworks.jsx deleted file mode 100644 index 2cc17596457c..000000000000 --- a/packages/astro/test/fixtures/jsx/src/components/Frameworks.jsx +++ /dev/null @@ -1,28 +0,0 @@ -import 'astro/jsx-runtime'; -import { Test } from "./Test"; - -import PreactCounter from "./PreactCounter"; -import ReactCounter from "./ReactCounter"; -import SolidCounter from "./SolidCounter"; -import SvelteCounter from "./SvelteCounter.svelte"; -import VueCounter from "./VueCounter.vue"; - -export function Preact() { - return <Test case="has-preact"><PreactCounter /></Test> -} - -export function React() { - return <Test case="has-react"><ReactCounter /></Test> -} - -export function Solid() { - return <Test case="has-solid"><SolidCounter /></Test> -} - -export function Svelte() { - return <Test case="has-svelte"><SvelteCounter /></Test> -} - -export function Vue() { - return <Test case="has-vue"><VueCounter /></Test> -} diff --git a/packages/astro/test/fixtures/jsx/src/components/PreactCounter.tsx b/packages/astro/test/fixtures/jsx/src/components/preact/PreactCounter.tsx similarity index 97% rename from packages/astro/test/fixtures/jsx/src/components/PreactCounter.tsx rename to packages/astro/test/fixtures/jsx/src/components/preact/PreactCounter.tsx index cdb368377d19..e99180e73cfd 100644 --- a/packages/astro/test/fixtures/jsx/src/components/PreactCounter.tsx +++ b/packages/astro/test/fixtures/jsx/src/components/preact/PreactCounter.tsx @@ -7,6 +7,8 @@ export default function PreactCounter() { const add = () => setCount((i) => i + 1); const subtract = () => setCount((i) => i - 1); + debugger; + return ( <div id="preact"> <div className="counter"> diff --git a/packages/astro/test/fixtures/jsx/src/components/ReactCounter.jsx b/packages/astro/test/fixtures/jsx/src/components/react/ReactCounter.jsx similarity index 97% rename from packages/astro/test/fixtures/jsx/src/components/ReactCounter.jsx rename to packages/astro/test/fixtures/jsx/src/components/react/ReactCounter.jsx index 5c5a001e8863..7404d45bc41e 100644 --- a/packages/astro/test/fixtures/jsx/src/components/ReactCounter.jsx +++ b/packages/astro/test/fixtures/jsx/src/components/react/ReactCounter.jsx @@ -6,6 +6,8 @@ export default function ReactCounter() { const add = () => setCount((i) => i + 1); const subtract = () => setCount((i) => i - 1); + debugger; + return ( <div id="react"> <div className="counter"> diff --git a/packages/astro/test/fixtures/jsx/src/components/SolidCounter.jsx b/packages/astro/test/fixtures/jsx/src/components/solid/SolidCounter.jsx similarity index 100% rename from packages/astro/test/fixtures/jsx/src/components/SolidCounter.jsx rename to packages/astro/test/fixtures/jsx/src/components/solid/SolidCounter.jsx diff --git a/packages/astro/test/fixtures/jsx/src/pages/frameworks.astro b/packages/astro/test/fixtures/jsx/src/pages/frameworks.astro index ede0f542c3cd..cfd28a3d4b15 100644 --- a/packages/astro/test/fixtures/jsx/src/pages/frameworks.astro +++ b/packages/astro/test/fixtures/jsx/src/pages/frameworks.astro @@ -1,13 +1,27 @@ --- -import * as Framework from '../components/Frameworks' +import FrameworkSolid from '../components/solid/SolidCounter.jsx' +import FrameworkPreact from '../components/preact/PreactCounter.jsx' +import FrameworkReact from '../components/react/ReactCounter.jsx' +import FrameworkSvelte from '../components/SvelteCounter.svelte' +import FrameworkVue from '../components/VueCounter.vue' +import FrameworkMDX from '../components/Content.mdx' --- -<Framework.Preact /> - -<Framework.React /> - -<Framework.Solid /> - -<Framework.Svelte /> - -<Framework.Vue /> +<div id="preact-wrapper"> + <FrameworkPreact /> +</div> +<div id="rreact-wrapper"> + <FrameworkReact /> +</div> +<div id="solid-wrapper"> + <FrameworkSolid /> +</div> +<div id="svelte-wrapper"> + <FrameworkSvelte /> +</div> +<div id="vue-wrapper"> + <FrameworkVue /> +</div> +<div id="mdx-wrapper"> + <FrameworkMDX /> +</div> diff --git a/packages/astro/test/jsx.test.js b/packages/astro/test/jsx.test.js index 41671699cf19..64c7a7609fcd 100644 --- a/packages/astro/test/jsx.test.js +++ b/packages/astro/test/jsx.test.js @@ -20,43 +20,51 @@ describe('jsx-runtime', () => { expect($('#named').text()).to.equal('Named'); }); - it('Can load Preact component inside Astro JSX', async () => { + it('Can load Preact component inside Astro', async () => { const html = await fixture.readFile('/frameworks/index.html'); const $ = cheerio.load(html); - expect($('#has-preact #preact').length).to.equal(1); + expect($('#has-preact #preact').length).to.equal(0); expect($('#preact').text()).to.include('Preact'); }); - it('Can load React component inside Astro JSX', async () => { + it('Can load React component inside Astro', async () => { const html = await fixture.readFile('/frameworks/index.html'); const $ = cheerio.load(html); - expect($('#has-react #react').length).to.equal(1); + expect($('#has-react #react').length).to.equal(0); expect($('#react').text()).to.include('React'); }); - it('Can load Solid component inside Astro JSX', async () => { + it('Can load Solid component inside Astro', async () => { const html = await fixture.readFile('/frameworks/index.html'); const $ = cheerio.load(html); - expect($('#has-solid #solid').length).to.equal(1); + expect($('#has-solid #solid').length).to.equal(0); expect($('#solid').text()).to.include('Solid'); }); - it('Can load Svelte component inside Astro JSX', async () => { + it('Can load Svelte component inside Astro', async () => { const html = await fixture.readFile('/frameworks/index.html'); const $ = cheerio.load(html); - expect($('#has-svelte #svelte').length).to.equal(1); + expect($('#has-svelte #svelte').length).to.equal(0); expect($('#svelte').text()).to.include('Svelte'); }); - it('Can load Vue component inside Astro JSX', async () => { + it('Can load Vue component inside Astro', async () => { const html = await fixture.readFile('/frameworks/index.html'); const $ = cheerio.load(html); - expect($('#has-vue #vue').length).to.equal(1); + expect($('#has-vue #vue').length).to.equal(0); expect($('#vue').text()).to.include('Vue'); }); + + it('Can load MDX component inside Astro', async () => { + const html = await fixture.readFile('/frameworks/index.html'); + const $ = cheerio.load(html); + + expect($('#mdx-wrapper #hello-world')).to.have.a.lengthOf(1, 'md content rendered'); + expect($('#mdx-wrapper #react')).to.have.a.lengthOf(1, 'React component rendered') + }); }); diff --git a/packages/integrations/mdx/src/index.ts b/packages/integrations/mdx/src/index.ts index ecf2a9a95950..4cce2392128a 100644 --- a/packages/integrations/mdx/src/index.ts +++ b/packages/integrations/mdx/src/index.ts @@ -13,6 +13,7 @@ import type { Plugin as VitePlugin } from 'vite'; import { getRehypePlugins, getRemarkPlugins, recmaInjectImportMetaEnvPlugin } from './plugins.js'; import type { OptimizeOptions } from './rehype-optimize-static.js'; import { getFileInfo, ignoreStringPlugins, parseFrontmatter } from './utils.js'; +import astroJSXRenderer from 'astro/jsx/renderer.js'; export type MdxOptions = Omit<typeof markdownConfigDefaults, 'remarkPlugins' | 'rehypePlugins'> & { extendMarkdownConfig: boolean; @@ -37,9 +38,10 @@ export default function mdx(partialMdxOptions: Partial<MdxOptions> = {}): AstroI name: '@astrojs/mdx', hooks: { 'astro:config:setup': async (params) => { - const { updateConfig, config, addPageExtension, addContentEntryType, command } = + const { updateConfig, config, addPageExtension, addContentEntryType, command, addRenderer } = params as SetupHookParams; + addRenderer(astroJSXRenderer); addPageExtension('.mdx'); addContentEntryType({ extensions: ['.mdx'], diff --git a/packages/integrations/preact/package.json b/packages/integrations/preact/package.json index f1a5f08f47f7..42bc9314ba72 100644 --- a/packages/integrations/preact/package.json +++ b/packages/integrations/preact/package.json @@ -35,10 +35,8 @@ "dev": "astro-scripts dev \"src/**/*.ts\"" }, "dependencies": { - "@babel/core": "^7.22.5", - "@babel/plugin-transform-react-jsx": "^7.22.5", + "@preact/preset-vite": "^2.5.0", "@preact/signals": "^1.1.3", - "babel-plugin-module-resolver": "^5.0.0", "preact-render-to-string": "^5.2.6" }, "devDependencies": { diff --git a/packages/integrations/preact/src/index.ts b/packages/integrations/preact/src/index.ts index 4f4b0ee7924e..39c2d17f960a 100644 --- a/packages/integrations/preact/src/index.ts +++ b/packages/integrations/preact/src/index.ts @@ -1,96 +1,40 @@ -import type { AstroIntegration, AstroRenderer, ViteUserConfig } from 'astro'; +import type { AstroIntegration, AstroRenderer } from 'astro'; +import preact, {type PreactPluginOptions as VitePreactPluginOptions} from '@preact/preset-vite'; function getRenderer(development: boolean): AstroRenderer { return { name: '@astrojs/preact', clientEntrypoint: development ? '@astrojs/preact/client-dev.js' : '@astrojs/preact/client.js', serverEntrypoint: '@astrojs/preact/server.js', - jsxImportSource: 'preact', - jsxTransformOptions: async () => { - const { - default: { default: jsx }, - // @ts-expect-error types not found - } = await import('@babel/plugin-transform-react-jsx'); - return { - plugins: [jsx({}, { runtime: 'automatic', importSource: 'preact' })], - }; - }, }; } -function getCompatRenderer(development: boolean): AstroRenderer { - return { - name: '@astrojs/preact', - clientEntrypoint: development ? '@astrojs/preact/client-dev.js' : '@astrojs/preact/client.js', - serverEntrypoint: '@astrojs/preact/server.js', - jsxImportSource: 'react', - jsxTransformOptions: async () => { - const { - default: { default: jsx }, - // @ts-expect-error types not found - } = await import('@babel/plugin-transform-react-jsx'); - return { - plugins: [ - jsx({}, { runtime: 'automatic', importSource: 'preact/compat' }), - [ - 'babel-plugin-module-resolver', - { - alias: { - react: 'preact/compat', - 'react-dom/test-utils': 'preact/test-utils', - 'react-dom': 'preact/compat', - 'react/jsx-runtime': 'preact/jsx-runtime', - }, - }, - ], - ], - }; - }, - }; -} - -function getViteConfiguration(compat?: boolean): ViteUserConfig { - const viteConfig: ViteUserConfig = { - optimizeDeps: { - include: ['@astrojs/preact/client.js', 'preact', 'preact/jsx-runtime'], - exclude: ['@astrojs/preact/server.js'], - }, - }; - - if (compat) { - viteConfig.optimizeDeps!.include!.push( - 'preact/compat', - 'preact/test-utils', - 'preact/compat/jsx-runtime' - ); - viteConfig.resolve = { - alias: [ - { find: 'react', replacement: 'preact/compat' }, - { find: 'react-dom/test-utils', replacement: 'preact/test-utils' }, - { find: 'react-dom', replacement: 'preact/compat' }, - { find: 'react/jsx-runtime', replacement: 'preact/jsx-runtime' }, - ], - dedupe: ['preact/compat', 'preact'], - }; - // noExternal React entrypoints to be bundled, resolved, and aliased by Vite - viteConfig.ssr = { - noExternal: ['react', 'react-dom', 'react-dom/test-utils', 'react/jsx-runtime'], - }; - } - - return viteConfig; -} - -export default function ({ compat }: { compat?: boolean } = {}): AstroIntegration { +export type Options =Pick<VitePreactPluginOptions, 'include' | 'exclude'> & { compat?: boolean }; +// TODO: Add back compat support -- how would this work in the new world? +export default function ({include, exclude, compat}: Options = {}): AstroIntegration { return { name: '@astrojs/preact', hooks: { 'astro:config:setup': ({ addRenderer, updateConfig, command }) => { - const development = command === 'dev'; - if (compat) addRenderer(getCompatRenderer(development)); - addRenderer(getRenderer(development)); + const preactPlugin = preact({include, exclude}); + + // If not compat, delete the plugin that does it + if(!compat) { + const pIndex = preactPlugin.findIndex(p => p.name == 'preact:config'); + if (pIndex >= 0) { + preactPlugin.splice(pIndex, 1); + } + } + + addRenderer(getRenderer(command === 'dev')); updateConfig({ - vite: getViteConfiguration(compat), + vite: { + plugins: [preactPlugin], + optimizeDeps: { + include: ['@astrojs/preact/client.js', 'preact', 'preact/jsx-runtime'], + exclude: ['@astrojs/preact/server.js'], + }, + }, }); }, }, diff --git a/packages/integrations/preact/src/server.ts b/packages/integrations/preact/src/server.ts index 6a2ceb612c98..b9d063b627db 100644 --- a/packages/integrations/preact/src/server.ts +++ b/packages/integrations/preact/src/server.ts @@ -29,8 +29,8 @@ function check(this: RendererContext, Component: any, props: Record<string, any> // There are edge cases (SolidJS) where Preact *might* render a string, // but components would be <undefined></undefined> - - return !/\<undefined\>/.test(html); + // It also might render an empty sting. + return html == '' ? false : !/\<undefined\>/.test(html); } catch (err) { return false; } diff --git a/packages/integrations/react/package.json b/packages/integrations/react/package.json index 958ee5ed7c9b..3c9128e0b0a9 100644 --- a/packages/integrations/react/package.json +++ b/packages/integrations/react/package.json @@ -44,8 +44,7 @@ "dev": "astro-scripts dev \"src/**/*.ts\"" }, "dependencies": { - "@babel/core": "^7.22.5", - "@babel/plugin-transform-react-jsx": "^7.22.5" + "@vitejs/plugin-react": "^4.0.3" }, "devDependencies": { "@types/react": "^17.0.62", diff --git a/packages/integrations/react/src/index.ts b/packages/integrations/react/src/index.ts index d7906fe4a493..200bf5ea525d 100644 --- a/packages/integrations/react/src/index.ts +++ b/packages/integrations/react/src/index.ts @@ -1,5 +1,14 @@ import type { AstroIntegration } from 'astro'; import { version as ReactVersion } from 'react-dom'; +import react, {type Options as ViteReactPluginOptions} from '@vitejs/plugin-react'; + +const FAST_REFRESH_PREAMBLE = ` +import RefreshRuntime from '/@react-refresh' +RefreshRuntime.injectIntoGlobalHook(window) +window.$RefreshReg$ = () => {} +window.$RefreshSig$ = () => (type) => type +window.__vite_plugin_react_preamble_installed__ = true +`; function getRenderer() { return { @@ -10,33 +19,10 @@ function getRenderer() { serverEntrypoint: ReactVersion.startsWith('18.') ? '@astrojs/react/server.js' : '@astrojs/react/server-v17.js', - jsxImportSource: 'react', - jsxTransformOptions: async () => { - // @ts-expect-error types not found - const babelPluginTransformReactJsxModule = await import('@babel/plugin-transform-react-jsx'); - const jsx = - babelPluginTransformReactJsxModule?.default?.default ?? - babelPluginTransformReactJsxModule?.default; - return { - plugins: [ - jsx( - {}, - { - runtime: 'automatic', - // This option tells the JSX transform how to construct the "*/jsx-runtime" import. - // In React v17, we had to shim this due to an export map issue in React. - // In React v18, this issue was fixed and we can import "react/jsx-runtime" directly. - // See `./jsx-runtime.js` for more details. - importSource: ReactVersion.startsWith('18.') ? 'react' : '@astrojs/react', - } - ), - ], - }; - }, }; } -function getViteConfiguration() { +function getViteConfiguration({include, exclude}: Options = {}) { return { optimizeDeps: { include: [ @@ -54,8 +40,9 @@ function getViteConfiguration() { : '@astrojs/react/server-v17.js', ], }, + plugins: [react({include, exclude})], resolve: { - dedupe: ['react', 'react-dom'], + dedupe: ['react', 'react-dom', 'react-dom/server'], }, ssr: { external: ReactVersion.startsWith('18.') @@ -73,13 +60,17 @@ function getViteConfiguration() { }; } -export default function (): AstroIntegration { +export type Options =Pick<ViteReactPluginOptions, 'include' | 'exclude'>; +export default function ({include, exclude}: Pick<ViteReactPluginOptions, 'include' | 'exclude'> = {}): AstroIntegration { return { name: '@astrojs/react', hooks: { - 'astro:config:setup': ({ addRenderer, updateConfig }) => { + 'astro:config:setup': ({ command, addRenderer, updateConfig, injectScript }) => { addRenderer(getRenderer()); - updateConfig({ vite: getViteConfiguration() }); + updateConfig({ vite: getViteConfiguration({include, exclude}) }); + if (command === 'dev') { + injectScript('before-hydration', FAST_REFRESH_PREAMBLE); + } }, }, }; diff --git a/packages/integrations/solid/package.json b/packages/integrations/solid/package.json index c962e025a21c..550568f9ac5f 100644 --- a/packages/integrations/solid/package.json +++ b/packages/integrations/solid/package.json @@ -35,13 +35,13 @@ "dev": "astro-scripts dev \"src/**/*.ts\"" }, "dependencies": { - "babel-preset-solid": "^1.7.4", - "vitefu": "^0.2.4" + "vite-plugin-solid": "^2.7.0" }, "devDependencies": { "astro": "workspace:*", "astro-scripts": "workspace:*", - "solid-js": "^1.7.6" + "solid-js": "^1.7.6", + "vitefu": "^0.2.4" }, "peerDependencies": { "solid-js": "^1.4.3" diff --git a/packages/integrations/solid/src/index.ts b/packages/integrations/solid/src/index.ts index cfd38224cbbd..7d47c2c24771 100644 --- a/packages/integrations/solid/src/index.ts +++ b/packages/integrations/solid/src/index.ts @@ -1,30 +1,12 @@ import type { AstroConfig, AstroIntegration, AstroRenderer } from 'astro'; +import solid, { type Options as ViteSolidPluginOptions } from 'vite-plugin-solid'; import { getSolidPkgsConfig } from './dependencies.js'; -function getRenderer(): AstroRenderer { - return { - name: '@astrojs/solid-js', - clientEntrypoint: '@astrojs/solid-js/client.js', - serverEntrypoint: '@astrojs/solid-js/server.js', - jsxImportSource: 'solid-js', - jsxTransformOptions: async ({ ssr }) => { - // @ts-expect-error types not found - const [{ default: solid }] = await Promise.all([import('babel-preset-solid')]); - const options = { - presets: [solid({}, { generate: ssr ? 'ssr' : 'dom', hydratable: true })], - plugins: [], - // Otherwise, babel will try to consume the source map generated by esbuild - // This causes unexpected issues with newline characters: https://github.com/withastro/astro/issues/3371 - // Note "vite-plugin-solid" does the same: https://github.com/solidjs/vite-plugin-solid/blob/master/src/index.ts#L344-L345 - inputSourceMap: false as any, - }; - - return options; - }, - }; -} - -async function getViteConfiguration(isDev: boolean, astroConfig: AstroConfig) { +async function getViteConfiguration( + isDev: boolean, + astroConfig: AstroConfig, + { include, exclude }: Options = {}, +) { // https://github.com/solidjs/vite-plugin-solid // We inject the dev mode only if the user explicitly wants it or if we are in dev (serve) mode const nestedDeps = ['solid-js', 'solid-js/web', 'solid-js/store', 'solid-js/html', 'solid-js/h']; @@ -34,7 +16,7 @@ async function getViteConfiguration(isDev: boolean, astroConfig: AstroConfig) { * We only need esbuild on .ts or .js files. * .tsx & .jsx files are handled by us */ - esbuild: { include: /\.ts$/ }, + //esbuild: { include: /\.ts$/ }, resolve: { conditions: ['solid', ...(isDev ? ['development'] : [])], dedupe: nestedDeps, @@ -42,8 +24,24 @@ async function getViteConfiguration(isDev: boolean, astroConfig: AstroConfig) { }, optimizeDeps: { include: [...nestedDeps, ...solidPkgsConfig.optimizeDeps.include], - exclude: ['@astrojs/solid-js/server.js', ...solidPkgsConfig.optimizeDeps.exclude], + exclude: ['@astrojs/solid-js/server.js', ...solidPkgsConfig.optimizeDeps.exclude], }, + plugins: [ + solid({ include, exclude, dev: isDev, ssr: true }), + { + name: '@astrojs/solid:config-overrides', + enforce: 'post', + config() { + return { + esbuild: { + // To support using alongside other JSX frameworks, still let + // esbuild compile stuff. Solid goes first anyways. + include: /\.(m?ts|[jt]sx)$/ + }, + } + }, + } + ], ssr: { external: ['babel-preset-solid', ...solidPkgsConfig.ssr.external], noExternal: [...solidPkgsConfig.ssr.noExternal], @@ -51,13 +49,29 @@ async function getViteConfiguration(isDev: boolean, astroConfig: AstroConfig) { }; } -export default function (): AstroIntegration { +function getRenderer(): AstroRenderer { + return { + name: '@astrojs/solid-js', + clientEntrypoint: '@astrojs/solid-js/client.js', + serverEntrypoint: '@astrojs/solid-js/server.js', + }; +} + +export type Options = Pick<ViteSolidPluginOptions, 'include' | 'exclude'>; + +export default function (opts: Options = {}): AstroIntegration { + //const { include, exclude } = opts; return { name: '@astrojs/solid-js', hooks: { 'astro:config:setup': async ({ command, addRenderer, updateConfig, config }) => { addRenderer(getRenderer()); - updateConfig({ vite: await getViteConfiguration(command === 'dev', config) }); + updateConfig({ + /*vite: { + plugins: [solid({ include, exclude, dev: command === 'dev', ssr: true })] + }*/ + vite: await getViteConfiguration(command === 'dev', config, opts), + }); }, }, }; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2d790f820fa1..738cb8e701e5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,9 +18,9 @@ importers: specifier: workspace:* version: link:benchmark devDependencies: - '@astrojs/check': - specifier: ^0.1.0 - version: 0.1.0(prettier-plugin-astro@0.11.0)(prettier@3.0.1)(typescript@5.1.6) + '@babel/plugin-transform-react-jsx': + specifier: ^7.22.5 + version: 7.22.5(@babel/core@7.22.5) '@changesets/changelog-github': specifier: ^0.4.8 version: 0.4.8 @@ -2761,6 +2761,9 @@ importers: specifier: ^3.3.4 version: 3.3.4 devDependencies: + '@astrojs/mdx': + specifier: workspace:* + version: link:../../../../integrations/mdx '@astrojs/preact': specifier: workspace:* version: link:../../../../integrations/preact @@ -4672,18 +4675,12 @@ importers: packages/integrations/preact: dependencies: - '@babel/core': - specifier: ^7.22.5 - version: 7.22.5 - '@babel/plugin-transform-react-jsx': - specifier: ^7.22.5 - version: 7.22.5(@babel/core@7.22.5) + '@preact/preset-vite': + specifier: ^2.5.0 + version: 2.5.0(preact@10.15.1) '@preact/signals': specifier: ^1.1.3 version: 1.1.3(preact@10.15.1) - babel-plugin-module-resolver: - specifier: ^5.0.0 - version: 5.0.0 preact-render-to-string: specifier: ^5.2.6 version: 5.2.6(preact@10.15.1) @@ -4746,12 +4743,9 @@ importers: packages/integrations/react: dependencies: - '@babel/core': - specifier: ^7.22.5 - version: 7.22.5 - '@babel/plugin-transform-react-jsx': - specifier: ^7.22.5 - version: 7.22.5(@babel/core@7.22.5) + '@vitejs/plugin-react': + specifier: ^4.0.3 + version: 4.0.3 devDependencies: '@types/react': specifier: ^17.0.62 @@ -4829,12 +4823,9 @@ importers: packages/integrations/solid: dependencies: - babel-preset-solid: - specifier: ^1.7.4 - version: 1.7.4 - vitefu: - specifier: ^0.2.4 - version: 0.2.4(vite@4.4.6) + vite-plugin-solid: + specifier: ^2.7.0 + version: 2.7.0(solid-js@1.7.6) devDependencies: astro: specifier: workspace:* @@ -4845,6 +4836,9 @@ importers: solid-js: specifier: ^1.7.6 version: 1.7.6 + vitefu: + specifier: ^0.2.4 + version: 0.2.4(vite@4.4.6) packages/integrations/svelte: dependencies: @@ -5302,7 +5296,6 @@ packages: dependencies: '@jridgewell/gen-mapping': 0.3.3 '@jridgewell/trace-mapping': 0.3.18 - dev: false /@apideck/better-ajv-errors@0.3.6(ajv@8.12.0): resolution: {integrity: sha512-P+ZygBLZtkp0qqOAJJVX4oX/sFo5JR3eBWwwuqHHhK0GIgQOKWrAfiAaWX0aArHkRWHMuggFEgAZNxVPwPZYaA==} @@ -5525,7 +5518,6 @@ packages: /@babel/compat-data@7.22.5: resolution: {integrity: sha512-4Jc/YuIaYqKnDDz892kPIledykKg12Aw1PYX5i/TY28anJtacvM1Rrr8wbieB9GfEJwlzqT0hUEao0CxEebiDA==} engines: {node: '>=6.9.0'} - dev: false /@babel/core@7.22.5: resolution: {integrity: sha512-SBuTAjg91A3eKOvD+bPEz3LlhHZRNu1nFOVts9lzDJTXshHTjII0BAtDS3Y2DAkdZdDKWVZGVwkDfc4Clxn1dg==} @@ -5548,7 +5540,6 @@ packages: semver: 6.3.0 transitivePeerDependencies: - supports-color - dev: false /@babel/generator@7.22.5: resolution: {integrity: sha512-+lcUbnTRhd0jOewtFSedLyiPsD5tswKkbgcezOqqWFUVNEwoUTlpPOBmvhG7OXWLR4jMdv0czPGH5XbflnD1EA==} @@ -5558,14 +5549,12 @@ packages: '@jridgewell/gen-mapping': 0.3.3 '@jridgewell/trace-mapping': 0.3.18 jsesc: 2.5.2 - dev: false /@babel/helper-annotate-as-pure@7.22.5: resolution: {integrity: sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==} engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.22.5 - dev: false /@babel/helper-builder-binary-assignment-operator-visitor@7.21.5: resolution: {integrity: sha512-uNrjKztPLkUk7bpCNC0jEKDJzzkvel/W+HguzbN8krA+LPfC1CEobJEvAvGka2A/M+ViOqXdcRL0GqPUJSjx9g==} @@ -5589,10 +5578,9 @@ packages: browserslist: 4.21.5 lru-cache: 5.1.1 semver: 6.3.1 - dev: false - /@babel/helper-create-class-features-plugin@7.21.8(@babel/core@7.22.5): - resolution: {integrity: sha512-+THiN8MqiH2AczyuZrnrKL6cAxFRRQDKW9h1YkBvbgKmAm6mwiacig1qT73DHIWMGo40GRnsEfN3LA+E6NtmSw==} + /@babel/helper-create-class-features-plugin@7.22.9(@babel/core@7.22.5): + resolution: {integrity: sha512-Pwyi89uO4YrGKxL/eNJ8lfEH55DnRloGPOseaA8NFNL6jAUnn+KccaISiFazCj5IolPPDjGSdzQzXVzODVRqUQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 @@ -5604,14 +5592,12 @@ packages: '@babel/helper-annotate-as-pure': 7.22.5 '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-function-name': 7.22.5 - '@babel/helper-member-expression-to-functions': 7.21.5 - '@babel/helper-optimise-call-expression': 7.18.6 - '@babel/helper-replace-supers': 7.21.5 - '@babel/helper-skip-transparent-expression-wrappers': 7.20.0 - '@babel/helper-split-export-declaration': 7.22.5 + '@babel/helper-member-expression-to-functions': 7.22.5 + '@babel/helper-optimise-call-expression': 7.22.5 + '@babel/helper-replace-supers': 7.22.9(@babel/core@7.22.5) + '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 + '@babel/helper-split-export-declaration': 7.22.6 semver: 6.3.1 - transitivePeerDependencies: - - supports-color dev: false /@babel/helper-create-regexp-features-plugin@7.21.8(@babel/core@7.22.5): @@ -5651,7 +5637,6 @@ packages: /@babel/helper-environment-visitor@7.22.5: resolution: {integrity: sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q==} engines: {node: '>=6.9.0'} - dev: false /@babel/helper-function-name@7.22.5: resolution: {integrity: sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ==} @@ -5659,17 +5644,15 @@ packages: dependencies: '@babel/template': 7.22.5 '@babel/types': 7.22.5 - dev: false /@babel/helper-hoist-variables@7.22.5: resolution: {integrity: sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==} engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.22.5 - dev: false - /@babel/helper-member-expression-to-functions@7.21.5: - resolution: {integrity: sha512-nIcGfgwpH2u4n9GG1HpStW5Ogx7x7ekiFHbjjFRKXbn5zUvqO9ZgotCO4x1aNbKn/x/xOUaXEhyNHCwtFCpxWg==} + /@babel/helper-member-expression-to-functions@7.22.5: + resolution: {integrity: sha512-aBiH1NKMG0H2cGZqspNvsaBe6wNGjbJjuLy29aU+eDZjSbbN53BaxlpB02xm9v34pLTZ1nIQPFYn2qMZoa5BQQ==} engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.22.5 @@ -5694,7 +5677,6 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.22.5 - dev: false /@babel/helper-module-transforms@7.22.5: resolution: {integrity: sha512-+hGKDt/Ze8GFExiVHno/2dvG5IdstpzCq0y4Qc9OJ25D4q3pKfiIP/4Vp3/JvhDkLKsDK2api3q3fpIgiIF5bw==} @@ -5710,10 +5692,9 @@ packages: '@babel/types': 7.22.5 transitivePeerDependencies: - supports-color - dev: false - /@babel/helper-optimise-call-expression@7.18.6: - resolution: {integrity: sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==} + /@babel/helper-optimise-call-expression@7.22.5: + resolution: {integrity: sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==} engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.22.5 @@ -5722,7 +5703,6 @@ packages: /@babel/helper-plugin-utils@7.22.5: resolution: {integrity: sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==} engines: {node: '>=6.9.0'} - dev: false /@babel/helper-remap-async-to-generator@7.18.9(@babel/core@7.22.5): resolution: {integrity: sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA==} @@ -5742,18 +5722,19 @@ packages: - supports-color dev: false - /@babel/helper-replace-supers@7.21.5: - resolution: {integrity: sha512-/y7vBgsr9Idu4M6MprbOVUfH3vs7tsIfnVWv/Ml2xgwvyH6LTngdfbf5AdsKwkJy4zgy1X/kuNrEKvhhK28Yrg==} + /@babel/helper-replace-supers@7.22.9(@babel/core@7.22.5): + resolution: {integrity: sha512-LJIKvvpgPOPUThdYqcX6IXRuIcTkcAub0IaDRGCZH0p5GPUp7PhRU9QVgFcDDd51BaPkk77ZjqFwh6DZTAEmGg==} engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + peerDependenciesMeta: + '@babel/core': + optional: true dependencies: + '@babel/core': 7.22.5 '@babel/helper-environment-visitor': 7.22.5 - '@babel/helper-member-expression-to-functions': 7.21.5 - '@babel/helper-optimise-call-expression': 7.18.6 - '@babel/template': 7.22.5 - '@babel/traverse': 7.22.5 - '@babel/types': 7.22.5 - transitivePeerDependencies: - - supports-color + '@babel/helper-member-expression-to-functions': 7.22.5 + '@babel/helper-optimise-call-expression': 7.22.5 dev: false /@babel/helper-simple-access@7.22.5: @@ -5761,10 +5742,9 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.22.5 - dev: false - /@babel/helper-skip-transparent-expression-wrappers@7.20.0: - resolution: {integrity: sha512-5y1JYeNKfvnT8sZcK9DVRtpTbGiomYIHviSP3OQWmDPU3DeH4a1ZlT/N2lyQ5P8egjcRaT/Y9aNqUxK0WsnIIg==} + /@babel/helper-skip-transparent-expression-wrappers@7.22.5: + resolution: {integrity: sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==} engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.22.5 @@ -5775,6 +5755,12 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/types': 7.22.5 + + /@babel/helper-split-export-declaration@7.22.6: + resolution: {integrity: sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.22.5 dev: false /@babel/helper-string-parser@7.22.5: @@ -5785,15 +5771,9 @@ packages: resolution: {integrity: sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==} engines: {node: '>=6.9.0'} - /@babel/helper-validator-option@7.21.0: - resolution: {integrity: sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ==} - engines: {node: '>=6.9.0'} - dev: false - /@babel/helper-validator-option@7.22.5: resolution: {integrity: sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw==} engines: {node: '>=6.9.0'} - dev: false /@babel/helper-wrap-function@7.20.5: resolution: {integrity: sha512-bYMxIWK5mh+TgXGVqAtnu5Yn1un+v8DDZtqyzKRLUzrh70Eal2O3aZ7aPYiMADO4uKlkzOiRiZ6GX5q3qxvW9Q==} @@ -5816,7 +5796,6 @@ packages: '@babel/types': 7.22.5 transitivePeerDependencies: - supports-color - dev: false /@babel/highlight@7.22.5: resolution: {integrity: sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==} @@ -5857,7 +5836,7 @@ packages: dependencies: '@babel/core': 7.22.5 '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-skip-transparent-expression-wrappers': 7.20.0 + '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 '@babel/plugin-proposal-optional-chaining': 7.21.0(@babel/core@7.22.5) dev: false @@ -5889,10 +5868,8 @@ packages: optional: true dependencies: '@babel/core': 7.22.5 - '@babel/helper-create-class-features-plugin': 7.21.8(@babel/core@7.22.5) + '@babel/helper-create-class-features-plugin': 7.22.9(@babel/core@7.22.5) '@babel/helper-plugin-utils': 7.22.5 - transitivePeerDependencies: - - supports-color dev: false /@babel/plugin-proposal-class-static-block@7.21.0(@babel/core@7.22.5): @@ -5905,11 +5882,9 @@ packages: optional: true dependencies: '@babel/core': 7.22.5 - '@babel/helper-create-class-features-plugin': 7.21.8(@babel/core@7.22.5) + '@babel/helper-create-class-features-plugin': 7.22.9(@babel/core@7.22.5) '@babel/helper-plugin-utils': 7.22.5 '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.22.5) - transitivePeerDependencies: - - supports-color dev: false /@babel/plugin-proposal-dynamic-import@7.18.6(@babel/core@7.22.5): @@ -6038,7 +6013,7 @@ packages: dependencies: '@babel/core': 7.22.5 '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-skip-transparent-expression-wrappers': 7.20.0 + '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.22.5) dev: false @@ -6052,10 +6027,8 @@ packages: optional: true dependencies: '@babel/core': 7.22.5 - '@babel/helper-create-class-features-plugin': 7.21.8(@babel/core@7.22.5) + '@babel/helper-create-class-features-plugin': 7.22.9(@babel/core@7.22.5) '@babel/helper-plugin-utils': 7.22.5 - transitivePeerDependencies: - - supports-color dev: false /@babel/plugin-proposal-private-property-in-object@7.21.0(@babel/core@7.22.5): @@ -6069,11 +6042,9 @@ packages: dependencies: '@babel/core': 7.22.5 '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-create-class-features-plugin': 7.21.8(@babel/core@7.22.5) + '@babel/helper-create-class-features-plugin': 7.22.9(@babel/core@7.22.5) '@babel/helper-plugin-utils': 7.22.5 '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.22.5) - transitivePeerDependencies: - - supports-color dev: false /@babel/plugin-proposal-unicode-property-regex@7.18.6(@babel/core@7.22.5): @@ -6212,7 +6183,6 @@ packages: dependencies: '@babel/core': 7.22.5 '@babel/helper-plugin-utils': 7.22.5 - dev: false /@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.22.5): resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} @@ -6312,8 +6282,8 @@ packages: '@babel/helper-plugin-utils': 7.22.5 dev: false - /@babel/plugin-syntax-typescript@7.21.4(@babel/core@7.22.5): - resolution: {integrity: sha512-xz0D39NvhQn4t4RNsHmDnnsaQizIlUkdtYvLs8La1BlfjQ6JEwxkJGeqJMW2tAXx+q6H+WFuUTXNdYVpEya0YA==} + /@babel/plugin-syntax-typescript@7.22.5(@babel/core@7.22.5): + resolution: {integrity: sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -6395,13 +6365,11 @@ packages: '@babel/helper-compilation-targets': 7.22.5(@babel/core@7.22.5) '@babel/helper-environment-visitor': 7.22.5 '@babel/helper-function-name': 7.22.5 - '@babel/helper-optimise-call-expression': 7.18.6 + '@babel/helper-optimise-call-expression': 7.22.5 '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-replace-supers': 7.21.5 - '@babel/helper-split-export-declaration': 7.22.5 + '@babel/helper-replace-supers': 7.22.9(@babel/core@7.22.5) + '@babel/helper-split-export-declaration': 7.22.6 globals: 11.12.0 - transitivePeerDependencies: - - supports-color dev: false /@babel/plugin-transform-computed-properties@7.21.5(@babel/core@7.22.5): @@ -6542,8 +6510,8 @@ packages: - supports-color dev: false - /@babel/plugin-transform-modules-commonjs@7.21.5(@babel/core@7.22.5): - resolution: {integrity: sha512-OVryBEgKUbtqMoB7eG2rs6UFexJi6Zj6FDXx+esBLPTCxCNxAY9o+8Di7IsUGJ+AVhp5ncK0fxWUBd0/1gPhrQ==} + /@babel/plugin-transform-modules-commonjs@7.22.5(@babel/core@7.22.5): + resolution: {integrity: sha512-B4pzOXj+ONRmuaQTg05b3y/4DuFz3WcCNAXPLb2Q0GT0TrGKGxNKV4jwsXts+StaM0LQczZbOpj8o1DLPDJIiA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -6631,9 +6599,7 @@ packages: dependencies: '@babel/core': 7.22.5 '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-replace-supers': 7.21.5 - transitivePeerDependencies: - - supports-color + '@babel/helper-replace-supers': 7.22.9(@babel/core@7.22.5) dev: false /@babel/plugin-transform-parameters@7.21.3(@babel/core@7.22.5): @@ -6662,6 +6628,44 @@ packages: '@babel/helper-plugin-utils': 7.22.5 dev: false + /@babel/plugin-transform-react-jsx-development@7.22.5: + resolution: {integrity: sha512-bDhuzwWMuInwCYeDeMzyi7TaBgRQei6DqxhbyniL7/VG4RSS7HtSL2QbY4eESy1KJqlWt8g3xeEBGPuo+XqC8A==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + peerDependenciesMeta: + '@babel/core': + optional: true + dependencies: + '@babel/plugin-transform-react-jsx': 7.22.5(@babel/core@7.22.5) + dev: false + + /@babel/plugin-transform-react-jsx-self@7.22.5(@babel/core@7.22.5): + resolution: {integrity: sha512-nTh2ogNUtxbiSbxaT4Ds6aXnXEipHweN9YRgOX/oNXdf0cCrGn/+2LozFa3lnPV5D90MkjhgckCPBrsoSc1a7g==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + peerDependenciesMeta: + '@babel/core': + optional: true + dependencies: + '@babel/core': 7.22.5 + '@babel/helper-plugin-utils': 7.22.5 + dev: false + + /@babel/plugin-transform-react-jsx-source@7.22.5(@babel/core@7.22.5): + resolution: {integrity: sha512-yIiRO6yobeEIaI0RTbIr8iAK9FcBHLtZq0S89ZPjDLQXBA4xvghaKqI0etp/tF3htTM0sazJKKLz9oEiGRtu7w==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + peerDependenciesMeta: + '@babel/core': + optional: true + dependencies: + '@babel/core': 7.22.5 + '@babel/helper-plugin-utils': 7.22.5 + dev: false + /@babel/plugin-transform-react-jsx@7.22.5(@babel/core@7.22.5): resolution: {integrity: sha512-rog5gZaVbUip5iWDMTYbVM15XQq+RkUKhET/IHR6oizR+JEoN6CAfTTuHcK4vwUyzca30qqHqEpzBOnaRMWYMA==} engines: {node: '>=6.9.0'} @@ -6677,7 +6681,6 @@ packages: '@babel/helper-plugin-utils': 7.22.5 '@babel/plugin-syntax-jsx': 7.22.5(@babel/core@7.22.5) '@babel/types': 7.22.5 - dev: false /@babel/plugin-transform-regenerator@7.21.5(@babel/core@7.22.5): resolution: {integrity: sha512-ZoYBKDb6LyMi5yCsByQ5jmXsHAQDDYeexT1Szvlmui+lADvfSecr5Dxd/PkrTC3pAD182Fcju1VQkB4oCp9M+w==} @@ -6730,7 +6733,7 @@ packages: dependencies: '@babel/core': 7.22.5 '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-skip-transparent-expression-wrappers': 7.20.0 + '@babel/helper-skip-transparent-expression-wrappers': 7.22.5 dev: false /@babel/plugin-transform-sticky-regex@7.18.6(@babel/core@7.22.5): @@ -6783,11 +6786,25 @@ packages: dependencies: '@babel/core': 7.22.5 '@babel/helper-annotate-as-pure': 7.22.5 - '@babel/helper-create-class-features-plugin': 7.21.8(@babel/core@7.22.5) + '@babel/helper-create-class-features-plugin': 7.22.9(@babel/core@7.22.5) '@babel/helper-plugin-utils': 7.22.5 - '@babel/plugin-syntax-typescript': 7.21.4(@babel/core@7.22.5) - transitivePeerDependencies: - - supports-color + '@babel/plugin-syntax-typescript': 7.22.5(@babel/core@7.22.5) + dev: false + + /@babel/plugin-transform-typescript@7.22.9(@babel/core@7.22.5): + resolution: {integrity: sha512-BnVR1CpKiuD0iobHPaM1iLvcwPYN2uVFAqoLVSpEDKWuOikoCv5HbKLxclhKYUXlWkX86DoZGtqI4XhbOsyrMg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + peerDependenciesMeta: + '@babel/core': + optional: true + dependencies: + '@babel/core': 7.22.5 + '@babel/helper-annotate-as-pure': 7.22.5 + '@babel/helper-create-class-features-plugin': 7.22.9(@babel/core@7.22.5) + '@babel/helper-plugin-utils': 7.22.5 + '@babel/plugin-syntax-typescript': 7.22.5(@babel/core@7.22.5) dev: false /@babel/plugin-transform-unicode-escapes@7.21.5(@babel/core@7.22.5): @@ -6830,7 +6847,7 @@ packages: '@babel/core': 7.22.5 '@babel/helper-compilation-targets': 7.22.5(@babel/core@7.22.5) '@babel/helper-plugin-utils': 7.22.5 - '@babel/helper-validator-option': 7.21.0 + '@babel/helper-validator-option': 7.22.5 '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.18.6(@babel/core@7.22.5) '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.20.7(@babel/core@7.22.5) '@babel/plugin-proposal-async-generator-functions': 7.20.7(@babel/core@7.22.5) @@ -6879,7 +6896,7 @@ packages: '@babel/plugin-transform-literals': 7.18.9(@babel/core@7.22.5) '@babel/plugin-transform-member-expression-literals': 7.18.6(@babel/core@7.22.5) '@babel/plugin-transform-modules-amd': 7.20.11(@babel/core@7.22.5) - '@babel/plugin-transform-modules-commonjs': 7.21.5(@babel/core@7.22.5) + '@babel/plugin-transform-modules-commonjs': 7.22.5(@babel/core@7.22.5) '@babel/plugin-transform-modules-systemjs': 7.20.11(@babel/core@7.22.5) '@babel/plugin-transform-modules-umd': 7.18.6(@babel/core@7.22.5) '@babel/plugin-transform-named-capturing-groups-regex': 7.20.5(@babel/core@7.22.5) @@ -6923,6 +6940,25 @@ packages: esutils: 2.0.3 dev: false + /@babel/preset-typescript@7.22.5(@babel/core@7.22.5): + resolution: {integrity: sha512-YbPaal9LxztSGhmndR46FmAbkJ/1fAsw293tSU+I5E5h+cnJ3d4GTwyUgGYmOXJYdGA+uNePle4qbaRzj2NISQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + peerDependenciesMeta: + '@babel/core': + optional: true + dependencies: + '@babel/core': 7.22.5 + '@babel/helper-plugin-utils': 7.22.5 + '@babel/helper-validator-option': 7.22.5 + '@babel/plugin-syntax-jsx': 7.22.5(@babel/core@7.22.5) + '@babel/plugin-transform-modules-commonjs': 7.22.5(@babel/core@7.22.5) + '@babel/plugin-transform-typescript': 7.22.9(@babel/core@7.22.5) + transitivePeerDependencies: + - supports-color + dev: false + /@babel/regjsgen@0.8.0: resolution: {integrity: sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==} dev: false @@ -6949,7 +6985,6 @@ packages: '@babel/code-frame': 7.22.5 '@babel/parser': 7.22.5 '@babel/types': 7.22.5 - dev: false /@babel/traverse@7.22.5: resolution: {integrity: sha512-7DuIjPgERaNo6r+PZwItpjCZEa5vyw4eJGufeLxrPdBXBoLcCJCIasvK6pK/9DVNrLZTLFhUGqaC6X/PA007TQ==} @@ -6967,7 +7002,6 @@ packages: globals: 11.12.0 transitivePeerDependencies: - supports-color - dev: false /@babel/types@7.22.5: resolution: {integrity: sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==} @@ -7098,7 +7132,7 @@ packages: resolution: {integrity: sha512-JppheLu7S114aEs157fOZDjFqUDpm7eHdq5E8SSR0gUBTEK0cNSHsrSR5a66xs0z3RWuo46QvA3vawp8BxDHvg==} dependencies: dataloader: 1.4.0 - node-fetch: 2.6.12 + node-fetch: 2.6.11 transitivePeerDependencies: - encoding dev: true @@ -7957,11 +7991,11 @@ packages: detect-libc: 2.0.1 https-proxy-agent: 5.0.1 make-dir: 3.1.0 - node-fetch: 2.6.12 + node-fetch: 2.6.11 nopt: 5.0.0 npmlog: 5.0.1 rimraf: 3.0.2 - semver: 7.5.4 + semver: 7.5.3 tar: 6.1.15 transitivePeerDependencies: - encoding @@ -8336,7 +8370,7 @@ packages: '@octokit/request-error': 2.1.0 '@octokit/types': 6.41.0 is-plain-object: 5.0.0 - node-fetch: 2.6.12 + node-fetch: 2.6.11 universal-user-agent: 6.0.0 transitivePeerDependencies: - encoding @@ -8381,6 +8415,30 @@ packages: playwright-core: 1.29.2 dev: true + /@preact/preset-vite@2.5.0(preact@10.15.1): + resolution: {integrity: sha512-BUhfB2xQ6ex0yPkrT1Z3LbfPzjpJecOZwQ/xJrXGFSZD84+ObyS//41RdEoQCMWsM0t7UHGaujUxUBub7WM1Jw==} + peerDependencies: + '@babel/core': 7.x + vite: 2.x || 3.x || 4.x + peerDependenciesMeta: + '@babel/core': + optional: true + vite: + optional: true + dependencies: + '@babel/plugin-transform-react-jsx': 7.22.5(@babel/core@7.22.5) + '@babel/plugin-transform-react-jsx-development': 7.22.5 + '@prefresh/vite': 2.4.1(preact@10.15.1) + '@rollup/pluginutils': 4.2.1 + babel-plugin-transform-hook-names: 1.0.2 + debug: 4.3.4 + kolorist: 1.8.0 + resolve: 1.22.2 + transitivePeerDependencies: + - preact + - supports-color + dev: false + /@preact/signals-core@1.3.0: resolution: {integrity: sha512-M+M3ZOtd1dtV/uasyk4SZu1vbfEJ4NeENv0F7F12nijZYedB5wSgbtZcuACyssnTznhF4ctUyrR0dZHuHfyWKA==} dev: false @@ -8403,6 +8461,41 @@ packages: preact: 10.15.1 dev: false + /@prefresh/babel-plugin@0.5.0: + resolution: {integrity: sha512-joAwpkUDwo7ZqJnufXRGzUb+udk20RBgfA8oLPBh5aJH2LeStmV1luBfeJTztPdyCscC2j2SmZ/tVxFRMIxAEw==} + dev: false + + /@prefresh/core@1.5.1(preact@10.15.1): + resolution: {integrity: sha512-e0mB0Oxtog6ZpKPDBYbzFniFJDIktuKMzOHp7sguntU+ot0yi6dbhJRE9Css1qf0u16wdSZjpL2W2ODWuU05Cw==} + peerDependencies: + preact: ^10.0.0 + dependencies: + preact: 10.15.1 + dev: false + + /@prefresh/utils@1.2.0: + resolution: {integrity: sha512-KtC/fZw+oqtwOLUFM9UtiitB0JsVX0zLKNyRTA332sqREqSALIIQQxdUCS1P3xR/jT1e2e8/5rwH6gdcMLEmsQ==} + dev: false + + /@prefresh/vite@2.4.1(preact@10.15.1): + resolution: {integrity: sha512-vthWmEqu8TZFeyrBNc9YE5SiC3DVSzPgsOCp/WQ7FqdHpOIJi7Z8XvCK06rBPOtG4914S52MjG9Ls22eVAiuqQ==} + peerDependencies: + preact: ^10.4.0 + vite: '>=2.0.0' + peerDependenciesMeta: + vite: + optional: true + dependencies: + '@babel/core': 7.22.5 + '@prefresh/babel-plugin': 0.5.0 + '@prefresh/core': 1.5.1(preact@10.15.1) + '@prefresh/utils': 1.2.0 + '@rollup/pluginutils': 4.2.1 + preact: 10.15.1 + transitivePeerDependencies: + - supports-color + dev: false + /@rollup/plugin-babel@5.3.1(@babel/core@7.22.5)(rollup@2.79.1): resolution: {integrity: sha512-WFfdLWU/xVWKeRQnKmIAQULUI7Il0gZnBIH/ZFO069wYIfPu+8zrfp/KMW0atmELoRDq8FbiP3VCss9MhCut7Q==} engines: {node: '>= 10.0.0'} @@ -9070,7 +9163,7 @@ packages: debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 - semver: 7.5.4 + semver: 7.5.3 ts-api-utils: 1.0.1(typescript@5.1.6) typescript: 5.1.6 transitivePeerDependencies: @@ -9091,7 +9184,7 @@ packages: '@typescript-eslint/typescript-estree': 6.0.0(typescript@5.1.6) eslint: 8.43.0 eslint-scope: 5.1.1 - semver: 7.5.4 + semver: 7.5.3 transitivePeerDependencies: - supports-color - typescript @@ -9168,6 +9261,23 @@ packages: - supports-color dev: false + /@vitejs/plugin-react@4.0.3: + resolution: {integrity: sha512-pwXDog5nwwvSIzwrvYYmA2Ljcd/ZNlcsSG2Q9CNDBwnsd55UGAyr2doXtB5j+2uymRCnCfExlznzzSFbBRcoCg==} + engines: {node: ^14.18.0 || >=16.0.0} + peerDependencies: + vite: ^4.2.0 + peerDependenciesMeta: + vite: + optional: true + dependencies: + '@babel/core': 7.22.5 + '@babel/plugin-transform-react-jsx-self': 7.22.5(@babel/core@7.22.5) + '@babel/plugin-transform-react-jsx-source': 7.22.5(@babel/core@7.22.5) + react-refresh: 0.14.0 + transitivePeerDependencies: + - supports-color + dev: false + /@vitejs/plugin-vue-jsx@3.0.1(vite@4.4.6)(vue@3.3.4): resolution: {integrity: sha512-+Jb7ggL48FSPS1uhPnJbJwWa9Sr90vQ+d0InW+AhBM22n+cfuYqJZDckBc+W3QSHe1WDvewMZfa4wZOtk5pRgw==} engines: {node: ^14.18.0 || >=16.0.0} @@ -9735,7 +9845,7 @@ packages: preferred-pm: 3.0.3 prompts: 2.4.2 rehype: 12.0.1 - semver: 7.5.4 + semver: 7.5.3 server-destroy: 1.0.1 shiki: 0.14.1 string-width: 5.1.2 @@ -9824,7 +9934,7 @@ packages: resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} engines: {node: '>= 0.4'} - /babel-plugin-jsx-dom-expressions@0.36.10: + /babel-plugin-jsx-dom-expressions@0.36.10(@babel/core@7.22.5): resolution: {integrity: sha512-QA2k/14WGw+RgcGGnEuLWwnu4em6CGhjeXtjvgOYyFHYS2a+CzPeaVQHDOlfuiBcjq/3hWMspHMIMnPEOIzdBg==} peerDependencies: '@babel/core': ^7.20.12 @@ -9832,6 +9942,7 @@ packages: '@babel/core': optional: true dependencies: + '@babel/core': 7.22.5 '@babel/helper-module-imports': 7.18.6 '@babel/plugin-syntax-jsx': 7.22.5(@babel/core@7.22.5) '@babel/types': 7.22.5 @@ -9839,17 +9950,6 @@ packages: validate-html-nesting: 1.2.2 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.8 - resolve: 1.22.2 - dev: false - /babel-plugin-polyfill-corejs2@0.3.3(@babel/core@7.22.5): resolution: {integrity: sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q==} peerDependencies: @@ -9895,7 +9995,16 @@ packages: - supports-color dev: false - /babel-preset-solid@1.7.4: + /babel-plugin-transform-hook-names@1.0.2: + resolution: {integrity: sha512-5gafyjyyBTTdX/tQQ0hRgu4AhNHG/hqWi0ZZmg2xvs2FgRkJXzDNKBZCyoYqgFkovfDrgM8OoKg8karoUvWeCw==} + peerDependencies: + '@babel/core': ^7.12.10 + peerDependenciesMeta: + '@babel/core': + optional: true + dev: false + + /babel-preset-solid@1.7.4(@babel/core@7.22.5): resolution: {integrity: sha512-0mbHNYkbOVYhH6L95VlHVkBEVQjOXSzUqLDiFxUcsg/tU4yTM/qx7FI8C+kmos9LHckQBSm3wtwoe1BZLNJR1w==} peerDependencies: '@babel/core': ^7.0.0 @@ -9903,7 +10012,8 @@ packages: '@babel/core': optional: true dependencies: - babel-plugin-jsx-dom-expressions: 0.36.10 + '@babel/core': 7.22.5 + babel-plugin-jsx-dom-expressions: 0.36.10(@babel/core@7.22.5) dev: false /bail@2.0.2: @@ -10070,7 +10180,7 @@ packages: /builtins@5.0.1: resolution: {integrity: sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==} dependencies: - semver: 7.5.4 + semver: 7.5.3 dev: true /bundle-name@3.0.0: @@ -10456,7 +10566,7 @@ packages: js-string-escape: 1.0.1 lodash: 4.17.21 md5-hex: 3.0.1 - semver: 7.5.4 + semver: 7.5.3 well-known-symbols: 2.0.0 dev: false @@ -10473,7 +10583,6 @@ packages: /convert-source-map@1.9.0: resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} - dev: false /cookie@0.4.2: resolution: {integrity: sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==} @@ -12009,21 +12118,6 @@ packages: dependencies: to-regex-range: 5.0.1 - /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'} - dependencies: - locate-path: 3.0.0 - dev: false - /find-up@4.1.0: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} @@ -12194,7 +12288,6 @@ packages: /gensync@1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} - dev: false /get-caller-file@2.0.5: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} @@ -12307,21 +12400,9 @@ 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 - /globals@11.12.0: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} - dev: false /globals@13.20.0: resolution: {integrity: sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==} @@ -13134,6 +13215,11 @@ packages: dependencies: call-bind: 1.0.2 + /is-what@4.1.15: + resolution: {integrity: sha512-uKua1wfy3Yt+YqsD6mTUEa2zSi3G1oPlqTflgaPJ7z63vUGN5pxFpnQfeSLMFnJDEsdvOtkp1rUWkYjB4YfhgA==} + engines: {node: '>=12.13'} + dev: false + /is-windows@1.0.2: resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} engines: {node: '>=0.10.0'} @@ -13281,7 +13367,6 @@ packages: resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} engines: {node: '>=4'} hasBin: true - dev: false /json-parse-better-errors@1.0.2: resolution: {integrity: sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==} @@ -13355,6 +13440,10 @@ packages: resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} engines: {node: '>=6'} + /kolorist@1.8.0: + resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==} + dev: false + /leven@3.1.0: resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} engines: {node: '>=6'} @@ -13444,14 +13533,6 @@ packages: engines: {node: '>=14'} dev: false - /locate-path@3.0.0: - resolution: {integrity: sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==} - engines: {node: '>=6'} - dependencies: - p-locate: 3.0.0 - path-exists: 3.0.0 - dev: false - /locate-path@5.0.0: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} @@ -13888,6 +13969,13 @@ packages: yargs-parser: 18.1.3 dev: true + /merge-anything@5.1.7: + resolution: {integrity: sha512-eRtbOb1N5iyH0tkQDAoQ4Ipsp/5qSR79Dzrz8hEPxRX10RWWR/iQXdoKmBSRCThY1Fh5EhISDtpSc93fpxUniQ==} + engines: {node: '>=12.13'} + dependencies: + is-what: 4.1.15 + dev: false + /merge-descriptors@1.0.1: resolution: {integrity: sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==} dev: true @@ -14560,7 +14648,7 @@ packages: resolution: {integrity: sha512-zNy02qivjjRosswoYmPi8hIKJRr8MpQyeKT6qlcq/OnOgA3Rhoae+IYOqsM9V5+JnHWmxKnWOT2GxvtqdtOCXA==} engines: {node: '>=10'} dependencies: - semver: 7.5.4 + semver: 7.5.3 /node-addon-api@6.1.0: resolution: {integrity: sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==} @@ -14574,8 +14662,8 @@ packages: resolution: {integrity: sha512-5IAMBTl9p6PaAjYCnMv5FmqIF6GcZnawAVnzaCG0rX2aYZJ4CxEkZNtVPuTRug7fL7wyM5BQYTlAzcyMPi6oTQ==} dev: false - /node-fetch@2.6.12: - resolution: {integrity: sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==} + /node-fetch@2.6.11: + resolution: {integrity: sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==} engines: {node: 4.x || >=6.0.0} peerDependencies: encoding: ^0.1.0 @@ -14695,7 +14783,7 @@ packages: dependencies: execa: 6.1.0 parse-package-name: 1.0.0 - semver: 7.5.4 + semver: 7.5.3 validate-npm-package-name: 4.0.0 dev: true @@ -14864,13 +14952,6 @@ packages: yocto-queue: 1.0.0 dev: false - /p-locate@3.0.0: - resolution: {integrity: sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==} - engines: {node: '>=6'} - dependencies: - p-limit: 2.3.0 - dev: false - /p-locate@4.1.0: resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} engines: {node: '>=8'} @@ -15019,11 +15100,6 @@ packages: resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} dev: true - /path-exists@3.0.0: - resolution: {integrity: sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==} - engines: {node: '>=4'} - dev: false - /path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} @@ -15121,13 +15197,6 @@ packages: pathe: 1.1.0 dev: false - /pkg-up@3.1.0: - resolution: {integrity: sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==} - engines: {node: '>=8'} - dependencies: - find-up: 3.0.0 - dev: false - /playwright-core@1.29.2: resolution: {integrity: sha512-94QXm4PMgFoHAhlCuoWyaBYKb92yOcGVHdQLoxQ7Wjlc7Flg4aC/jbFW7xMR52OfXMVkWicue4WXE7QEegbIRA==} engines: {node: '>=14'} @@ -15784,6 +15853,11 @@ packages: resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==} dev: false + /react-refresh@0.14.0: + resolution: {integrity: sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==} + engines: {node: '>=0.10.0'} + dev: false + /react@18.2.0: resolution: {integrity: sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==} engines: {node: '>=0.10.0'} @@ -16142,10 +16216,6 @@ packages: resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} dev: true - /reselect@4.1.8: - resolution: {integrity: sha512-ab9EmR80F/zQTMNeneUr4cv+jSwPJgIlvEmVwLerwrWVbpLlBuls9XHzIeTFy4cegU2NHBp3va0LKOzU5qFEYQ==} - dev: false - /resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} @@ -16291,8 +16361,8 @@ packages: optionalDependencies: fsevents: 2.3.2 - /rollup@3.26.3: - resolution: {integrity: sha512-7Tin0C8l86TkpcMtXvQu6saWH93nhG3dGQ1/+l5V2TDMceTxO7kDiK6GzbfLWNNxqJXm591PcEZUozZm51ogwQ==} + /rollup@3.27.0: + resolution: {integrity: sha512-aOltLCrYZ0FhJDm7fCqwTjIUEVjWjcydKBV/Zeid6Mn8BWgDCUBBWT5beM5ieForYNo/1ZHuGJdka26kvQ3Gzg==} engines: {node: '>=14.18.0', npm: '>=8.0.0'} hasBin: true optionalDependencies: @@ -16390,12 +16460,10 @@ packages: /semver@6.3.0: resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} hasBin: true - dev: false /semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true - dev: false /semver@7.5.2: resolution: {integrity: sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==} @@ -16412,13 +16480,6 @@ packages: dependencies: lru-cache: 6.0.0 - /semver@7.5.4: - resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==} - engines: {node: '>=10'} - hasBin: true - dependencies: - lru-cache: 6.0.0 - /send@0.18.0: resolution: {integrity: sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==} engines: {node: '>= 0.8.0'} @@ -16646,6 +16707,17 @@ packages: csstype: 3.1.2 seroval: 0.5.1 + /solid-refresh@0.5.3(solid-js@1.7.6): + resolution: {integrity: sha512-Otg5it5sjOdZbQZJnvo99TEBAr6J7PQ5AubZLNU6szZzg3RQQ5MX04oteBIIGDs0y2Qv8aXKm9e44V8z+UnFdw==} + peerDependencies: + solid-js: ^1.3 + dependencies: + '@babel/generator': 7.22.5 + '@babel/helper-module-imports': 7.22.5 + '@babel/types': 7.22.5 + solid-js: 1.7.6 + dev: false + /source-map-js@1.0.2: resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} engines: {node: '>=0.10.0'} @@ -17437,7 +17509,7 @@ packages: /typescript-auto-import-cache@0.3.0: resolution: {integrity: sha512-Rq6/q4O9iyqUdjvOoyas7x/Qf9nWUMeqpP3YeTaLA+uECgfy5wOhfOS+SW/+fZ/uI/ZcKaf+2/ZhFzXh8xfofQ==} dependencies: - semver: 7.5.4 + semver: 7.5.3 dev: true /typescript@5.1.6: @@ -17808,6 +17880,27 @@ packages: - supports-color dev: false + /vite-plugin-solid@2.7.0(solid-js@1.7.6): + resolution: {integrity: sha512-avp/Jl5zOp/Itfo67xtDB2O61U7idviaIp4mLsjhCa13PjKNasz+IID0jYTyqUp9SFx6/PmBr6v4KgDppqompg==} + peerDependencies: + solid-js: ^1.7.2 + vite: ^3.0.0 || ^4.0.0 + peerDependenciesMeta: + vite: + optional: true + dependencies: + '@babel/core': 7.22.5 + '@babel/preset-typescript': 7.22.5(@babel/core@7.22.5) + '@types/babel__core': 7.20.1 + babel-preset-solid: 1.7.4(@babel/core@7.22.5) + merge-anything: 5.1.7 + solid-js: 1.7.6 + solid-refresh: 0.5.3(solid-js@1.7.6) + vitefu: 0.2.4(vite@4.4.6) + transitivePeerDependencies: + - supports-color + dev: false + /vite@4.3.9(@types/node@18.16.18): resolution: {integrity: sha512-qsTNZjO9NoJNW7KnOrgYwczm0WctJ8m/yqYAMAK9Lxt4SoySUfS5S8ia9K7JHpa3KEeMfyF8LoJ3c5NeBJy6pg==} engines: {node: ^14.18.0 || >=16.0.0} @@ -17872,7 +17965,7 @@ packages: '@types/node': 14.18.51 esbuild: 0.18.16 postcss: 8.4.27 - rollup: 3.26.3 + rollup: 3.27.0 optionalDependencies: fsevents: 2.3.2 dev: true @@ -17908,7 +18001,7 @@ packages: '@types/node': 18.16.18 esbuild: 0.18.16 postcss: 8.4.27 - rollup: 3.26.3 + rollup: 3.27.0 sass: 1.63.4 optionalDependencies: fsevents: 2.3.2 @@ -17922,7 +18015,6 @@ packages: optional: true dependencies: vite: 4.4.6(@types/node@18.16.18)(sass@1.63.4) - dev: false /vitest@0.31.4: resolution: {integrity: sha512-GoV0VQPmWrUFOZSg3RpQAPN+LPmHg2/gxlMNJlyxJihkz6qReHDV6b0pPDcqFLNEPya4tWJ1pgwUNP9MLmUfvQ==} @@ -18075,7 +18167,7 @@ packages: dependencies: '@volar/language-service': 1.10.0 '@volar/typescript': 1.10.0 - semver: 7.5.4 + semver: 7.5.3 typescript-auto-import-cache: 0.3.0 vscode-languageserver-textdocument: 1.0.8 vscode-nls: 5.2.0 @@ -18710,21 +18802,25 @@ packages: file:packages/astro/test/fixtures/css-assets/packages/font-awesome: resolution: {directory: packages/astro/test/fixtures/css-assets/packages/font-awesome, type: directory} name: '@test/astro-font-awesome-package' + version: 0.0.1 dev: false file:packages/astro/test/fixtures/multiple-renderers/renderers/one: resolution: {directory: packages/astro/test/fixtures/multiple-renderers/renderers/one, type: directory} name: '@test/astro-renderer-one' + version: 1.0.0 dev: false file:packages/astro/test/fixtures/multiple-renderers/renderers/two: resolution: {directory: packages/astro/test/fixtures/multiple-renderers/renderers/two, type: directory} name: '@test/astro-renderer-two' + version: 1.0.0 dev: false file:packages/astro/test/fixtures/solid-component/deps/solid-jsx-component: resolution: {directory: packages/astro/test/fixtures/solid-component/deps/solid-jsx-component, type: directory} name: '@test/solid-jsx-component' + version: 0.0.0 dependencies: solid-js: 1.7.6 dev: false