diff --git a/.changeset/quick-onions-leave.md b/.changeset/quick-onions-leave.md new file mode 100644 index 0000000000000..a47e1317eea3a --- /dev/null +++ b/.changeset/quick-onions-leave.md @@ -0,0 +1,47 @@ +--- +'astro': patch +--- + +Refactors legacy `content` and `data` collections to use the Content Layer API `glob()` loader for better performance and to support backwards compatibility. Also introduces the `legacy.collections` flag for projects that are unable to update to the new behavior immediately. + +:warning: **BREAKING CHANGE FOR LEGACY CONTENT COLLECTIONS** :warning: + +By default, collections that use the old types (`content` or `data`) and do not define a `loader` are now implemented under the hood using the Content Layer API's built-in `glob()` loader, with extra backward-compatibility handling. + +In order to achieve backwards compatibility with existing `content` collections, the following have been implemented: + +- a `glob` loader collection is defined, with patterns that match the previous handling (matches `src/content//**/*.md` and other content extensions depending on installed integrations, with underscore-prefixed files and folders ignored) +- When used in the runtime, the entries have an ID based on the filename in the same format as legacy collections +- A `slug` field is added with the same format as before +- A `render()` method is added to the entry, so they can be called using `entry.render()` +- `getEntryBySlug` is supported + +In order to achieve backwards compatibility with existing `data` collections, the following have been implemented: + +- a `glob` loader collection is defined, with patterns that match the previous handling (matches `src/content//**/*{.json,.yaml}` and other data extensions, with underscore-prefixed files and folders ignored) +- Entries have an ID that is not slugified +- `getDataEntryById` is supported + +While this backwards compatibility implementation is able to emulate most of the features of legacy collections, **there are some differences and limitations that may cause breaking changes to existing collections**: + +- In previous versions of Astro, collections would be generated for all folders in `src/content/`, even if they were not defined in `src/content/config.ts`. This behavior is now deprecated, and collections should always be defined in `src/content/config.ts`. For existing collections, these can just be empty declarations (e.g. `const blog = defineCollection({})`) and Astro will implicitly define your legacy collection for you in a way that is compatible with the new loading behavior. +- The special `layout` field is not supported in Markdown collection entries. This property is intended only for standalone page files located in `src/pages/` and not likely to be in your collection entries. However, if you were using this property, you must now create dynamic routes that include your page styling. +- Sort order of generated collections is non-deterministic and platform-dependent. This means that if you are calling `getCollection()`, the order in which entries are returned may be different than before. If you need a specific order, you should sort the collection entries yourself. +- `image().refine()` is not supported. If you need to validate the properties of an image you will need to do this at runtime in your page or component. +- the `key` argument of `getEntry(collection, key)` is typed as `string`, rather than having types for every entry. + +A new legacy configuration flag `legacy.collections` is added for users that want to keep their current legacy (content and data) collections behavior (available in Astro v2 - v4), or who are not yet ready to update their projects: + +```js +// astro.config.mjs +import { defineConfig } from 'astro/config'; + +export default defineConfig({ + legacy: { + collections: true + } +}); +``` + +When set, no changes to your existing collections are necessary, and the restrictions on storing both new and old collections continue to exist: legacy collections (only) must continue to remain in `src/content/`, while new collections using a loader from the Content Layer API are forbidden in that folder. + diff --git a/examples/with-markdoc/src/content/config.ts b/examples/with-markdoc/src/content/config.ts new file mode 100644 index 0000000000000..79743326eac3a --- /dev/null +++ b/examples/with-markdoc/src/content/config.ts @@ -0,0 +1,5 @@ +import { defineCollection } from 'astro:content'; + +export const collections = { + docs: defineCollection({}) +}; diff --git a/packages/astro/e2e/fixtures/content-collections/src/content/config.ts b/packages/astro/e2e/fixtures/content-collections/src/content/config.ts new file mode 100644 index 0000000000000..81f62c975b821 --- /dev/null +++ b/packages/astro/e2e/fixtures/content-collections/src/content/config.ts @@ -0,0 +1,6 @@ +import { defineCollection } from "astro:content"; + + +const posts = defineCollection({}); + +export const collections = { posts }; diff --git a/packages/astro/src/content/data-store.ts b/packages/astro/src/content/data-store.ts index 57df3d521596c..82875b1ecdd29 100644 --- a/packages/astro/src/content/data-store.ts +++ b/packages/astro/src/content/data-store.ts @@ -34,6 +34,8 @@ export interface DataEntry = Record; + /** @deprecated */ + legacyId?: string; } /** diff --git a/packages/astro/src/content/loaders/glob.ts b/packages/astro/src/content/loaders/glob.ts index b47e63f20b7bc..154ae7d7b769a 100644 --- a/packages/astro/src/content/loaders/glob.ts +++ b/packages/astro/src/content/loaders/glob.ts @@ -35,7 +35,7 @@ function generateIdDefault({ entry, base, data }: GenerateIdOptions): string { if (data.slug) { return data.slug as string; } - const entryURL = new URL(entry, base); + const entryURL = new URL(encodeURI(entry), base); const { slug } = getContentEntryIdAndSlug({ entry: entryURL, contentDir: base, @@ -55,6 +55,15 @@ function checkPrefix(pattern: string | Array, prefix: string) { * Loads multiple entries, using a glob pattern to match files. * @param pattern A glob pattern to match files, relative to the content directory. */ +export function glob(globOptions: GlobOptions): Loader; +/** @private */ +export function glob( + globOptions: GlobOptions & { + /** @deprecated */ + _legacy?: true; + }, +): Loader; + export function glob(globOptions: GlobOptions): Loader { if (checkPrefix(globOptions.pattern, '../')) { throw new Error( @@ -80,19 +89,21 @@ export function glob(globOptions: GlobOptions): Loader { >(); const untouchedEntries = new Set(store.keys()); - + const isLegacy = (globOptions as any)._legacy; + // If global legacy collection handling flag is *not* enabled then this loader is used to emulate them instead + const emulateLegacyCollections = !config.legacy.collections; async function syncData(entry: string, base: URL, entryType?: ContentEntryType) { if (!entryType) { logger.warn(`No entry type found for ${entry}`); return; } - const fileUrl = new URL(entry, base); + const fileUrl = new URL(encodeURI(entry), base); const contents = await fs.readFile(fileUrl, 'utf-8').catch((err) => { logger.error(`Error reading ${entry}: ${err.message}`); return; }); - if (!contents) { + if (!contents && contents !== '') { logger.warn(`No contents found for ${entry}`); return; } @@ -103,6 +114,17 @@ export function glob(globOptions: GlobOptions): Loader { }); const id = generateId({ entry, base, data }); + let legacyId: string | undefined; + + if (isLegacy) { + const entryURL = new URL(encodeURI(entry), base); + const legacyOptions = getContentEntryIdAndSlug({ + entry: entryURL, + contentDir: base, + collection: '', + }); + legacyId = legacyOptions.id; + } untouchedEntries.delete(id); const existingEntry = store.get(id); @@ -132,6 +154,12 @@ export function glob(globOptions: GlobOptions): Loader { filePath, }); if (entryType.getRenderFunction) { + if (isLegacy && data.layout) { + logger.error( + `The Markdown "layout" field is not supported in content collections in Astro 5. Ignoring layout for ${JSON.stringify(entry)}. Enable "legacy.collections" if you need to use the layout field.`, + ); + } + let render = renderFunctionByContentType.get(entryType); if (!render) { render = await entryType.getRenderFunction(config); @@ -160,6 +188,7 @@ export function glob(globOptions: GlobOptions): Loader { digest, rendered, assetImports: rendered?.metadata?.imagePaths, + legacyId, }); // todo: add an explicit way to opt in to deferred rendering @@ -171,9 +200,10 @@ export function glob(globOptions: GlobOptions): Loader { filePath: relativePath, digest, deferredRender: true, + legacyId, }); } else { - store.set({ id, data: parsedData, body, filePath: relativePath, digest }); + store.set({ id, data: parsedData, body, filePath: relativePath, digest, legacyId }); } fileToIdMap.set(filePath, id); @@ -222,7 +252,7 @@ export function glob(globOptions: GlobOptions): Loader { if (isConfigFile(entry)) { return; } - if (isInContentDir(entry)) { + if (!emulateLegacyCollections && isInContentDir(entry)) { skippedFiles.push(entry); return; } @@ -240,7 +270,9 @@ export function glob(globOptions: GlobOptions): Loader { ? globOptions.pattern.join(', ') : globOptions.pattern; - logger.warn(`The glob() loader cannot be used for files in ${bold('src/content')}.`); + logger.warn( + `The glob() loader cannot be used for files in ${bold('src/content')} when legacy mode is enabled.`, + ); if (skipCount > 10) { logger.warn( `Skipped ${green(skippedFiles.length)} files that matched ${green(patternList)}.`, diff --git a/packages/astro/src/content/mutable-data-store.ts b/packages/astro/src/content/mutable-data-store.ts index de0591503c66e..18a7662ee6cad 100644 --- a/packages/astro/src/content/mutable-data-store.ts +++ b/packages/astro/src/content/mutable-data-store.ts @@ -4,7 +4,7 @@ import { Traverse } from 'neotraverse/modern'; import { imageSrcToImportId, importIdToSymbolName } from '../assets/utils/resolveImports.js'; import { AstroError, AstroErrorData } from '../core/errors/index.js'; import { IMAGE_IMPORT_PREFIX } from './consts.js'; -import { type DataEntry, ImmutableDataStore, type RenderedContent } from './data-store.js'; +import { type DataEntry, ImmutableDataStore } from './data-store.js'; import { contentModuleToId } from './utils.js'; const SAVE_DEBOUNCE_MS = 500; @@ -197,7 +197,17 @@ export default new Map([\n${lines.join(',\n')}]); entries: () => this.entries(collectionName), values: () => this.values(collectionName), keys: () => this.keys(collectionName), - set: ({ id: key, data, body, filePath, deferredRender, digest, rendered, assetImports }) => { + set: ({ + id: key, + data, + body, + filePath, + deferredRender, + digest, + rendered, + assetImports, + legacyId, + }) => { if (!key) { throw new Error(`ID must be a non-empty string`); } @@ -244,6 +254,9 @@ export default new Map([\n${lines.join(',\n')}]); if (rendered) { entry.rendered = rendered; } + if (legacyId) { + entry.legacyId = legacyId; + } if (deferredRender) { entry.deferredRender = deferredRender; if (filePath) { @@ -335,30 +348,7 @@ export interface DataStore { key: string, ) => DataEntry | undefined; entries: () => Array<[id: string, DataEntry]>; - set: >(opts: { - /** The ID of the entry. Must be unique per collection. */ - id: string; - /** The data to store. */ - data: TData; - /** The raw body of the content, if applicable. */ - body?: string; - /** The file path of the content, if applicable. Relative to the site root. */ - filePath?: string; - /** A content digest, to check if the content has changed. */ - digest?: number | string; - /** The rendered content, if applicable. */ - rendered?: RenderedContent; - /** - * If an entry is a deferred, its rendering phase is delegated to a virtual module during the runtime phase. - */ - deferredRender?: boolean; - /** - * Assets such as images to process during the build. These should be files on disk, with a path relative to filePath. - * Any values that use image() in the schema will already be added automatically. - * @internal - */ - assetImports?: Array; - }) => boolean; + set: >(opts: DataEntry) => boolean; values: () => Array; keys: () => Array; delete: (key: string) => void; diff --git a/packages/astro/src/content/runtime.ts b/packages/astro/src/content/runtime.ts index ed0d0e73c09ea..82dc3058e9a68 100644 --- a/packages/astro/src/content/runtime.ts +++ b/packages/astro/src/content/runtime.ts @@ -94,7 +94,7 @@ export function createGetCollection({ if (hasFilter && !filter(entry)) { continue; } - result.push(entry); + result.push(entry.legacyId ? emulateLegacyEntry(entry) : entry); } return result; } else { @@ -162,23 +162,31 @@ export function createGetEntryBySlug({ getEntryImport, getRenderEntryImport, collectionNames, + getEntry, }: { getEntryImport: GetEntryImport; getRenderEntryImport: GetEntryImport; collectionNames: Set; + getEntry: ReturnType; }) { return async function getEntryBySlug(collection: string, slug: string) { const store = await globalDataStore.get(); if (!collectionNames.has(collection)) { if (store.hasCollection(collection)) { + const entry = await getEntry(collection, slug); + if (entry && 'slug' in entry) { + return entry; + } throw new AstroError({ ...AstroErrorData.GetEntryDeprecationError, message: AstroErrorData.GetEntryDeprecationError.message(collection, 'getEntryBySlug'), }); } // eslint-disable-next-line no-console - console.warn(`The collection ${JSON.stringify(collection)} does not exist.`); + console.warn( + `The collection ${JSON.stringify(collection)} does not exist. Please ensure it is defined in your content config.`, + ); return undefined; } @@ -207,22 +215,23 @@ export function createGetEntryBySlug({ export function createGetDataEntryById({ getEntryImport, collectionNames, + getEntry, }: { getEntryImport: GetEntryImport; collectionNames: Set; + getEntry: ReturnType; }) { return async function getDataEntryById(collection: string, id: string) { const store = await globalDataStore.get(); if (!collectionNames.has(collection)) { if (store.hasCollection(collection)) { - throw new AstroError({ - ...AstroErrorData.GetEntryDeprecationError, - message: AstroErrorData.GetEntryDeprecationError.message(collection, 'getDataEntryById'), - }); + return getEntry(collection, id); } // eslint-disable-next-line no-console - console.warn(`The collection ${JSON.stringify(collection)} does not exist.`); + console.warn( + `The collection ${JSON.stringify(collection)} does not exist. Please ensure it is defined in your content config.`, + ); return undefined; } @@ -256,6 +265,21 @@ type DataEntryResult = { type EntryLookupObject = { collection: string; id: string } | { collection: string; slug: string }; +function emulateLegacyEntry(entry: DataEntry) { + // Define this first so it's in scope for the render function + const legacyEntry = { + ...entry, + id: entry.legacyId!, + slug: entry.id, + }; + delete legacyEntry.legacyId; + return { + ...legacyEntry, + // Define separately so the render function isn't included in the object passed to `renderEntry()` + render: () => renderEntry(legacyEntry), + }; +} + export function createGetEntry({ getEntryImport, getRenderEntryImport, @@ -303,6 +327,9 @@ export function createGetEntry({ // @ts-expect-error virtual module const { default: imageAssetMap } = await import('astro:asset-imports'); entry.data = updateImageReferencesInData(entry.data, entry.filePath, imageAssetMap); + if (entry.legacyId) { + return { ...emulateLegacyEntry(entry), collection } as ContentEntryResult; + } return { ...entry, collection, @@ -311,7 +338,9 @@ export function createGetEntry({ if (!collectionNames.has(collection)) { // eslint-disable-next-line no-console - console.warn(`The collection ${JSON.stringify(collection)} does not exist.`); + console.warn( + `The collection ${JSON.stringify(collection)} does not exist. Please ensure it is defined in your content config.`, + ); return undefined; } @@ -433,13 +462,16 @@ function updateImageReferencesInData>( } export async function renderEntry( - entry: DataEntry | { render: () => Promise<{ Content: AstroComponentFactory }> }, + entry: + | DataEntry + | { render: () => Promise<{ Content: AstroComponentFactory }> } + | (DataEntry & { render: () => Promise<{ Content: AstroComponentFactory }> }), ) { if (!entry) { throw new AstroError(AstroErrorData.RenderUndefinedEntryError); } - if ('render' in entry) { + if ('render' in entry && !('legacyId' in entry)) { // This is an old content collection entry, so we use its render method return entry.render(); } @@ -619,6 +651,7 @@ export function createReference({ lookupMap }: { lookupMap: ContentLookupMap }) } return { id: lookup, collection }; } + // If the collection is not in the lookup map or store, it may be a content layer collection and the store may not yet be populated. // If the store has 0 or 1 entries it probably means that the entries have not yet been loaded. // The store may have a single entry even if the collections have not loaded, because the top-level metadata collection is generated early. @@ -627,7 +660,6 @@ export function createReference({ lookupMap }: { lookupMap: ContentLookupMap }) // later in the pipeline when we do have access to the store. return { id: lookup, collection }; } - const { type, entries } = lookupMap[collection]; const entry = entries[lookup]; diff --git a/packages/astro/src/content/types-generator.ts b/packages/astro/src/content/types-generator.ts index 0a14fe8ee3ad3..7ed44bec8d5d7 100644 --- a/packages/astro/src/content/types-generator.ts +++ b/packages/astro/src/content/types-generator.ts @@ -501,7 +501,10 @@ async function writeContentFiles({ contentTypesStr += `};\n`; break; case CONTENT_LAYER_TYPE: - dataTypesStr += `${collectionKey}: Record;\n`; + const legacyTypes = (collectionConfig as any)?._legacy + ? 'render(): Render[".md"];\n slug: string;\n body: string;\n' + : 'body?: string;\n'; + dataTypesStr += `${collectionKey}: Record;\n`; break; case 'data': if (collectionEntryKeys.length === 0) { diff --git a/packages/astro/src/content/utils.ts b/packages/astro/src/content/utils.ts index 7b5f74a6dd600..164e357deef84 100644 --- a/packages/astro/src/content/utils.ts +++ b/packages/astro/src/content/utils.ts @@ -10,6 +10,7 @@ import { z } from 'zod'; import { AstroError, AstroErrorData, MarkdownError, errorMap } from '../core/errors/index.js'; import { isYAMLException } from '../core/errors/utils.js'; import type { Logger } from '../core/logger/core.js'; +import { appendForwardSlash } from '../core/path.js'; import { normalizePath } from '../core/viteUtils.js'; import type { AstroSettings } from '../types/astro.js'; import type { AstroConfig } from '../types/public/config.js'; @@ -22,7 +23,9 @@ import { IMAGE_IMPORT_PREFIX, PROPAGATED_ASSET_FLAG, } from './consts.js'; +import { glob } from './loaders/glob.js'; import { createImage } from './runtime-assets.js'; +import { green } from 'kleur/colors'; /** * Amap from a collection + slug to the local file path. * This is used internally to resolve entry imports when using `getEntry()`. @@ -114,6 +117,8 @@ const collectionConfigParser = z.union([ render: z.function(z.tuple([z.any()], z.unknown())).optional(), }), ]), + /** deprecated */ + _legacy: z.boolean().optional(), }), ]); @@ -162,7 +167,7 @@ export async function getEntryDataAndImages< pluginContext?: PluginContext, ): Promise<{ data: TOutputData; imageImports: Array }> { let data: TOutputData; - if (collectionConfig.type === 'data' || collectionConfig.type === CONTENT_LAYER_TYPE) { + if (collectionConfig.type === 'data') { data = entry.unvalidatedData as TOutputData; } else { const { slug, ...unvalidatedData } = entry.unvalidatedData; @@ -536,6 +541,97 @@ async function loadContentConfig({ } } +export async function autogenerateCollections({ + config, + settings, + fs, +}: { + config?: ContentConfig; + settings: AstroSettings; + fs: typeof fsMod; +}): Promise { + if (settings.config.legacy.collections) { + return config; + } + const contentDir = new URL('./content/', settings.config.srcDir); + + const collections: Record = config?.collections ?? {}; + + const contentExts = getContentEntryExts(settings); + const dataExts = getDataEntryExts(settings); + + const contentPattern = globWithUnderscoresIgnored('', contentExts); + const dataPattern = globWithUnderscoresIgnored('', dataExts); + let usesContentLayer = false; + for (const collectionName of Object.keys(collections)) { + if (collections[collectionName]?.type === 'content_layer') { + usesContentLayer = true; + // This is already a content layer, skip + continue; + } + + const isDataCollection = collections[collectionName]?.type === 'data'; + const base = new URL(`${collectionName}/`, contentDir); + // Only "content" collections need special legacy handling + const _legacy = !isDataCollection || undefined; + collections[collectionName] = { + ...collections[collectionName], + type: 'content_layer', + _legacy, + loader: glob({ + base, + pattern: isDataCollection ? dataPattern : contentPattern, + _legacy, + // Legacy data collections IDs aren't slugified + generateId: isDataCollection + ? ({ entry }) => + getDataEntryId({ + entry: new URL(entry, base), + collection: collectionName, + contentDir, + }) + : undefined, + + // Zod weirdness has trouble with typing the args to the load function + }) as any, + }; + } + if (!usesContentLayer) { + // If the user hasn't defined any collections using the content layer, we'll try and help out by checking for + // any orphaned folders in the content directory and creating collections for them. + const orphanedCollections = []; + for (const entry of await fs.promises.readdir(contentDir, { withFileTypes: true })) { + const collectionName = entry.name; + if (['_', '.'].includes(collectionName.at(0) ?? '')) { + continue; + } + if (entry.isDirectory() && !(collectionName in collections)) { + orphanedCollections.push(collectionName); + const base = new URL(`${collectionName}/`, contentDir); + collections[collectionName] = { + type: 'content_layer', + loader: glob({ + base, + pattern: contentPattern, + _legacy: true, + }) as any, + }; + } + } + if (orphanedCollections.length > 0) { + console.warn( + ` +Auto-generating collections for folders in "src/content/" that are not defined as collections. +This is deprecated, so you should define these collections yourself in "src/content/config.ts". +The following collections have been auto-generated: ${orphanedCollections + .map((name) => green(name)) + .join(', ')}\n`, + ); + } + } + return { ...config, collections }; +} + export async function reloadContentConfigObserver({ observer = globalContentConfigObserver, ...loadContentConfigOpts @@ -547,7 +643,13 @@ export async function reloadContentConfigObserver({ }) { observer.set({ status: 'loading' }); try { - const config = await loadContentConfig(loadContentConfigOpts); + let config = await loadContentConfig(loadContentConfigOpts); + + config = await autogenerateCollections({ + config, + ...loadContentConfigOpts, + }); + if (config) { observer.set({ status: 'loaded', config }); } else { @@ -685,6 +787,16 @@ export function hasAssetPropagationFlag(id: string): boolean { } } +export function globWithUnderscoresIgnored(relContentDir: string, exts: string[]): string[] { + const extGlob = getExtGlob(exts); + const contentDir = relContentDir.length > 0 ? appendForwardSlash(relContentDir) : relContentDir; + return [ + `${contentDir}**/*${extGlob}`, + `!${contentDir}**/_*/**/*${extGlob}`, + `!${contentDir}**/_*${extGlob}`, + ]; +} + /** * Convert a platform path to a posix path. */ diff --git a/packages/astro/src/content/vite-plugin-content-virtual-mod.ts b/packages/astro/src/content/vite-plugin-content-virtual-mod.ts index 4fec03d7cfe79..ca601e0383fca 100644 --- a/packages/astro/src/content/vite-plugin-content-virtual-mod.ts +++ b/packages/astro/src/content/vite-plugin-content-virtual-mod.ts @@ -6,7 +6,6 @@ import glob from 'fast-glob'; import pLimit from 'p-limit'; import type { Plugin } from 'vite'; import { AstroError, AstroErrorData } from '../core/errors/index.js'; -import { appendForwardSlash } from '../core/path.js'; import { rootRelativePath } from '../core/viteUtils.js'; import type { AstroSettings } from '../types/astro.js'; import type { AstroPluginMetadata } from '../vite-plugin-astro/index.js'; @@ -38,6 +37,7 @@ import { getEntrySlug, getEntryType, getExtGlob, + globWithUnderscoresIgnored, isDeferredModule, } from './utils.js'; @@ -98,10 +98,12 @@ export function astroContentVirtualModPlugin({ }, async load(id, args) { if (id === RESOLVED_VIRTUAL_MODULE_ID) { - const lookupMap = await generateLookupMap({ - settings, - fs, - }); + const lookupMap = settings.config.legacy.collections + ? await generateLookupMap({ + settings, + fs, + }) + : {}; const isClient = !args?.ssr; const code = await generateContentEntryFile({ settings, @@ -201,26 +203,28 @@ export async function generateContentEntryFile({ const contentPaths = getContentPaths(settings.config); const relContentDir = rootRelativePath(settings.config.root, contentPaths.contentDir); - let contentEntryGlobResult: string; - let dataEntryGlobResult: string; - let renderEntryGlobResult: string; - const contentEntryConfigByExt = getEntryConfigByExtMap(settings.contentEntryTypes); - const contentEntryExts = [...contentEntryConfigByExt.keys()]; - const dataEntryExts = getDataEntryExts(settings); - const createGlob = (value: string[], flag: string) => - `import.meta.glob(${JSON.stringify(value)}, { query: { ${flag}: true } })`; - contentEntryGlobResult = createGlob( - globWithUnderscoresIgnored(relContentDir, contentEntryExts), - CONTENT_FLAG, - ); - dataEntryGlobResult = createGlob( - globWithUnderscoresIgnored(relContentDir, dataEntryExts), - DATA_FLAG, - ); - renderEntryGlobResult = createGlob( - globWithUnderscoresIgnored(relContentDir, contentEntryExts), - CONTENT_RENDER_FLAG, - ); + let contentEntryGlobResult = '""'; + let dataEntryGlobResult = '""'; + let renderEntryGlobResult = '""'; + if (settings.config.legacy.collections) { + const contentEntryConfigByExt = getEntryConfigByExtMap(settings.contentEntryTypes); + const contentEntryExts = [...contentEntryConfigByExt.keys()]; + const dataEntryExts = getDataEntryExts(settings); + const createGlob = (value: string[], flag: string) => + `import.meta.glob(${JSON.stringify(value)}, { query: { ${flag}: true } })`; + contentEntryGlobResult = createGlob( + globWithUnderscoresIgnored(relContentDir, contentEntryExts), + CONTENT_FLAG, + ); + dataEntryGlobResult = createGlob( + globWithUnderscoresIgnored(relContentDir, dataEntryExts), + DATA_FLAG, + ); + renderEntryGlobResult = createGlob( + globWithUnderscoresIgnored(relContentDir, contentEntryExts), + CONTENT_RENDER_FLAG, + ); + } let virtualModContents: string; if (isClient) { @@ -354,16 +358,6 @@ export async function generateLookupMap({ return lookupMap; } -function globWithUnderscoresIgnored(relContentDir: string, exts: string[]): string[] { - const extGlob = getExtGlob(exts); - const contentDir = appendForwardSlash(relContentDir); - return [ - `${contentDir}**/*${extGlob}`, - `!${contentDir}**/_*/**/*${extGlob}`, - `!${contentDir}**/_*${extGlob}`, - ]; -} - const UnexpectedLookupMapError = new AstroError({ ...AstroErrorData.UnknownContentCollectionError, message: `Unexpected error while parsing content entry IDs and slugs.`, diff --git a/packages/astro/src/core/config/schema.ts b/packages/astro/src/core/config/schema.ts index cec3a291f3403..fc201841484cd 100644 --- a/packages/astro/src/core/config/schema.ts +++ b/packages/astro/src/core/config/schema.ts @@ -80,7 +80,9 @@ export const ASTRO_CONFIG_DEFAULTS = { integrations: [], markdown: markdownConfigDefaults, vite: {}, - legacy: {}, + legacy: { + collections: false, + }, redirects: {}, security: { checkOrigin: true, @@ -522,7 +524,14 @@ export const AstroConfigSchema = z.object({ `Invalid or outdated experimental feature.\nCheck for incorrect spelling or outdated Astro version.\nSee https://docs.astro.build/en/reference/configuration-reference/#experimental-flags for a list of all current experiments.`, ) .default({}), - legacy: z.object({}).default({}), + legacy: z + .object({ + collections: z + .boolean() + .optional() + .default(ASTRO_CONFIG_DEFAULTS.legacy.collections), + }) + .default({}), }); export type AstroConfigType = z.infer; diff --git a/packages/astro/src/types/public/config.ts b/packages/astro/src/types/public/config.ts index 97a6a56d39f7d..fda779bdcb09d 100644 --- a/packages/astro/src/types/public/config.ts +++ b/packages/astro/src/types/public/config.ts @@ -1541,7 +1541,49 @@ export interface AstroUserConfig { * These flags allow you to opt in to some deprecated or otherwise outdated behavior of Astro * in the latest version, so that you can continue to upgrade and take advantage of new Astro releases. */ - legacy?: object; + legacy?: { + /** + * @docs + * @name legacy.collections + * @type {boolean} + * @default `false` + * @version 5.0.0 + * @description + * Enable legacy behavior for content collections. + * + * ```js + * // astro.config.mjs + * import { defineConfig } from 'astro/config'; + * export default defineConfig({ + * legacy: { + * collections: true + * } + * }); + * ``` + * + * If enabled, `data` and `content` collections (only) are handled using the legacy content collections implementation. Collections with a `loader` (only) will continue to use the Content Layer API instead. Both kinds of collections may exist in the same project, each using their respective implementations. + * + * The following limitations continue to exist: + * + * - Any legacy (`type: 'content'` or `type: 'data'`) collections must continue to be located in the `src/content/` directory. + * - These legacy collections will not be transformed to implicitly use the `glob()` loader, and will instead be handled by legacy code. + * - Collections using the Content Layer API (with a `loader` defined) are forbidden in `src/content/`, but may exist anywhere else in your project. + * + * When you are ready to remove this flag and migrate to the new Content Layer API for your legacy collections, you must define a collection for any directories in `src/content/` that you want to continue to use as a collection. It is sufficient to declare an empty collection, and Astro will implicitly generate an appropriate definition for your legacy collections: + * + * ```js + * // src/content/config.ts + * import { defineCollection, z } from 'astro:content'; + * + * const blog = defineCollection({ }) + * + * export const collections = { blog }; + * ``` + * + + */ + collections?: boolean; + }; /** * @docs diff --git a/packages/astro/templates/content/module.mjs b/packages/astro/templates/content/module.mjs index 2d395db49541a..7947574c341c2 100644 --- a/packages/astro/templates/content/module.mjs +++ b/packages/astro/templates/content/module.mjs @@ -58,21 +58,23 @@ export const getCollection = createGetCollection({ cacheEntriesByCollection, }); +export const getEntry = createGetEntry({ + getEntryImport: createGlobLookup(collectionToEntryMap), + getRenderEntryImport: createGlobLookup(collectionToRenderEntryMap), + collectionNames, +}); + export const getEntryBySlug = createGetEntryBySlug({ getEntryImport: createGlobLookup(contentCollectionToEntryMap), getRenderEntryImport: createGlobLookup(collectionToRenderEntryMap), collectionNames, + getEntry, }); export const getDataEntryById = createGetDataEntryById({ getEntryImport: createGlobLookup(dataCollectionToEntryMap), collectionNames, -}); - -export const getEntry = createGetEntry({ - getEntryImport: createGlobLookup(collectionToEntryMap), - getRenderEntryImport: createGlobLookup(collectionToRenderEntryMap), - collectionNames, + getEntry, }); export const getEntries = createGetEntries(getEntry); diff --git a/packages/astro/test/astro-sync.test.js b/packages/astro/test/astro-sync.test.js index c8a2de49c5acf..d6b343616e2d3 100644 --- a/packages/astro/test/astro-sync.test.js +++ b/packages/astro/test/astro-sync.test.js @@ -142,20 +142,24 @@ describe('astro sync', () => { '.astro/content.d.ts', `"blog": Record; - render(): Render[".md"]; -}>;`, + rendered?: RenderedContent; + filePath?: string;`, 'Types file does not include empty collection type', ); fixture.thenFileContentShouldInclude( '.astro/content.d.ts', `"blogMeta": Record; + rendered?: RenderedContent; + filePath?: string; }>;`, 'Types file does not include empty collection type', ); diff --git a/packages/astro/test/content-collection-references.test.js b/packages/astro/test/content-collection-references.test.js index 7119e0f0460c9..8e5510cebf03f 100644 --- a/packages/astro/test/content-collection-references.test.js +++ b/packages/astro/test/content-collection-references.test.js @@ -16,9 +16,12 @@ describe('Content Collections - references', () => { describe(mode, () => { before(async () => { if (mode === 'prod') { - await fixture.build(); + await fixture.build({ force: true }); } else if (mode === 'dev') { - devServer = await fixture.startDevServer(); + devServer = await fixture.startDevServer({ force: true }); + await fixture.onNextDataStoreChange(1000).catch(() => { + // Ignore timeout, because it may have saved before we get here. + }); } }); @@ -65,13 +68,9 @@ describe('Content Collections - references', () => { it('Returns `author` data', () => { const { author } = json; assert.ok(author.hasOwnProperty('data')); - assert.deepEqual(author, { - id: 'nate-moore', - collection: 'authors', - data: { - name: 'Nate Something Moore', - twitter: 'https://twitter.com/n_moore', - }, + assert.deepEqual(author.data, { + name: 'Nate Something Moore', + twitter: 'https://twitter.com/n_moore', }); }); @@ -82,20 +81,23 @@ describe('Content Collections - references', () => { ...meta, body: fixLineEndings(body).trim(), })); - assert.deepEqual(topLevelInfo, [ - { - id: 'related-1.md', - slug: 'related-1', - body: '# Related post 1\n\nThis is related to the welcome post.', - collection: 'blog', - }, - { - id: 'related-2.md', - slug: 'related-2', - body: '# Related post 2\n\nThis is related to the welcome post.', - collection: 'blog', - }, - ]); + assert.deepEqual( + topLevelInfo.map(({ id, slug, body, collection }) => ({ id, slug, body, collection })), + [ + { + id: 'related-1.md', + slug: 'related-1', + body: '# Related post 1\n\nThis is related to the welcome post.', + collection: 'blog', + }, + { + id: 'related-2.md', + slug: 'related-2', + body: '# Related post 2\n\nThis is related to the welcome post.', + collection: 'blog', + }, + ], + ); const postData = relatedPosts.map(({ data }) => data); assert.deepEqual(postData, [ { diff --git a/packages/astro/test/content-collections.test.js b/packages/astro/test/content-collections.test.js index 5bb3736b75d5f..19a47f7e4cc65 100644 --- a/packages/astro/test/content-collections.test.js +++ b/packages/astro/test/content-collections.test.js @@ -11,7 +11,7 @@ describe('Content Collections', () => { let fixture; before(async () => { fixture = await loadFixture({ root: './fixtures/content-collections/' }); - await fixture.build(); + await fixture.build({ force: true }); }); describe('Collection', () => { @@ -26,13 +26,16 @@ describe('Content Collections', () => { assert.equal(Array.isArray(json.withoutConfig), true); const ids = json.withoutConfig.map((item) => item.id); - assert.deepEqual(ids, [ - 'columbia.md', - 'endeavour.md', - 'enterprise.md', - // Spaces allowed in IDs - 'promo/launch week.mdx', - ]); + assert.deepEqual( + ids.sort(), + [ + 'columbia.md', + 'endeavour.md', + 'enterprise.md', + // Spaces allowed in IDs + 'promo/launch week.mdx', + ].sort(), + ); }); it('Handles spaces in `without config` slugs', async () => { @@ -40,13 +43,16 @@ describe('Content Collections', () => { assert.equal(Array.isArray(json.withoutConfig), true); const slugs = json.withoutConfig.map((item) => item.slug); - assert.deepEqual(slugs, [ - 'columbia', - 'endeavour', - 'enterprise', - // "launch week.mdx" is converted to "launch-week.mdx" - 'promo/launch-week', - ]); + assert.deepEqual( + slugs.sort(), + [ + 'columbia', + 'endeavour', + 'enterprise', + // "launch week.mdx" is converted to "launch-week.mdx" + 'promo/launch-week', + ].sort(), + ); }); it('Returns `with schema` collection', async () => { @@ -55,20 +61,20 @@ describe('Content Collections', () => { const ids = json.withSchemaConfig.map((item) => item.id); const publishedDates = json.withSchemaConfig.map((item) => item.data.publishedAt); - assert.deepEqual(ids, ['four%.md', 'one.md', 'three.md', 'two.md']); + assert.deepEqual(ids.sort(), ['four%.md', 'one.md', 'three.md', 'two.md'].sort()); assert.equal( publishedDates.every((date) => date instanceof Date), true, 'Not all publishedAt dates are Date objects', ); assert.deepEqual( - publishedDates.map((date) => date.toISOString()), + publishedDates.map((date) => date.toISOString()).sort(), [ '2021-01-01T00:00:00.000Z', '2021-01-01T00:00:00.000Z', '2021-01-03T00:00:00.000Z', '2021-01-02T00:00:00.000Z', - ], + ].sort(), ); }); @@ -77,7 +83,7 @@ describe('Content Collections', () => { assert.equal(Array.isArray(json.withSlugConfig), true); const slugs = json.withSlugConfig.map((item) => item.slug); - assert.deepEqual(slugs, ['fancy-one', 'excellent-three', 'interesting-two']); + assert.deepEqual(slugs.sort(), ['fancy-one', 'excellent-three', 'interesting-two'].sort()); }); it('Returns `with union schema` collection', async () => { @@ -102,10 +108,12 @@ describe('Content Collections', () => { it('Handles symlinked content', async () => { assert.ok(json.hasOwnProperty('withSymlinkedContent')); assert.equal(Array.isArray(json.withSymlinkedContent), true); - const ids = json.withSymlinkedContent.map((item) => item.id); - assert.deepEqual(ids, ['first.md', 'second.md', 'third.md']); - assert.equal(json.withSymlinkedContent[0].data.title, 'First Blog'); + assert.deepEqual(ids.sort(), ['first.md', 'second.md', 'third.md'].sort()); + assert.equal( + json.withSymlinkedContent.find(({ id }) => id === 'first.md').data.title, + 'First Blog', + ); }); it('Handles symlinked data', async () => { @@ -137,11 +145,6 @@ describe('Content Collections', () => { json = devalue.parse(rawJson); }); - it('Returns `without config` collection entry', async () => { - assert.ok(json.hasOwnProperty('columbiaWithoutConfig')); - assert.equal(json.columbiaWithoutConfig.id, 'columbia.md'); - }); - it('Returns `with schema` collection entry', async () => { assert.ok(json.hasOwnProperty('oneWithSchemaConfig')); assert.equal(json.oneWithSchemaConfig.id, 'one.md'); @@ -212,7 +215,7 @@ describe('Content Collections', () => { before(async () => { fixture = await loadFixture({ root: './fixtures/content-static-paths-integration/' }); - await fixture.build(); + await fixture.build({ force: true }); }); it('Generates expected pages', async () => { @@ -246,7 +249,7 @@ describe('Content Collections', () => { const fixture = await loadFixture({ root: './fixtures/content with spaces in folder name/' }); let error = null; try { - await fixture.build(); + await fixture.build({ force: true }); } catch (e) { error = e.message; } @@ -260,7 +263,7 @@ describe('Content Collections', () => { }); let error; try { - await fixture.build(); + await fixture.build({ force: true }); } catch (e) { error = e.message; } @@ -274,7 +277,7 @@ describe('Content Collections', () => { }); let error; try { - await fixture.build(); + await fixture.build({ force: true }); } catch (e) { error = e.message; } @@ -289,7 +292,7 @@ describe('Content Collections', () => { }); let error; try { - await fixture.build(); + await fixture.build({ force: true }); } catch (e) { error = e.message; } @@ -304,7 +307,7 @@ describe('Content Collections', () => { }); let error; try { - await fixture.build(); + await fixture.build({ force: true }); } catch (e) { error = e.message; } @@ -330,7 +333,7 @@ describe('Content Collections', () => { plugins: [preventNodeBuiltinDependencyPlugin()], }, }); - await fixture.build(); + await fixture.build({ force: true }); app = await fixture.loadTestAdapterApp(); }); @@ -373,7 +376,7 @@ describe('Content Collections', () => { fixture = await loadFixture({ root: './fixtures/content-collections-base/', }); - await fixture.build(); + await fixture.build({ force: true }); }); it('Includes base in links', async () => { @@ -396,7 +399,7 @@ describe('Content Collections', () => { fixture = await loadFixture({ root: './fixtures/content-collections-mutation/', }); - await fixture.build(); + await fixture.build({ force: true }); }); it('Does not mutate cached collection', async () => { diff --git a/packages/astro/test/data-collections.test.js b/packages/astro/test/data-collections.test.js index 68f15a773370e..ef58e989e1325 100644 --- a/packages/astro/test/data-collections.test.js +++ b/packages/astro/test/data-collections.test.js @@ -9,7 +9,7 @@ describe('Content Collections - data collections', () => { let fixture; before(async () => { fixture = await loadFixture({ root: './fixtures/data-collections/' }); - await fixture.build(); + await fixture.build({ force: true }); }); describe('Authors Collection', () => { @@ -26,19 +26,25 @@ describe('Content Collections - data collections', () => { it('Generates correct ids', async () => { const ids = json.map((item) => item.id).sort(); - assert.deepEqual(ids, ['Ben Holmes', 'Fred K Schott', 'Nate Moore']); + assert.deepEqual(ids.sort(), ['Ben Holmes', 'Fred K Schott', 'Nate Moore'].sort()); }); it('Generates correct data', async () => { const names = json.map((item) => item.data.name); - assert.deepEqual(names, ['Ben J Holmes', 'Fred K Schott', 'Nate Something Moore']); + assert.deepEqual( + names.sort(), + ['Ben J Holmes', 'Fred K Schott', 'Nate Something Moore'].sort(), + ); const twitterUrls = json.map((item) => item.data.twitter); - assert.deepEqual(twitterUrls, [ - 'https://twitter.com/bholmesdev', - 'https://twitter.com/FredKSchott', - 'https://twitter.com/n_moore', - ]); + assert.deepEqual( + twitterUrls.sort(), + [ + 'https://twitter.com/bholmesdev', + 'https://twitter.com/FredKSchott', + 'https://twitter.com/n_moore', + ].sort(), + ); }); }); diff --git a/packages/astro/test/fixtures/content-collections-base/astro.config.mjs b/packages/astro/test/fixtures/content-collections-base/astro.config.mjs index 5f168d340f35c..193fbdc6651ac 100644 --- a/packages/astro/test/fixtures/content-collections-base/astro.config.mjs +++ b/packages/astro/test/fixtures/content-collections-base/astro.config.mjs @@ -9,5 +9,5 @@ export default defineConfig({ build: { assetsInlineLimit: 0 } - } + }, }); diff --git a/packages/astro/test/fixtures/content-collections/astro.config.mjs b/packages/astro/test/fixtures/content-collections/astro.config.mjs index 911cb3a998818..38ee7b8b38dab 100644 --- a/packages/astro/test/fixtures/content-collections/astro.config.mjs +++ b/packages/astro/test/fixtures/content-collections/astro.config.mjs @@ -5,6 +5,7 @@ import { defineConfig } from 'astro/config'; export default defineConfig({ integrations: [mdx()], experimental: { - contentIntellisense: true + contentIntellisense: true, + } }); diff --git a/packages/astro/test/fixtures/content-collections/src/content/.should-also-ignore/enterprise.md b/packages/astro/test/fixtures/content-collections/src/content/.should-also-ignore/enterprise.md new file mode 100644 index 0000000000000..3131e6d5df3ab --- /dev/null +++ b/packages/astro/test/fixtures/content-collections/src/content/.should-also-ignore/enterprise.md @@ -0,0 +1,14 @@ +--- +title: 'Enterprise' +description: 'Learn about the Enterprise NASA space shuttle.' +publishedDate: 'Tue Jun 08 2021 00:00:00 GMT-0400 (Eastern Daylight Time)' +tags: [space, 70s] +--- + +**Source:** [Wikipedia](https://en.wikipedia.org/wiki/Space_Shuttle_Enterprise) + +Space Shuttle Enterprise (Orbiter Vehicle Designation: OV-101) was the first orbiter of the Space Shuttle system. Rolled out on September 17, 1976, it was built for NASA as part of the Space Shuttle program to perform atmospheric test flights after being launched from a modified Boeing 747. It was constructed without engines or a functional heat shield. As a result, it was not capable of spaceflight. + +Originally, Enterprise had been intended to be refitted for orbital flight to become the second space-rated orbiter in service. However, during the construction of Space Shuttle Columbia, details of the final design changed, making it simpler and less costly to build Challenger around a body frame that had been built as a test article. Similarly, Enterprise was considered for refit to replace Challenger after the latter was destroyed, but Endeavour was built from structural spares instead. + +Enterprise was restored and placed on display in 2003 at the Smithsonian's new Steven F. Udvar-Hazy Center in Virginia. Following the retirement of the Space Shuttle fleet, Discovery replaced Enterprise at the Udvar-Hazy Center, and Enterprise was transferred to the Intrepid Sea, Air & Space Museum in New York City, where it has been on display since July 2012. diff --git a/packages/astro/test/fixtures/content-collections/src/content/_should-ignore/enterprise.md b/packages/astro/test/fixtures/content-collections/src/content/_should-ignore/enterprise.md new file mode 100644 index 0000000000000..3131e6d5df3ab --- /dev/null +++ b/packages/astro/test/fixtures/content-collections/src/content/_should-ignore/enterprise.md @@ -0,0 +1,14 @@ +--- +title: 'Enterprise' +description: 'Learn about the Enterprise NASA space shuttle.' +publishedDate: 'Tue Jun 08 2021 00:00:00 GMT-0400 (Eastern Daylight Time)' +tags: [space, 70s] +--- + +**Source:** [Wikipedia](https://en.wikipedia.org/wiki/Space_Shuttle_Enterprise) + +Space Shuttle Enterprise (Orbiter Vehicle Designation: OV-101) was the first orbiter of the Space Shuttle system. Rolled out on September 17, 1976, it was built for NASA as part of the Space Shuttle program to perform atmospheric test flights after being launched from a modified Boeing 747. It was constructed without engines or a functional heat shield. As a result, it was not capable of spaceflight. + +Originally, Enterprise had been intended to be refitted for orbital flight to become the second space-rated orbiter in service. However, during the construction of Space Shuttle Columbia, details of the final design changed, making it simpler and less costly to build Challenger around a body frame that had been built as a test article. Similarly, Enterprise was considered for refit to replace Challenger after the latter was destroyed, but Endeavour was built from structural spares instead. + +Enterprise was restored and placed on display in 2003 at the Smithsonian's new Steven F. Udvar-Hazy Center in Virginia. Following the retirement of the Space Shuttle fleet, Discovery replaced Enterprise at the Udvar-Hazy Center, and Enterprise was transferred to the Intrepid Sea, Air & Space Museum in New York City, where it has been on display since July 2012. diff --git a/packages/astro/test/fixtures/content-collections/src/content/config.ts b/packages/astro/test/fixtures/content-collections/src/content/config.ts index 23908e32cb6d8..0c846d2a71ec2 100644 --- a/packages/astro/test/fixtures/content-collections/src/content/config.ts +++ b/packages/astro/test/fixtures/content-collections/src/content/config.ts @@ -52,6 +52,8 @@ const withSymlinkedContent = defineCollection({ }), }); +const withScripts = defineCollection({}); + export const collections = { 'with-data': withData, 'with-custom-slugs': withCustomSlugs, @@ -59,4 +61,5 @@ export const collections = { 'with-union-schema': withUnionSchema, 'with-symlinked-data': withSymlinkedData, 'with-symlinked-content': withSymlinkedContent, + 'with-scripts': withScripts, }; diff --git a/packages/astro/test/fixtures/content-collections/src/pages/collections.json.js b/packages/astro/test/fixtures/content-collections/src/pages/collections.json.js index 67bafdb93e1d7..0694cfaeca993 100644 --- a/packages/astro/test/fixtures/content-collections/src/pages/collections.json.js +++ b/packages/astro/test/fixtures/content-collections/src/pages/collections.json.js @@ -3,14 +3,14 @@ import * as devalue from 'devalue'; import { stripAllRenderFn } from '../utils.js'; export async function GET() { - const withoutConfig = stripAllRenderFn(await getCollection('without-config')); const withSchemaConfig = stripAllRenderFn(await getCollection('with-schema-config')); const withSlugConfig = stripAllRenderFn(await getCollection('with-custom-slugs')); const withUnionSchema = stripAllRenderFn(await getCollection('with-union-schema')); const withSymlinkedContent = stripAllRenderFn(await getCollection('with-symlinked-content')); const withSymlinkedData = stripAllRenderFn(await getCollection('with-symlinked-data')); + const withoutConfig = stripAllRenderFn(await getCollection('without-config')); return new Response( - devalue.stringify({ withoutConfig, withSchemaConfig, withSlugConfig, withUnionSchema, withSymlinkedContent, withSymlinkedData }), + devalue.stringify({ withSchemaConfig, withSlugConfig, withUnionSchema, withSymlinkedContent, withSymlinkedData, withoutConfig }), ); } diff --git a/packages/astro/test/fixtures/content-collections/src/pages/entries.json.js b/packages/astro/test/fixtures/content-collections/src/pages/entries.json.js index a05a9138b1d85..06484bcb25eda 100644 --- a/packages/astro/test/fixtures/content-collections/src/pages/entries.json.js +++ b/packages/astro/test/fixtures/content-collections/src/pages/entries.json.js @@ -3,7 +3,6 @@ import * as devalue from 'devalue'; import { stripRenderFn } from '../utils.js'; export async function GET() { - const columbiaWithoutConfig = stripRenderFn(await getEntryBySlug('without-config', 'columbia')); const oneWithSchemaConfig = stripRenderFn(await getEntryBySlug('with-schema-config', 'one')); const twoWithSlugConfig = stripRenderFn( await getEntryBySlug('with-custom-slugs', 'interesting-two') @@ -12,7 +11,6 @@ export async function GET() { return new Response( devalue.stringify({ - columbiaWithoutConfig, oneWithSchemaConfig, twoWithSlugConfig, postWithUnionSchema, diff --git a/packages/astro/test/fixtures/content-mixed-errors/astro.config.mjs b/packages/astro/test/fixtures/content-mixed-errors/astro.config.mjs index 882e6515a67e0..dee93fdedd98a 100644 --- a/packages/astro/test/fixtures/content-mixed-errors/astro.config.mjs +++ b/packages/astro/test/fixtures/content-mixed-errors/astro.config.mjs @@ -1,4 +1,8 @@ import { defineConfig } from 'astro/config'; // https://astro.build/config -export default defineConfig({}); +export default defineConfig({ + legacy: { + collections: true, + } +}); diff --git a/packages/astro/test/fixtures/content/astro.config.mjs b/packages/astro/test/fixtures/content/astro.config.mjs index d69e57975a649..71f3d1c8665d5 100644 --- a/packages/astro/test/fixtures/content/astro.config.mjs +++ b/packages/astro/test/fixtures/content/astro.config.mjs @@ -3,4 +3,8 @@ import { defineConfig } from 'astro/config'; export default defineConfig({ integrations: [mdx()], + legacy: { + // Enable legacy content collections as we test layout fields + collections: true + } }); diff --git a/packages/astro/test/fixtures/core-image-base/src/pages/blog/[...slug].astro b/packages/astro/test/fixtures/core-image-base/src/pages/blog/[...slug].astro index dc25493e854a6..20b21bbd34ebc 100644 --- a/packages/astro/test/fixtures/core-image-base/src/pages/blog/[...slug].astro +++ b/packages/astro/test/fixtures/core-image-base/src/pages/blog/[...slug].astro @@ -11,7 +11,6 @@ export async function getStaticPaths() { const { entry } = Astro.props; const { Content } = await entry.render(); -const myImage = await getImage(entry.data.image); --- diff --git a/packages/astro/test/fixtures/core-image-errors/astro.config.mjs b/packages/astro/test/fixtures/core-image-errors/astro.config.mjs new file mode 100644 index 0000000000000..cc0052535c1e0 --- /dev/null +++ b/packages/astro/test/fixtures/core-image-errors/astro.config.mjs @@ -0,0 +1,9 @@ +// @ts-check +import { defineConfig } from 'astro/config'; + +export default defineConfig({ + legacy: { + // Needed because we're using image().refine() + collections: true, + }, +}); diff --git a/packages/astro/test/fixtures/core-image/astro.config.mjs b/packages/astro/test/fixtures/core-image/astro.config.mjs new file mode 100644 index 0000000000000..c628127e1fd5d --- /dev/null +++ b/packages/astro/test/fixtures/core-image/astro.config.mjs @@ -0,0 +1,9 @@ +// @ts-check +import { defineConfig } from 'astro/config'; + +export default defineConfig({ + legacy: { + // Needed because we're using image().refine() + collections: true, + }, +}); diff --git a/packages/astro/test/fixtures/css-inline-stylesheets-2/astro.config.mjs b/packages/astro/test/fixtures/css-inline-stylesheets-2/astro.config.mjs new file mode 100644 index 0000000000000..8ccbbc5b173c1 --- /dev/null +++ b/packages/astro/test/fixtures/css-inline-stylesheets-2/astro.config.mjs @@ -0,0 +1,8 @@ +import { defineConfig } from 'astro/config'; + +export default defineConfig({ + legacy: { + // Enable legacy content collections as we test layout fields + collections: true + } +}); diff --git a/packages/astro/test/fixtures/css-inline-stylesheets-3/astro.config.mjs b/packages/astro/test/fixtures/css-inline-stylesheets-3/astro.config.mjs new file mode 100644 index 0000000000000..8ccbbc5b173c1 --- /dev/null +++ b/packages/astro/test/fixtures/css-inline-stylesheets-3/astro.config.mjs @@ -0,0 +1,8 @@ +import { defineConfig } from 'astro/config'; + +export default defineConfig({ + legacy: { + // Enable legacy content collections as we test layout fields + collections: true + } +}); diff --git a/packages/astro/test/fixtures/css-inline-stylesheets/astro.config.mjs b/packages/astro/test/fixtures/css-inline-stylesheets/astro.config.mjs new file mode 100644 index 0000000000000..8ccbbc5b173c1 --- /dev/null +++ b/packages/astro/test/fixtures/css-inline-stylesheets/astro.config.mjs @@ -0,0 +1,8 @@ +import { defineConfig } from 'astro/config'; + +export default defineConfig({ + legacy: { + // Enable legacy content collections as we test layout fields + collections: true + } +}); diff --git a/packages/astro/test/fixtures/data-collections-schema/src/content/authors-without-config/Ben Holmes.yml b/packages/astro/test/fixtures/data-collections-schema/src/content/authors/Ben Holmes.yml similarity index 100% rename from packages/astro/test/fixtures/data-collections-schema/src/content/authors-without-config/Ben Holmes.yml rename to packages/astro/test/fixtures/data-collections-schema/src/content/authors/Ben Holmes.yml diff --git a/packages/astro/test/fixtures/data-collections-schema/src/content/authors-without-config/Fred K Schott.yml b/packages/astro/test/fixtures/data-collections-schema/src/content/authors/Fred K Schott.yml similarity index 100% rename from packages/astro/test/fixtures/data-collections-schema/src/content/authors-without-config/Fred K Schott.yml rename to packages/astro/test/fixtures/data-collections-schema/src/content/authors/Fred K Schott.yml diff --git a/packages/astro/test/fixtures/data-collections-schema/src/content/authors-without-config/Nate Moore.yml b/packages/astro/test/fixtures/data-collections-schema/src/content/authors/Nate Moore.yml similarity index 100% rename from packages/astro/test/fixtures/data-collections-schema/src/content/authors-without-config/Nate Moore.yml rename to packages/astro/test/fixtures/data-collections-schema/src/content/authors/Nate Moore.yml diff --git a/packages/astro/test/fixtures/data-collections-schema/src/content/config.ts b/packages/astro/test/fixtures/data-collections-schema/src/content/config.ts index fc20cd3020ac2..378a3dcf24ac5 100644 --- a/packages/astro/test/fixtures/data-collections-schema/src/content/config.ts +++ b/packages/astro/test/fixtures/data-collections-schema/src/content/config.ts @@ -38,4 +38,6 @@ const image = defineCollection({ }), }); -export const collections = { docs, func, image, i18n }; +const authors = defineCollection({}); + +export const collections = { docs, func, image, i18n, authors }; diff --git a/packages/astro/test/fixtures/data-collections-schema/src/pages/authors/[id].json.js b/packages/astro/test/fixtures/data-collections-schema/src/pages/authors/[id].json.js index 8d5365a2eb2d2..ce06db8614749 100644 --- a/packages/astro/test/fixtures/data-collections-schema/src/pages/authors/[id].json.js +++ b/packages/astro/test/fixtures/data-collections-schema/src/pages/authors/[id].json.js @@ -9,7 +9,7 @@ export function getStaticPaths() { /** @param {import('astro').APIContext} params */ export async function GET({ params }) { const { id } = params; - const author = await getEntry('authors-without-config', id); + const author = await getEntry('authors', id); if (!author) { return Response.json({ error: `Author ${id} Not found` }); } else { diff --git a/packages/astro/test/fixtures/data-collections-schema/src/pages/authors/all.json.js b/packages/astro/test/fixtures/data-collections-schema/src/pages/authors/all.json.js index 79dd8cd9dd3c2..8db82375cdb70 100644 --- a/packages/astro/test/fixtures/data-collections-schema/src/pages/authors/all.json.js +++ b/packages/astro/test/fixtures/data-collections-schema/src/pages/authors/all.json.js @@ -1,6 +1,6 @@ import { getCollection } from 'astro:content'; export async function GET() { - const authors = await getCollection('authors-without-config'); + const authors = await getCollection('authors'); return Response.json(authors); } diff --git a/packages/astro/test/fixtures/data-collections/astro.config.mjs b/packages/astro/test/fixtures/data-collections/astro.config.mjs index 882e6515a67e0..561ff8679c145 100644 --- a/packages/astro/test/fixtures/data-collections/astro.config.mjs +++ b/packages/astro/test/fixtures/data-collections/astro.config.mjs @@ -1,4 +1,6 @@ import { defineConfig } from 'astro/config'; // https://astro.build/config -export default defineConfig({}); +export default defineConfig({ + +}); diff --git a/packages/astro/test/fixtures/data-collections/src/content/authors-without-config/Ben Holmes.yml b/packages/astro/test/fixtures/data-collections/src/content/authors/Ben Holmes.yml similarity index 100% rename from packages/astro/test/fixtures/data-collections/src/content/authors-without-config/Ben Holmes.yml rename to packages/astro/test/fixtures/data-collections/src/content/authors/Ben Holmes.yml diff --git a/packages/astro/test/fixtures/data-collections/src/content/authors-without-config/Fred K Schott.yml b/packages/astro/test/fixtures/data-collections/src/content/authors/Fred K Schott.yml similarity index 100% rename from packages/astro/test/fixtures/data-collections/src/content/authors-without-config/Fred K Schott.yml rename to packages/astro/test/fixtures/data-collections/src/content/authors/Fred K Schott.yml diff --git a/packages/astro/test/fixtures/data-collections/src/content/authors-without-config/Nate Moore.yml b/packages/astro/test/fixtures/data-collections/src/content/authors/Nate Moore.yml similarity index 100% rename from packages/astro/test/fixtures/data-collections/src/content/authors-without-config/Nate Moore.yml rename to packages/astro/test/fixtures/data-collections/src/content/authors/Nate Moore.yml diff --git a/packages/astro/test/fixtures/data-collections/src/content/config.ts b/packages/astro/test/fixtures/data-collections/src/content/config.ts index 5f3de94238064..b41988ec7f90d 100644 --- a/packages/astro/test/fixtures/data-collections/src/content/config.ts +++ b/packages/astro/test/fixtures/data-collections/src/content/config.ts @@ -17,4 +17,8 @@ const i18n = defineCollection({ }), }); -export const collections = { docs, i18n }; +const authors = defineCollection({ + type: 'data' +}); + +export const collections = { docs, i18n, authors }; diff --git a/packages/astro/test/fixtures/data-collections/src/pages/authors/[id].json.js b/packages/astro/test/fixtures/data-collections/src/pages/authors/[id].json.js index 8d5365a2eb2d2..ef3cc1d231f2d 100644 --- a/packages/astro/test/fixtures/data-collections/src/pages/authors/[id].json.js +++ b/packages/astro/test/fixtures/data-collections/src/pages/authors/[id].json.js @@ -1,15 +1,15 @@ -import { getEntry } from 'astro:content'; +import { getEntry, getCollection } from 'astro:content'; -const ids = ['Ben Holmes', 'Fred K Schott', 'Nate Moore']; +export async function getStaticPaths() { + const collection = await getCollection('authors'); -export function getStaticPaths() { - return ids.map((id) => ({ params: { id } })); + return collection.map(({ id }) => ({ params: { id } })); } /** @param {import('astro').APIContext} params */ export async function GET({ params }) { const { id } = params; - const author = await getEntry('authors-without-config', id); + const author = await getEntry('authors', id); if (!author) { return Response.json({ error: `Author ${id} Not found` }); } else { diff --git a/packages/astro/test/fixtures/data-collections/src/pages/authors/all.json.js b/packages/astro/test/fixtures/data-collections/src/pages/authors/all.json.js index 79dd8cd9dd3c2..8db82375cdb70 100644 --- a/packages/astro/test/fixtures/data-collections/src/pages/authors/all.json.js +++ b/packages/astro/test/fixtures/data-collections/src/pages/authors/all.json.js @@ -1,6 +1,6 @@ import { getCollection } from 'astro:content'; export async function GET() { - const authors = await getCollection('authors-without-config'); + const authors = await getCollection('authors'); return Response.json(authors); } diff --git a/packages/astro/test/fixtures/legacy-content-collections/astro.config.mjs b/packages/astro/test/fixtures/legacy-content-collections/astro.config.mjs new file mode 100644 index 0000000000000..cc7f6f2d28ff6 --- /dev/null +++ b/packages/astro/test/fixtures/legacy-content-collections/astro.config.mjs @@ -0,0 +1,13 @@ +import mdx from '@astrojs/mdx'; +import { defineConfig } from 'astro/config'; + +// https://astro.build/config +export default defineConfig({ + integrations: [mdx()], + experimental: { + contentIntellisense: true, + }, + legacy: { + collections: true, + }, +}); diff --git a/packages/astro/test/fixtures/legacy-content-collections/package.json b/packages/astro/test/fixtures/legacy-content-collections/package.json new file mode 100644 index 0000000000000..f7cb90d61f410 --- /dev/null +++ b/packages/astro/test/fixtures/legacy-content-collections/package.json @@ -0,0 +1,9 @@ +{ + "name": "@test/legacy-content-collections", + "version": "0.0.0", + "private": true, + "dependencies": { + "astro": "workspace:*", + "@astrojs/mdx": "workspace:*" + } +} diff --git a/packages/astro/test/fixtures/legacy-content-collections/src/assets/the-future.jpg b/packages/astro/test/fixtures/legacy-content-collections/src/assets/the-future.jpg new file mode 100644 index 0000000000000..e9caf02ab6ee3 Binary files /dev/null and b/packages/astro/test/fixtures/legacy-content-collections/src/assets/the-future.jpg differ diff --git a/packages/astro/test/fixtures/legacy-content-collections/src/components/ScriptCompA.astro b/packages/astro/test/fixtures/legacy-content-collections/src/components/ScriptCompA.astro new file mode 100644 index 0000000000000..8b1e7dff1638a --- /dev/null +++ b/packages/astro/test/fixtures/legacy-content-collections/src/components/ScriptCompA.astro @@ -0,0 +1 @@ + diff --git a/packages/astro/test/fixtures/legacy-content-collections/src/components/ScriptCompB.astro b/packages/astro/test/fixtures/legacy-content-collections/src/components/ScriptCompB.astro new file mode 100644 index 0000000000000..e133a2f518952 --- /dev/null +++ b/packages/astro/test/fixtures/legacy-content-collections/src/components/ScriptCompB.astro @@ -0,0 +1 @@ + diff --git a/packages/astro/test/fixtures/legacy-content-collections/src/content/config.ts b/packages/astro/test/fixtures/legacy-content-collections/src/content/config.ts new file mode 100644 index 0000000000000..23908e32cb6d8 --- /dev/null +++ b/packages/astro/test/fixtures/legacy-content-collections/src/content/config.ts @@ -0,0 +1,62 @@ +import { defineCollection, z } from 'astro:content'; + +const withData = defineCollection({ + type: 'data', + schema: z.object({ + title: z.string(), + }), +}); + +const withCustomSlugs = defineCollection({ + // Ensure schema passes even when `slug` is present + schema: z.object({}).strict(), +}); + +const withSchemaConfig = defineCollection({ + schema: z.object({ + title: z.string(), + isDraft: z.boolean().default(false), + lang: z.enum(['en', 'fr', 'es']).default('en'), + publishedAt: z.date().transform((val) => new Date(val)), + }), +}); + +const withUnionSchema = defineCollection({ + schema: z.discriminatedUnion('type', [ + z.object({ + type: z.literal('post'), + title: z.string(), + description: z.string(), + }), + z.object({ + type: z.literal('newsletter'), + subject: z.string(), + }), + ]), +}); + +const withSymlinkedData = defineCollection({ + type: 'data', + schema: ({ image }) => + z.object({ + alt: z.string(), + src: image(), + }), +}); + +const withSymlinkedContent = defineCollection({ + type: 'content', + schema: z.object({ + title: z.string(), + date: z.date(), + }), +}); + +export const collections = { + 'with-data': withData, + 'with-custom-slugs': withCustomSlugs, + 'with-schema-config': withSchemaConfig, + 'with-union-schema': withUnionSchema, + 'with-symlinked-data': withSymlinkedData, + 'with-symlinked-content': withSymlinkedContent, +}; diff --git a/packages/astro/test/fixtures/legacy-content-collections/src/content/with-custom-slugs/one.md b/packages/astro/test/fixtures/legacy-content-collections/src/content/with-custom-slugs/one.md new file mode 100644 index 0000000000000..d6d5bd90791fc --- /dev/null +++ b/packages/astro/test/fixtures/legacy-content-collections/src/content/with-custom-slugs/one.md @@ -0,0 +1,5 @@ +--- +slug: fancy-one +--- + +# It's the first page, fancy! diff --git a/packages/astro/test/fixtures/legacy-content-collections/src/content/with-custom-slugs/three.md b/packages/astro/test/fixtures/legacy-content-collections/src/content/with-custom-slugs/three.md new file mode 100644 index 0000000000000..7352e4e0f553a --- /dev/null +++ b/packages/astro/test/fixtures/legacy-content-collections/src/content/with-custom-slugs/three.md @@ -0,0 +1,5 @@ +--- +slug: excellent-three +--- + +# It's the third page, excellent! diff --git a/packages/astro/test/fixtures/legacy-content-collections/src/content/with-custom-slugs/two.md b/packages/astro/test/fixtures/legacy-content-collections/src/content/with-custom-slugs/two.md new file mode 100644 index 0000000000000..292cdfc04830b --- /dev/null +++ b/packages/astro/test/fixtures/legacy-content-collections/src/content/with-custom-slugs/two.md @@ -0,0 +1,5 @@ +--- +slug: interesting-two +--- + +# It's the second page, interesting! diff --git a/packages/astro/test/fixtures/legacy-content-collections/src/content/with-data/one.json b/packages/astro/test/fixtures/legacy-content-collections/src/content/with-data/one.json new file mode 100644 index 0000000000000..efc60137d68ea --- /dev/null +++ b/packages/astro/test/fixtures/legacy-content-collections/src/content/with-data/one.json @@ -0,0 +1,3 @@ +{ + "title": "One" +} diff --git a/packages/astro/test/fixtures/legacy-content-collections/src/content/with-data/three.json b/packages/astro/test/fixtures/legacy-content-collections/src/content/with-data/three.json new file mode 100644 index 0000000000000..7d028e937a718 --- /dev/null +++ b/packages/astro/test/fixtures/legacy-content-collections/src/content/with-data/three.json @@ -0,0 +1,3 @@ +{ + "title": "Three" +} diff --git a/packages/astro/test/fixtures/legacy-content-collections/src/content/with-data/two.json b/packages/astro/test/fixtures/legacy-content-collections/src/content/with-data/two.json new file mode 100644 index 0000000000000..1a8215509b0a8 --- /dev/null +++ b/packages/astro/test/fixtures/legacy-content-collections/src/content/with-data/two.json @@ -0,0 +1,3 @@ +{ + "title": "Two" +} diff --git a/packages/astro/test/fixtures/legacy-content-collections/src/content/with-schema-config/_ignore.md b/packages/astro/test/fixtures/legacy-content-collections/src/content/with-schema-config/_ignore.md new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/packages/astro/test/fixtures/legacy-content-collections/src/content/with-schema-config/_ignore/file.md b/packages/astro/test/fixtures/legacy-content-collections/src/content/with-schema-config/_ignore/file.md new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/packages/astro/test/fixtures/legacy-content-collections/src/content/with-schema-config/_ignore/ignore/file.md b/packages/astro/test/fixtures/legacy-content-collections/src/content/with-schema-config/_ignore/ignore/file.md new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/packages/astro/test/fixtures/legacy-content-collections/src/content/with-schema-config/four%.md b/packages/astro/test/fixtures/legacy-content-collections/src/content/with-schema-config/four%.md new file mode 100644 index 0000000000000..bad429c8cfe9a --- /dev/null +++ b/packages/astro/test/fixtures/legacy-content-collections/src/content/with-schema-config/four%.md @@ -0,0 +1,8 @@ +--- +title: Four +description: The forth page +lang: en +publishedAt: 2021-01-01 +--- + +# It's the forth page, fancy! diff --git a/packages/astro/test/fixtures/legacy-content-collections/src/content/with-schema-config/one.md b/packages/astro/test/fixtures/legacy-content-collections/src/content/with-schema-config/one.md new file mode 100644 index 0000000000000..a470f86cb6343 --- /dev/null +++ b/packages/astro/test/fixtures/legacy-content-collections/src/content/with-schema-config/one.md @@ -0,0 +1,8 @@ +--- +title: One +description: The first page +lang: en +publishedAt: 2021-01-01 +--- + +# It's the first page, fancy! diff --git a/packages/astro/test/fixtures/legacy-content-collections/src/content/with-schema-config/three.md b/packages/astro/test/fixtures/legacy-content-collections/src/content/with-schema-config/three.md new file mode 100644 index 0000000000000..e5c3191e5cf69 --- /dev/null +++ b/packages/astro/test/fixtures/legacy-content-collections/src/content/with-schema-config/three.md @@ -0,0 +1,8 @@ +--- +title: Three +description: The third page +lang: es +publishedAt: 2021-01-03 +--- + +# It's the third page, excellent! diff --git a/packages/astro/test/fixtures/legacy-content-collections/src/content/with-schema-config/two.md b/packages/astro/test/fixtures/legacy-content-collections/src/content/with-schema-config/two.md new file mode 100644 index 0000000000000..d4de3edf71ee0 --- /dev/null +++ b/packages/astro/test/fixtures/legacy-content-collections/src/content/with-schema-config/two.md @@ -0,0 +1,8 @@ +--- +title: Two +description: The second page +lang: en +publishedAt: 2021-01-02 +--- + +# It's the second page, interesting! diff --git a/packages/astro/test/fixtures/legacy-content-collections/src/content/with-scripts/one.mdx b/packages/astro/test/fixtures/legacy-content-collections/src/content/with-scripts/one.mdx new file mode 100644 index 0000000000000..049a25a37791f --- /dev/null +++ b/packages/astro/test/fixtures/legacy-content-collections/src/content/with-scripts/one.mdx @@ -0,0 +1,7 @@ +import ScriptCompA from '../../components/ScriptCompA.astro' +import ScriptCompB from '../../components/ScriptCompB.astro' + +Both scripts should exist. + + + diff --git a/packages/astro/test/fixtures/legacy-content-collections/src/content/with-symlinked-content b/packages/astro/test/fixtures/legacy-content-collections/src/content/with-symlinked-content new file mode 120000 index 0000000000000..e66bf94bc1f01 --- /dev/null +++ b/packages/astro/test/fixtures/legacy-content-collections/src/content/with-symlinked-content @@ -0,0 +1 @@ +../../symlinked-collections/content-collection \ No newline at end of file diff --git a/packages/astro/test/fixtures/legacy-content-collections/src/content/with-symlinked-data b/packages/astro/test/fixtures/legacy-content-collections/src/content/with-symlinked-data new file mode 120000 index 0000000000000..f90d3eb907e7c --- /dev/null +++ b/packages/astro/test/fixtures/legacy-content-collections/src/content/with-symlinked-data @@ -0,0 +1 @@ +../../symlinked-collections/data-collection \ No newline at end of file diff --git a/packages/astro/test/fixtures/legacy-content-collections/src/content/with-union-schema/newsletter.md b/packages/astro/test/fixtures/legacy-content-collections/src/content/with-union-schema/newsletter.md new file mode 100644 index 0000000000000..6e8703a1b6464 --- /dev/null +++ b/packages/astro/test/fixtures/legacy-content-collections/src/content/with-union-schema/newsletter.md @@ -0,0 +1,6 @@ +--- +type: newsletter +subject: My Newsletter +--- + +# It's a newsletter! diff --git a/packages/astro/test/fixtures/legacy-content-collections/src/content/with-union-schema/post.md b/packages/astro/test/fixtures/legacy-content-collections/src/content/with-union-schema/post.md new file mode 100644 index 0000000000000..fb260d6645f41 --- /dev/null +++ b/packages/astro/test/fixtures/legacy-content-collections/src/content/with-union-schema/post.md @@ -0,0 +1,7 @@ +--- +type: post +title: My Post +description: This is my post +--- + +# It's a post! diff --git a/packages/astro/test/fixtures/legacy-content-collections/src/content/without-config/columbia.md b/packages/astro/test/fixtures/legacy-content-collections/src/content/without-config/columbia.md new file mode 100644 index 0000000000000..4971108e36edb --- /dev/null +++ b/packages/astro/test/fixtures/legacy-content-collections/src/content/without-config/columbia.md @@ -0,0 +1,15 @@ +--- +title: Columbia +description: 'Learn about the Columbia NASA space shuttle.' +publishedDate: 'Sat May 21 2022 00:00:00 GMT-0400 (Eastern Daylight Time)' +tags: [space, 90s] +--- + +**Source:** [Wikipedia](https://en.wikipedia.org/wiki/Space_Shuttle_Endeavour) + +Space Shuttle Endeavour (Orbiter Vehicle Designation: OV-105) is a retired orbiter from NASA's Space Shuttle program and the fifth and final operational Shuttle built. It embarked on its first mission, STS-49, in May 1992 and its 25th and final mission, STS-134, in May 2011. STS-134 was expected to be the final mission of the Space Shuttle program, but with the authorization of STS-135, Atlantis became the last shuttle to fly. + +The United States Congress approved the construction of Endeavour in 1987 to replace the Space Shuttle Challenger, which was destroyed in 1986. + +NASA chose, on cost grounds, to build much of Endeavour from spare parts rather than refitting the Space Shuttle Enterprise, and used structural spares built during the construction of Discovery and Atlantis in its assembly. +Space Shuttle Endeavour (Orbiter Vehicle Designation: OV-105) is a retired orbiter from NASA's Space Shuttle program and the fifth and final operational Shuttle built. It embarked on its first mission, STS-49, in May 1992 and its 25th and final mission, STS-134, in May 2011. STS-134 was expected to be the final mission of the Space Shuttle program, but with the authorization of STS-135, Atlantis became the last shuttle to fly. diff --git a/packages/astro/test/fixtures/legacy-content-collections/src/content/without-config/endeavour.md b/packages/astro/test/fixtures/legacy-content-collections/src/content/without-config/endeavour.md new file mode 100644 index 0000000000000..51d6e8c421783 --- /dev/null +++ b/packages/astro/test/fixtures/legacy-content-collections/src/content/without-config/endeavour.md @@ -0,0 +1,14 @@ +--- +title: Endeavour +description: 'Learn about the Endeavour NASA space shuttle.' +publishedDate: 'Sun Jul 11 2021 00:00:00 GMT-0400 (Eastern Daylight Time)' +tags: [space, 90s] +--- + +**Source:** [Wikipedia](https://en.wikipedia.org/wiki/Space_Shuttle_Endeavour) + +Space Shuttle Endeavour (Orbiter Vehicle Designation: OV-105) is a retired orbiter from NASA's Space Shuttle program and the fifth and final operational Shuttle built. It embarked on its first mission, STS-49, in May 1992 and its 25th and final mission, STS-134, in May 2011. STS-134 was expected to be the final mission of the Space Shuttle program, but with the authorization of STS-135, Atlantis became the last shuttle to fly. + +The United States Congress approved the construction of Endeavour in 1987 to replace the Space Shuttle Challenger, which was destroyed in 1986. + +NASA chose, on cost grounds, to build much of Endeavour from spare parts rather than refitting the Space Shuttle Enterprise, and used structural spares built during the construction of Discovery and Atlantis in its assembly. diff --git a/packages/astro/test/fixtures/legacy-content-collections/src/content/without-config/enterprise.md b/packages/astro/test/fixtures/legacy-content-collections/src/content/without-config/enterprise.md new file mode 100644 index 0000000000000..3131e6d5df3ab --- /dev/null +++ b/packages/astro/test/fixtures/legacy-content-collections/src/content/without-config/enterprise.md @@ -0,0 +1,14 @@ +--- +title: 'Enterprise' +description: 'Learn about the Enterprise NASA space shuttle.' +publishedDate: 'Tue Jun 08 2021 00:00:00 GMT-0400 (Eastern Daylight Time)' +tags: [space, 70s] +--- + +**Source:** [Wikipedia](https://en.wikipedia.org/wiki/Space_Shuttle_Enterprise) + +Space Shuttle Enterprise (Orbiter Vehicle Designation: OV-101) was the first orbiter of the Space Shuttle system. Rolled out on September 17, 1976, it was built for NASA as part of the Space Shuttle program to perform atmospheric test flights after being launched from a modified Boeing 747. It was constructed without engines or a functional heat shield. As a result, it was not capable of spaceflight. + +Originally, Enterprise had been intended to be refitted for orbital flight to become the second space-rated orbiter in service. However, during the construction of Space Shuttle Columbia, details of the final design changed, making it simpler and less costly to build Challenger around a body frame that had been built as a test article. Similarly, Enterprise was considered for refit to replace Challenger after the latter was destroyed, but Endeavour was built from structural spares instead. + +Enterprise was restored and placed on display in 2003 at the Smithsonian's new Steven F. Udvar-Hazy Center in Virginia. Following the retirement of the Space Shuttle fleet, Discovery replaced Enterprise at the Udvar-Hazy Center, and Enterprise was transferred to the Intrepid Sea, Air & Space Museum in New York City, where it has been on display since July 2012. diff --git a/packages/astro/test/fixtures/legacy-content-collections/src/content/without-config/promo/_launch-week-styles.css b/packages/astro/test/fixtures/legacy-content-collections/src/content/without-config/promo/_launch-week-styles.css new file mode 100644 index 0000000000000..cce2effe20c17 --- /dev/null +++ b/packages/astro/test/fixtures/legacy-content-collections/src/content/without-config/promo/_launch-week-styles.css @@ -0,0 +1,3 @@ +body { + font-family: 'Comic Sans MS', sans-serif; +} diff --git a/packages/astro/test/fixtures/legacy-content-collections/src/content/without-config/promo/launch week.mdx b/packages/astro/test/fixtures/legacy-content-collections/src/content/without-config/promo/launch week.mdx new file mode 100644 index 0000000000000..22ed07c43f0ce --- /dev/null +++ b/packages/astro/test/fixtures/legacy-content-collections/src/content/without-config/promo/launch week.mdx @@ -0,0 +1,14 @@ +--- +title: 'Launch week!' +description: 'Join us for the exciting launch of SPACE BLOG' +publishedDate: 'Sat May 21 2022 00:00:00 GMT-0400 (Eastern Daylight Time)' +tags: ['announcement'] +--- + +import './_launch-week-styles.css'; + +Join us for the space blog launch! + +- THIS THURSDAY +- Houston, TX +- Dress code: **interstellar casual** ✨ diff --git a/packages/astro/test/fixtures/legacy-content-collections/src/pages/collections.json.js b/packages/astro/test/fixtures/legacy-content-collections/src/pages/collections.json.js new file mode 100644 index 0000000000000..67bafdb93e1d7 --- /dev/null +++ b/packages/astro/test/fixtures/legacy-content-collections/src/pages/collections.json.js @@ -0,0 +1,16 @@ +import { getCollection } from 'astro:content'; +import * as devalue from 'devalue'; +import { stripAllRenderFn } from '../utils.js'; + +export async function GET() { + const withoutConfig = stripAllRenderFn(await getCollection('without-config')); + const withSchemaConfig = stripAllRenderFn(await getCollection('with-schema-config')); + const withSlugConfig = stripAllRenderFn(await getCollection('with-custom-slugs')); + const withUnionSchema = stripAllRenderFn(await getCollection('with-union-schema')); + const withSymlinkedContent = stripAllRenderFn(await getCollection('with-symlinked-content')); + const withSymlinkedData = stripAllRenderFn(await getCollection('with-symlinked-data')); + + return new Response( + devalue.stringify({ withoutConfig, withSchemaConfig, withSlugConfig, withUnionSchema, withSymlinkedContent, withSymlinkedData }), + ); +} diff --git a/packages/astro/test/fixtures/legacy-content-collections/src/pages/entries.json.js b/packages/astro/test/fixtures/legacy-content-collections/src/pages/entries.json.js new file mode 100644 index 0000000000000..a05a9138b1d85 --- /dev/null +++ b/packages/astro/test/fixtures/legacy-content-collections/src/pages/entries.json.js @@ -0,0 +1,21 @@ +import { getEntryBySlug } from 'astro:content'; +import * as devalue from 'devalue'; +import { stripRenderFn } from '../utils.js'; + +export async function GET() { + const columbiaWithoutConfig = stripRenderFn(await getEntryBySlug('without-config', 'columbia')); + const oneWithSchemaConfig = stripRenderFn(await getEntryBySlug('with-schema-config', 'one')); + const twoWithSlugConfig = stripRenderFn( + await getEntryBySlug('with-custom-slugs', 'interesting-two') + ); + const postWithUnionSchema = stripRenderFn(await getEntryBySlug('with-union-schema', 'post')); + + return new Response( + devalue.stringify({ + columbiaWithoutConfig, + oneWithSchemaConfig, + twoWithSlugConfig, + postWithUnionSchema, + }) + ); +} diff --git a/packages/astro/test/fixtures/legacy-content-collections/src/pages/index.astro b/packages/astro/test/fixtures/legacy-content-collections/src/pages/index.astro new file mode 100644 index 0000000000000..468b70e7bc34c --- /dev/null +++ b/packages/astro/test/fixtures/legacy-content-collections/src/pages/index.astro @@ -0,0 +1,24 @@ +--- + +--- + + + + + It's content time! + + + +
+
+ + diff --git a/packages/astro/test/fixtures/legacy-content-collections/src/pages/propagation.astro b/packages/astro/test/fixtures/legacy-content-collections/src/pages/propagation.astro new file mode 100644 index 0000000000000..3775697acd00e --- /dev/null +++ b/packages/astro/test/fixtures/legacy-content-collections/src/pages/propagation.astro @@ -0,0 +1,22 @@ +--- +import { getCollection } from "astro:content"; +const posts = await getCollection("with-schema-config"); +--- + + + +
+
Hello World
+ Styles? +
+ + + + diff --git a/packages/astro/test/fixtures/legacy-content-collections/src/pages/with-scripts/[...slug].astro b/packages/astro/test/fixtures/legacy-content-collections/src/pages/with-scripts/[...slug].astro new file mode 100644 index 0000000000000..893cbb9c61ff9 --- /dev/null +++ b/packages/astro/test/fixtures/legacy-content-collections/src/pages/with-scripts/[...slug].astro @@ -0,0 +1,21 @@ +--- +import { getCollection } from 'astro:content'; + +export async function getStaticPaths() { + const blogEntries = await getCollection('with-scripts'); + return blogEntries.map(entry => ({ + params: { slug: entry.slug }, props: { entry }, + })); +} + +const { entry } = Astro.props; + +const { Content } = await entry.render(); +const { title } = entry.data; +--- + +
+

This is a content collection post

+

{title}

+ +
diff --git a/packages/astro/test/fixtures/legacy-content-collections/src/utils.js b/packages/astro/test/fixtures/legacy-content-collections/src/utils.js new file mode 100644 index 0000000000000..3a6244327862d --- /dev/null +++ b/packages/astro/test/fixtures/legacy-content-collections/src/utils.js @@ -0,0 +1,8 @@ +export function stripRenderFn(entryWithRender) { + const { render, ...entry } = entryWithRender; + return entry; +} + +export function stripAllRenderFn(collection = []) { + return collection.map(stripRenderFn); +} diff --git a/packages/astro/test/fixtures/legacy-content-collections/symlinked-collections/content-collection/first.md b/packages/astro/test/fixtures/legacy-content-collections/symlinked-collections/content-collection/first.md new file mode 100644 index 0000000000000..0ecb2d8587b0b --- /dev/null +++ b/packages/astro/test/fixtures/legacy-content-collections/symlinked-collections/content-collection/first.md @@ -0,0 +1,6 @@ +--- +title: "First Blog" +date: 2024-04-05 +--- + +First blog content. diff --git a/packages/astro/test/fixtures/legacy-content-collections/symlinked-collections/content-collection/second.md b/packages/astro/test/fixtures/legacy-content-collections/symlinked-collections/content-collection/second.md new file mode 100644 index 0000000000000..dcded99ccf63c --- /dev/null +++ b/packages/astro/test/fixtures/legacy-content-collections/symlinked-collections/content-collection/second.md @@ -0,0 +1,6 @@ +--- +title: "Second Blog" +date: 2024-04-06 +--- + +Second blog content. diff --git a/packages/astro/test/fixtures/legacy-content-collections/symlinked-collections/content-collection/third.md b/packages/astro/test/fixtures/legacy-content-collections/symlinked-collections/content-collection/third.md new file mode 100644 index 0000000000000..1adee317378bc --- /dev/null +++ b/packages/astro/test/fixtures/legacy-content-collections/symlinked-collections/content-collection/third.md @@ -0,0 +1,6 @@ +--- +title: "Third Blog" +date: 2024-04-07 +--- + +Third blog content. diff --git a/packages/astro/test/fixtures/legacy-content-collections/symlinked-collections/data-collection/welcome.json b/packages/astro/test/fixtures/legacy-content-collections/symlinked-collections/data-collection/welcome.json new file mode 100644 index 0000000000000..8ab06ff1f24f0 --- /dev/null +++ b/packages/astro/test/fixtures/legacy-content-collections/symlinked-collections/data-collection/welcome.json @@ -0,0 +1,4 @@ +{ + "alt": "Futuristic landscape with chrome buildings and blue skies", + "src": "../../assets/the-future.jpg" +} diff --git a/packages/astro/test/fixtures/legacy-data-collections/astro.config.mjs b/packages/astro/test/fixtures/legacy-data-collections/astro.config.mjs new file mode 100644 index 0000000000000..c342649f77fb3 --- /dev/null +++ b/packages/astro/test/fixtures/legacy-data-collections/astro.config.mjs @@ -0,0 +1,8 @@ +import { defineConfig } from 'astro/config'; + +// https://astro.build/config +export default defineConfig({ + legacy: { + collections: true, + }, +}); diff --git a/packages/astro/test/fixtures/legacy-data-collections/package.json b/packages/astro/test/fixtures/legacy-data-collections/package.json new file mode 100644 index 0000000000000..8daa28ad3f916 --- /dev/null +++ b/packages/astro/test/fixtures/legacy-data-collections/package.json @@ -0,0 +1,16 @@ +{ + "name": "@test/legacy-data-collections", + "type": "module", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "astro dev", + "start": "astro dev", + "build": "astro build", + "preview": "astro preview", + "astro": "astro" + }, + "dependencies": { + "astro": "workspace:*" + } +} diff --git a/packages/astro/test/fixtures/legacy-data-collections/src/content/authors-without-config/Ben Holmes.yml b/packages/astro/test/fixtures/legacy-data-collections/src/content/authors-without-config/Ben Holmes.yml new file mode 100644 index 0000000000000..54e6743d96cc2 --- /dev/null +++ b/packages/astro/test/fixtures/legacy-data-collections/src/content/authors-without-config/Ben Holmes.yml @@ -0,0 +1,2 @@ +name: Ben J Holmes +twitter: https://twitter.com/bholmesdev diff --git a/packages/astro/test/fixtures/legacy-data-collections/src/content/authors-without-config/Fred K Schott.yml b/packages/astro/test/fixtures/legacy-data-collections/src/content/authors-without-config/Fred K Schott.yml new file mode 100644 index 0000000000000..0b51067d95292 --- /dev/null +++ b/packages/astro/test/fixtures/legacy-data-collections/src/content/authors-without-config/Fred K Schott.yml @@ -0,0 +1,2 @@ +name: Fred K Schott +twitter: https://twitter.com/FredKSchott diff --git a/packages/astro/test/fixtures/legacy-data-collections/src/content/authors-without-config/Nate Moore.yml b/packages/astro/test/fixtures/legacy-data-collections/src/content/authors-without-config/Nate Moore.yml new file mode 100644 index 0000000000000..953f348a08f8a --- /dev/null +++ b/packages/astro/test/fixtures/legacy-data-collections/src/content/authors-without-config/Nate Moore.yml @@ -0,0 +1,2 @@ +name: Nate Something Moore +twitter: https://twitter.com/n_moore diff --git a/packages/astro/test/fixtures/legacy-data-collections/src/content/config.ts b/packages/astro/test/fixtures/legacy-data-collections/src/content/config.ts new file mode 100644 index 0000000000000..5f3de94238064 --- /dev/null +++ b/packages/astro/test/fixtures/legacy-data-collections/src/content/config.ts @@ -0,0 +1,20 @@ +import { defineCollection, z } from 'astro:content'; + +const docs = defineCollection({ + type: 'content', + schema: z.object({ + title: z.string(), + }) +}); + +const i18n = defineCollection({ + type: 'data', + schema: z.object({ + homepage: z.object({ + greeting: z.string(), + preamble: z.string(), + }) + }), +}); + +export const collections = { docs, i18n }; diff --git a/packages/astro/test/fixtures/legacy-data-collections/src/content/docs/example.md b/packages/astro/test/fixtures/legacy-data-collections/src/content/docs/example.md new file mode 100644 index 0000000000000..356e65f64b6ac --- /dev/null +++ b/packages/astro/test/fixtures/legacy-data-collections/src/content/docs/example.md @@ -0,0 +1,3 @@ +--- +title: The future of content +--- diff --git a/packages/astro/test/fixtures/legacy-data-collections/src/content/i18n/en.json b/packages/astro/test/fixtures/legacy-data-collections/src/content/i18n/en.json new file mode 100644 index 0000000000000..51d127f4a7447 --- /dev/null +++ b/packages/astro/test/fixtures/legacy-data-collections/src/content/i18n/en.json @@ -0,0 +1,6 @@ +{ + "homepage": { + "greeting": "Hello World!", + "preamble": "Welcome to the future of content." + } +} diff --git a/packages/astro/test/fixtures/legacy-data-collections/src/content/i18n/es.json b/packages/astro/test/fixtures/legacy-data-collections/src/content/i18n/es.json new file mode 100644 index 0000000000000..bf4c7af0fd057 --- /dev/null +++ b/packages/astro/test/fixtures/legacy-data-collections/src/content/i18n/es.json @@ -0,0 +1,6 @@ +{ + "homepage": { + "greeting": "¡Hola Mundo!", + "preamble": "Bienvenido al futuro del contenido." + } +} diff --git a/packages/astro/test/fixtures/legacy-data-collections/src/content/i18n/fr.yaml b/packages/astro/test/fixtures/legacy-data-collections/src/content/i18n/fr.yaml new file mode 100644 index 0000000000000..90a86d411f6e6 --- /dev/null +++ b/packages/astro/test/fixtures/legacy-data-collections/src/content/i18n/fr.yaml @@ -0,0 +1,3 @@ +homepage: + greeting: "Bonjour le monde!" + preamble: "Bienvenue dans le futur du contenu." diff --git a/packages/astro/test/fixtures/legacy-data-collections/src/pages/authors/[id].json.js b/packages/astro/test/fixtures/legacy-data-collections/src/pages/authors/[id].json.js new file mode 100644 index 0000000000000..8d5365a2eb2d2 --- /dev/null +++ b/packages/astro/test/fixtures/legacy-data-collections/src/pages/authors/[id].json.js @@ -0,0 +1,18 @@ +import { getEntry } from 'astro:content'; + +const ids = ['Ben Holmes', 'Fred K Schott', 'Nate Moore']; + +export function getStaticPaths() { + return ids.map((id) => ({ params: { id } })); +} + +/** @param {import('astro').APIContext} params */ +export async function GET({ params }) { + const { id } = params; + const author = await getEntry('authors-without-config', id); + if (!author) { + return Response.json({ error: `Author ${id} Not found` }); + } else { + return Response.json(author); + } +} diff --git a/packages/astro/test/fixtures/legacy-data-collections/src/pages/authors/all.json.js b/packages/astro/test/fixtures/legacy-data-collections/src/pages/authors/all.json.js new file mode 100644 index 0000000000000..79dd8cd9dd3c2 --- /dev/null +++ b/packages/astro/test/fixtures/legacy-data-collections/src/pages/authors/all.json.js @@ -0,0 +1,6 @@ +import { getCollection } from 'astro:content'; + +export async function GET() { + const authors = await getCollection('authors-without-config'); + return Response.json(authors); +} diff --git a/packages/astro/test/fixtures/legacy-data-collections/src/pages/translations/[lang].json.js b/packages/astro/test/fixtures/legacy-data-collections/src/pages/translations/[lang].json.js new file mode 100644 index 0000000000000..c6b0cfff669b5 --- /dev/null +++ b/packages/astro/test/fixtures/legacy-data-collections/src/pages/translations/[lang].json.js @@ -0,0 +1,18 @@ +import { getEntry } from 'astro:content'; + +const langs = ['en', 'es', 'fr']; + +export function getStaticPaths() { + return langs.map((lang) => ({ params: { lang } })); +} + +/** @param {import('astro').APIContext} params */ +export async function GET({ params }) { + const { lang } = params; + const translations = await getEntry('i18n', lang); + if (!translations) { + return Response.json({ error: `Translation ${lang} Not found` }); + } else { + return Response.json(translations); + } +} diff --git a/packages/astro/test/fixtures/legacy-data-collections/src/pages/translations/all.json.js b/packages/astro/test/fixtures/legacy-data-collections/src/pages/translations/all.json.js new file mode 100644 index 0000000000000..f1ebb15b761e6 --- /dev/null +++ b/packages/astro/test/fixtures/legacy-data-collections/src/pages/translations/all.json.js @@ -0,0 +1,6 @@ +import { getCollection } from 'astro:content'; + +export async function GET() { + const translations = await getCollection('i18n'); + return Response.json(translations); +} diff --git a/packages/astro/test/fixtures/legacy-data-collections/src/pages/translations/by-id.json.js b/packages/astro/test/fixtures/legacy-data-collections/src/pages/translations/by-id.json.js new file mode 100644 index 0000000000000..5f71c80e9f7b8 --- /dev/null +++ b/packages/astro/test/fixtures/legacy-data-collections/src/pages/translations/by-id.json.js @@ -0,0 +1,6 @@ +import { getDataEntryById } from 'astro:content'; + +export async function GET() { + const item = await getDataEntryById('i18n', 'en'); + return Response.json(item); +} diff --git a/packages/astro/test/legacy-content-collections.test.js b/packages/astro/test/legacy-content-collections.test.js new file mode 100644 index 0000000000000..6c5335dde5830 --- /dev/null +++ b/packages/astro/test/legacy-content-collections.test.js @@ -0,0 +1,450 @@ +import assert from 'node:assert/strict'; +import { before, describe, it } from 'node:test'; +import * as cheerio from 'cheerio'; +import * as devalue from 'devalue'; +import testAdapter from './test-adapter.js'; +import { preventNodeBuiltinDependencyPlugin } from './test-plugins.js'; +import { loadFixture } from './test-utils.js'; + +describe('Legacy Content Collections', () => { + describe('Query', () => { + let fixture; + before(async () => { + fixture = await loadFixture({ root: './fixtures/legacy-content-collections/' }); + await fixture.build(); + }); + + describe('Collection', () => { + let json; + before(async () => { + const rawJson = await fixture.readFile('/collections.json'); + json = devalue.parse(rawJson); + }); + + it('Returns `without config` collection', async () => { + assert.ok(json.hasOwnProperty('withoutConfig')); + assert.equal(Array.isArray(json.withoutConfig), true); + + const ids = json.withoutConfig.map((item) => item.id); + assert.deepEqual( + ids.sort(), + [ + 'columbia.md', + 'endeavour.md', + 'enterprise.md', + // Spaces allowed in IDs + 'promo/launch week.mdx', + ].sort(), + ); + }); + + it('Handles spaces in `without config` slugs', async () => { + assert.ok(json.hasOwnProperty('withoutConfig')); + assert.equal(Array.isArray(json.withoutConfig), true); + + const slugs = json.withoutConfig.map((item) => item.slug); + assert.deepEqual( + slugs.sort(), + [ + 'columbia', + 'endeavour', + 'enterprise', + // "launch week.mdx" is converted to "launch-week.mdx" + 'promo/launch-week', + ].sort(), + ); + }); + + it('Returns `with schema` collection', async () => { + assert.ok(json.hasOwnProperty('withSchemaConfig')); + assert.equal(Array.isArray(json.withSchemaConfig), true); + + const ids = json.withSchemaConfig.map((item) => item.id); + const publishedDates = json.withSchemaConfig.map((item) => item.data.publishedAt); + assert.deepEqual(ids.sort(), ['four%.md', 'one.md', 'three.md', 'two.md'].sort()); + assert.equal( + publishedDates.every((date) => date instanceof Date), + true, + 'Not all publishedAt dates are Date objects', + ); + assert.deepEqual( + publishedDates.map((date) => date.toISOString()), + [ + '2021-01-01T00:00:00.000Z', + '2021-01-01T00:00:00.000Z', + '2021-01-03T00:00:00.000Z', + '2021-01-02T00:00:00.000Z', + ], + ); + }); + + it('Returns `with custom slugs` collection', async () => { + assert.ok(json.hasOwnProperty('withSlugConfig')); + assert.equal(Array.isArray(json.withSlugConfig), true); + + const slugs = json.withSlugConfig.map((item) => item.slug); + assert.deepEqual(slugs, ['fancy-one', 'excellent-three', 'interesting-two']); + }); + + it('Returns `with union schema` collection', async () => { + assert.ok(json.hasOwnProperty('withUnionSchema')); + assert.equal(Array.isArray(json.withUnionSchema), true); + + const post = json.withUnionSchema.find((item) => item.id === 'post.md'); + assert.notEqual(post, undefined); + assert.deepEqual(post.data, { + type: 'post', + title: 'My Post', + description: 'This is my post', + }); + const newsletter = json.withUnionSchema.find((item) => item.id === 'newsletter.md'); + assert.notEqual(newsletter, undefined); + assert.deepEqual(newsletter.data, { + type: 'newsletter', + subject: 'My Newsletter', + }); + }); + + it('Handles symlinked content', async () => { + assert.ok(json.hasOwnProperty('withSymlinkedContent')); + assert.equal(Array.isArray(json.withSymlinkedContent), true); + const ids = json.withSymlinkedContent.map((item) => item.id); + assert.deepEqual(ids.sort(), ['first.md', 'second.md', 'third.md'].sort()); + assert.equal( + json.withSymlinkedContent.find(({ id }) => id === 'first.md').data.title, + 'First Blog', + ); + }); + + it('Handles symlinked data', async () => { + assert.ok(json.hasOwnProperty('withSymlinkedData')); + assert.equal(Array.isArray(json.withSymlinkedData), true); + + const ids = json.withSymlinkedData.map((item) => item.id); + assert.deepEqual(ids, ['welcome']); + assert.equal( + json.withSymlinkedData[0].data.alt, + 'Futuristic landscape with chrome buildings and blue skies', + ); + assert.notEqual(json.withSymlinkedData[0].data.src.src, undefined); + }); + }); + + describe('Propagation', () => { + it('Applies styles', async () => { + const html = await fixture.readFile('/propagation/index.html'); + const $ = cheerio.load(html); + assert.equal($('style').text().includes('content:"works!"'), true); + }); + }); + + describe('Entry', () => { + let json; + before(async () => { + const rawJson = await fixture.readFile('/entries.json'); + json = devalue.parse(rawJson); + }); + + it('Returns `without config` collection entry', async () => { + assert.ok(json.hasOwnProperty('columbiaWithoutConfig')); + assert.equal(json.columbiaWithoutConfig.id, 'columbia.md'); + }); + + it('Returns `with schema` collection entry', async () => { + assert.ok(json.hasOwnProperty('oneWithSchemaConfig')); + assert.equal(json.oneWithSchemaConfig.id, 'one.md'); + assert.equal(json.oneWithSchemaConfig.data.publishedAt instanceof Date, true); + assert.equal( + json.oneWithSchemaConfig.data.publishedAt.toISOString(), + '2021-01-01T00:00:00.000Z', + ); + }); + + it('Returns `with custom slugs` collection entry', async () => { + assert.ok(json.hasOwnProperty('twoWithSlugConfig')); + assert.equal(json.twoWithSlugConfig.slug, 'interesting-two'); + }); + + it('Returns `with union schema` collection entry', async () => { + assert.ok(json.hasOwnProperty('postWithUnionSchema')); + assert.equal(json.postWithUnionSchema.id, 'post.md'); + assert.deepEqual(json.postWithUnionSchema.data, { + type: 'post', + title: 'My Post', + description: 'This is my post', + }); + }); + }); + + describe('Scripts', () => { + it('Contains all the scripts imported by components', async () => { + const html = await fixture.readFile('/with-scripts/one/index.html'); + const $ = cheerio.load(html); + assert.equal($('script').length, 2); + // Read the scripts' content + const scriptsCode = $('script') + .map((_, el) => $(el).text()) + .toArray() + .join('\n'); + assert.match(scriptsCode, /ScriptCompA/); + assert.match(scriptsCode, /ScriptCompB/); + }); + }); + }); + + const blogSlugToContents = { + 'first-post': { + title: 'First post', + element: 'blockquote', + content: 'First post loaded: yes!', + }, + 'second-post': { + title: 'Second post', + element: 'blockquote', + content: 'Second post loaded: yes!', + }, + 'third-post': { + title: 'Third post', + element: 'blockquote', + content: 'Third post loaded: yes!', + }, + 'using-mdx': { + title: 'Using MDX', + element: 'a[href="#"]', + content: 'Embedded component in MDX', + }, + }; + + describe('Static paths integration', () => { + let fixture; + + before(async () => { + fixture = await loadFixture({ + root: './fixtures/content-static-paths-integration/', + legacy: { + collections: true, + }, + }); + await fixture.build(); + }); + + it('Generates expected pages', async () => { + for (const slug in blogSlugToContents) { + assert.equal(fixture.pathExists(`/posts/${slug}`), true); + } + }); + + it('Renders titles', async () => { + for (const slug in blogSlugToContents) { + const post = await fixture.readFile(`/posts/${slug}/index.html`); + const $ = cheerio.load(post); + assert.equal($('h1').text(), blogSlugToContents[slug].title); + } + }); + + it('Renders content', async () => { + for (const slug in blogSlugToContents) { + const post = await fixture.readFile(`/posts/${slug}/index.html`); + const $ = cheerio.load(post); + assert.equal( + $(blogSlugToContents[slug].element).text().trim(), + blogSlugToContents[slug].content, + ); + } + }); + }); + + describe('With spaces in path', () => { + it('Does not throw', async () => { + const fixture = await loadFixture({ + root: './fixtures/content with spaces in folder name/', + legacy: { + collections: true, + }, + }); + let error = null; + try { + await fixture.build({ force: true }); + } catch (e) { + error = e.message; + } + assert.equal(error, null); + }); + }); + describe('With config.mjs', () => { + it("Errors when frontmatter doesn't match schema", async () => { + const fixture = await loadFixture({ + root: './fixtures/content-collections-with-config-mjs/', + legacy: { + collections: true, + }, + }); + let error; + try { + await fixture.build(); + } catch (e) { + error = e.message; + } + assert.equal(error.includes('**title**: Expected type `"string"`, received "number"'), true); + }); + }); + describe('With config.mts', () => { + it("Errors when frontmatter doesn't match schema", async () => { + const fixture = await loadFixture({ + root: './fixtures/content-collections-with-config-mts/', + legacy: { + collections: true, + }, + }); + let error; + try { + await fixture.build(); + } catch (e) { + error = e.message; + } + assert.equal(error.includes('**title**: Expected type `"string"`, received "number"'), true); + }); + }); + + describe('With empty markdown file', () => { + it('Throws the right error', async () => { + const fixture = await loadFixture({ + root: './fixtures/content-collections-empty-md-file/', + legacy: { + collections: true, + }, + }); + let error; + try { + await fixture.build(); + } catch (e) { + error = e.message; + } + assert.equal(error.includes('**title**: Required'), true); + }); + }); + + describe('With empty collections directory', () => { + it('Handles the empty directory correctly', async () => { + const fixture = await loadFixture({ + root: './fixtures/content-collections-empty-dir/', + legacy: { + collections: true, + }, + }); + let error; + try { + await fixture.build(); + } catch (e) { + error = e.message; + } + assert.equal(error, undefined); + + const html = await fixture.readFile('/index.html'); + const $ = cheerio.load(html); + const h1 = $('h1'); + assert.equal(h1.text(), 'Entries length: 0'); + assert.equal(h1.attr('data-entries'), '[]'); + }); + }); + + describe('SSR integration', () => { + let app; + + before(async () => { + const fixture = await loadFixture({ + root: './fixtures/content-ssr-integration/', + output: 'server', + adapter: testAdapter(), + vite: { + plugins: [preventNodeBuiltinDependencyPlugin()], + }, + legacy: { + collections: true, + }, + }); + await fixture.build(); + app = await fixture.loadTestAdapterApp(); + }); + + it('Responds 200 for expected pages', async () => { + for (const slug in blogSlugToContents) { + const request = new Request('http://example.com/posts/' + slug); + const response = await app.render(request); + assert.equal(response.status, 200); + } + }); + + it('Renders titles', async () => { + for (const slug in blogSlugToContents) { + const request = new Request('http://example.com/posts/' + slug); + const response = await app.render(request); + const body = await response.text(); + const $ = cheerio.load(body); + assert.equal($('h1').text(), blogSlugToContents[slug].title); + } + }); + + it('Renders content', async () => { + for (const slug in blogSlugToContents) { + const request = new Request('http://example.com/posts/' + slug); + const response = await app.render(request); + const body = await response.text(); + const $ = cheerio.load(body); + assert.equal( + $(blogSlugToContents[slug].element).text().trim(), + blogSlugToContents[slug].content, + ); + } + }); + }); + + describe('Base configuration', () => { + let fixture; + + before(async () => { + fixture = await loadFixture({ + root: './fixtures/content-collections-base/', + legacy: { + collections: true, + }, + }); + await fixture.build(); + }); + + it('Includes base in links', async () => { + const html = await fixture.readFile('/docs/index.html'); + const $ = cheerio.load(html); + assert.equal($('link').attr('href').startsWith('/docs'), true); + }); + + it('Includes base in scripts', async () => { + const html = await fixture.readFile('/docs/index.html'); + const $ = cheerio.load(html); + assert.equal($('script').attr('src').startsWith('/docs'), true); + }); + }); + + describe('Mutation', () => { + let fixture; + + before(async () => { + fixture = await loadFixture({ + root: './fixtures/content-collections-mutation/', + legacy: { + collections: true, + }, + }); + await fixture.build(); + }); + + it('Does not mutate cached collection', async () => { + const html = await fixture.readFile('/index.html'); + const index = cheerio.load(html)('h2:first').text(); + const html2 = await fixture.readFile('/another_page/index.html'); + const anotherPage = cheerio.load(html2)('h2:first').text(); + + assert.equal(index, anotherPage); + }); + }); +}); diff --git a/packages/astro/test/legacy-data-collections.test.js b/packages/astro/test/legacy-data-collections.test.js new file mode 100644 index 0000000000000..6bd5f19493c9c --- /dev/null +++ b/packages/astro/test/legacy-data-collections.test.js @@ -0,0 +1,159 @@ +import assert from 'node:assert/strict'; +import { before, describe, it } from 'node:test'; +import { loadFixture } from './test-utils.js'; + +const authorIds = ['Ben Holmes', 'Fred K Schott', 'Nate Moore']; +const translationIds = ['en', 'es', 'fr']; + +describe('Content Collections - legacy data collections', () => { + let fixture; + before(async () => { + fixture = await loadFixture({ root: './fixtures/legacy-data-collections/' }); + await fixture.build({ force: true }); + }); + + describe('Authors Collection', () => { + let json; + before(async () => { + const rawJson = await fixture.readFile('/authors/all.json'); + json = JSON.parse(rawJson); + }); + + it('Returns', async () => { + assert.equal(Array.isArray(json), true); + assert.equal(json.length, 3); + }); + + it('Generates correct ids', async () => { + const ids = json.map((item) => item.id).sort(); + assert.deepEqual(ids, ['Ben Holmes', 'Fred K Schott', 'Nate Moore']); + }); + + it('Generates correct data', async () => { + const names = json.map((item) => item.data.name); + assert.deepEqual(names, ['Ben J Holmes', 'Fred K Schott', 'Nate Something Moore']); + + const twitterUrls = json.map((item) => item.data.twitter); + assert.deepEqual(twitterUrls, [ + 'https://twitter.com/bholmesdev', + 'https://twitter.com/FredKSchott', + 'https://twitter.com/n_moore', + ]); + }); + }); + + describe('getDataEntryById', () => { + let json; + before(async () => { + const rawJson = await fixture.readFile('/translations/by-id.json'); + json = JSON.parse(rawJson); + }); + it('Grabs the item by the base file name', () => { + assert.equal(json.id, 'en'); + }); + }); + + describe('Authors Entry', () => { + for (const authorId of authorIds) { + let json; + before(async () => { + const rawJson = await fixture.readFile(`/authors/${authorId}.json`); + json = JSON.parse(rawJson); + }); + + it(`Returns ${authorId}`, async () => { + assert.equal(json.hasOwnProperty('id'), true); + assert.equal(json.id, authorId); + }); + + it(`Generates correct data for ${authorId}`, async () => { + assert.equal(json.hasOwnProperty('data'), true); + assert.equal(json.data.hasOwnProperty('name'), true); + assert.equal(json.data.hasOwnProperty('twitter'), true); + + switch (authorId) { + case 'Ben Holmes': + assert.equal(json.data.name, 'Ben J Holmes'); + assert.equal(json.data.twitter, 'https://twitter.com/bholmesdev'); + break; + case 'Fred K Schott': + assert.equal(json.data.name, 'Fred K Schott'); + assert.equal(json.data.twitter, 'https://twitter.com/FredKSchott'); + break; + case 'Nate Moore': + assert.equal(json.data.name, 'Nate Something Moore'); + assert.equal(json.data.twitter, 'https://twitter.com/n_moore'); + break; + } + }); + } + }); + + describe('Translations Collection', () => { + let json; + before(async () => { + const rawJson = await fixture.readFile('/translations/all.json'); + json = JSON.parse(rawJson); + }); + + it('Returns', async () => { + assert.equal(Array.isArray(json), true); + assert.equal(json.length, 3); + }); + + it('Generates correct ids', async () => { + const ids = json.map((item) => item.id).sort(); + assert.deepEqual(ids, translationIds); + }); + + it('Generates correct data', async () => { + const sorted = json.sort((a, b) => a.id.localeCompare(b.id)); + const homepageGreetings = sorted.map((item) => item.data.homepage?.greeting); + assert.deepEqual(homepageGreetings, ['Hello World!', '¡Hola Mundo!', 'Bonjour le monde!']); + + const homepagePreambles = sorted.map((item) => item.data.homepage?.preamble); + assert.deepEqual(homepagePreambles, [ + 'Welcome to the future of content.', + 'Bienvenido al futuro del contenido.', + 'Bienvenue dans le futur du contenu.', + ]); + }); + }); + + describe('Translations Entry', () => { + for (const translationId of translationIds) { + let json; + before(async () => { + const rawJson = await fixture.readFile(`/translations/${translationId}.json`); + json = JSON.parse(rawJson); + }); + + it(`Returns ${translationId}`, async () => { + assert.equal(json.hasOwnProperty('id'), true); + assert.equal(json.id, translationId); + }); + + it(`Generates correct data for ${translationId}`, async () => { + assert.equal(json.hasOwnProperty('data'), true); + assert.equal(json.data.hasOwnProperty('homepage'), true); + assert.equal(json.data.homepage.hasOwnProperty('greeting'), true); + assert.equal(json.data.homepage.hasOwnProperty('preamble'), true); + + switch (translationId) { + case 'en': + assert.equal(json.data.homepage.greeting, 'Hello World!'); + assert.equal(json.data.homepage.preamble, 'Welcome to the future of content.'); + break; + case 'es': + assert.equal(json.data.homepage.greeting, '¡Hola Mundo!'); + assert.equal(json.data.homepage.preamble, 'Bienvenido al futuro del contenido.'); + break; + case 'fr': + assert.equal(json.data.homepage.greeting, 'Bonjour le monde!'); + assert.equal(json.data.homepage.preamble, 'Bienvenue dans le futur du contenu.'); + break; + } + }); + } + }); +}); diff --git a/packages/integrations/markdoc/test/content-collections.test.js b/packages/integrations/markdoc/test/content-collections.test.js index 16032ce585cae..48e97d45d6700 100644 --- a/packages/integrations/markdoc/test/content-collections.test.js +++ b/packages/integrations/markdoc/test/content-collections.test.js @@ -13,6 +13,8 @@ function formatPost(post) { const root = new URL('./fixtures/content-collections/', import.meta.url); +const sortById = (a, b) => a.id.localeCompare(b.id); + describe('Markdoc - Content Collections', () => { let baseFixture; @@ -46,7 +48,7 @@ describe('Markdoc - Content Collections', () => { assert.notEqual(posts, null); assert.deepEqual( - posts.sort().map((post) => formatPost(post)), + posts.sort(sortById).map((post) => formatPost(post)), [post1Entry, post2Entry, post3Entry], ); }); @@ -68,7 +70,7 @@ describe('Markdoc - Content Collections', () => { const posts = parseDevalue(res); assert.notEqual(posts, null); assert.deepEqual( - posts.sort().map((post) => formatPost(post)), + posts.sort(sortById).map((post) => formatPost(post)), [post1Entry, post2Entry, post3Entry], ); }); @@ -84,6 +86,9 @@ const post1Entry = { title: 'Post 1', }, body: '## Post 1\n\nThis is the contents of post 1.', + deferredRender: true, + filePath: 'src/content/blog/post-1.mdoc', + digest: '5d5bd98d949e2b9a', }; const post2Entry = { @@ -95,6 +100,9 @@ const post2Entry = { title: 'Post 2', }, body: '## Post 2\n\nThis is the contents of post 2.', + deferredRender: true, + filePath: 'src/content/blog/post-2.mdoc', + digest: '595af4b93a4af072', }; const post3Entry = { @@ -106,4 +114,7 @@ const post3Entry = { title: 'Post 3', }, body: '## Post 3\n\nThis is the contents of post 3.', + deferredRender: true, + filePath: 'src/content/blog/post-3.mdoc', + digest: 'ef589606e542247e', }; diff --git a/packages/integrations/markdoc/test/fixtures/headings-custom/src/content/config.ts b/packages/integrations/markdoc/test/fixtures/headings-custom/src/content/config.ts new file mode 100644 index 0000000000000..a142ace11a741 --- /dev/null +++ b/packages/integrations/markdoc/test/fixtures/headings-custom/src/content/config.ts @@ -0,0 +1,7 @@ +import { defineCollection } from 'astro:content'; + +const docs = defineCollection({}); + +export const collections = { + docs, +}; diff --git a/packages/integrations/markdoc/test/fixtures/headings/src/content/config.ts b/packages/integrations/markdoc/test/fixtures/headings/src/content/config.ts new file mode 100644 index 0000000000000..a142ace11a741 --- /dev/null +++ b/packages/integrations/markdoc/test/fixtures/headings/src/content/config.ts @@ -0,0 +1,7 @@ +import { defineCollection } from 'astro:content'; + +const docs = defineCollection({}); + +export const collections = { + docs, +}; diff --git a/packages/integrations/markdoc/test/fixtures/image-assets/src/content/config.ts b/packages/integrations/markdoc/test/fixtures/image-assets/src/content/config.ts new file mode 100644 index 0000000000000..a142ace11a741 --- /dev/null +++ b/packages/integrations/markdoc/test/fixtures/image-assets/src/content/config.ts @@ -0,0 +1,7 @@ +import { defineCollection } from 'astro:content'; + +const docs = defineCollection({}); + +export const collections = { + docs, +}; diff --git a/packages/integrations/markdoc/test/fixtures/render with-space/src/content/config.ts b/packages/integrations/markdoc/test/fixtures/render with-space/src/content/config.ts new file mode 100644 index 0000000000000..629486e48aa54 --- /dev/null +++ b/packages/integrations/markdoc/test/fixtures/render with-space/src/content/config.ts @@ -0,0 +1,7 @@ +import { defineCollection } from 'astro:content'; + +const blog = defineCollection({}); + +export const collections = { + blog, +}; diff --git a/packages/integrations/markdoc/test/fixtures/render-html/src/content/config.ts b/packages/integrations/markdoc/test/fixtures/render-html/src/content/config.ts new file mode 100644 index 0000000000000..629486e48aa54 --- /dev/null +++ b/packages/integrations/markdoc/test/fixtures/render-html/src/content/config.ts @@ -0,0 +1,7 @@ +import { defineCollection } from 'astro:content'; + +const blog = defineCollection({}); + +export const collections = { + blog, +}; diff --git a/packages/integrations/markdoc/test/fixtures/render-null/src/content/config.ts b/packages/integrations/markdoc/test/fixtures/render-null/src/content/config.ts new file mode 100644 index 0000000000000..629486e48aa54 --- /dev/null +++ b/packages/integrations/markdoc/test/fixtures/render-null/src/content/config.ts @@ -0,0 +1,7 @@ +import { defineCollection } from 'astro:content'; + +const blog = defineCollection({}); + +export const collections = { + blog, +}; diff --git a/packages/integrations/markdoc/test/fixtures/render-partials/src/content/config.ts b/packages/integrations/markdoc/test/fixtures/render-partials/src/content/config.ts new file mode 100644 index 0000000000000..629486e48aa54 --- /dev/null +++ b/packages/integrations/markdoc/test/fixtures/render-partials/src/content/config.ts @@ -0,0 +1,7 @@ +import { defineCollection } from 'astro:content'; + +const blog = defineCollection({}); + +export const collections = { + blog, +}; diff --git a/packages/integrations/markdoc/test/fixtures/render-simple/src/content/config.ts b/packages/integrations/markdoc/test/fixtures/render-simple/src/content/config.ts new file mode 100644 index 0000000000000..629486e48aa54 --- /dev/null +++ b/packages/integrations/markdoc/test/fixtures/render-simple/src/content/config.ts @@ -0,0 +1,7 @@ +import { defineCollection } from 'astro:content'; + +const blog = defineCollection({}); + +export const collections = { + blog, +}; diff --git a/packages/integrations/markdoc/test/fixtures/render-typographer/src/content/config.ts b/packages/integrations/markdoc/test/fixtures/render-typographer/src/content/config.ts new file mode 100644 index 0000000000000..629486e48aa54 --- /dev/null +++ b/packages/integrations/markdoc/test/fixtures/render-typographer/src/content/config.ts @@ -0,0 +1,7 @@ +import { defineCollection } from 'astro:content'; + +const blog = defineCollection({}); + +export const collections = { + blog, +}; diff --git a/packages/integrations/markdoc/test/fixtures/render-with-components/src/content/config.ts b/packages/integrations/markdoc/test/fixtures/render-with-components/src/content/config.ts new file mode 100644 index 0000000000000..629486e48aa54 --- /dev/null +++ b/packages/integrations/markdoc/test/fixtures/render-with-components/src/content/config.ts @@ -0,0 +1,7 @@ +import { defineCollection } from 'astro:content'; + +const blog = defineCollection({}); + +export const collections = { + blog, +}; diff --git a/packages/integrations/markdoc/test/fixtures/render-with-config/src/content/config.ts b/packages/integrations/markdoc/test/fixtures/render-with-config/src/content/config.ts new file mode 100644 index 0000000000000..629486e48aa54 --- /dev/null +++ b/packages/integrations/markdoc/test/fixtures/render-with-config/src/content/config.ts @@ -0,0 +1,7 @@ +import { defineCollection } from 'astro:content'; + +const blog = defineCollection({}); + +export const collections = { + blog, +}; diff --git a/packages/integrations/markdoc/test/fixtures/render-with-extends-components/src/content/config.ts b/packages/integrations/markdoc/test/fixtures/render-with-extends-components/src/content/config.ts new file mode 100644 index 0000000000000..629486e48aa54 --- /dev/null +++ b/packages/integrations/markdoc/test/fixtures/render-with-extends-components/src/content/config.ts @@ -0,0 +1,7 @@ +import { defineCollection } from 'astro:content'; + +const blog = defineCollection({}); + +export const collections = { + blog, +}; diff --git a/packages/integrations/markdoc/test/fixtures/render-with-indented-components/src/content/config.ts b/packages/integrations/markdoc/test/fixtures/render-with-indented-components/src/content/config.ts new file mode 100644 index 0000000000000..629486e48aa54 --- /dev/null +++ b/packages/integrations/markdoc/test/fixtures/render-with-indented-components/src/content/config.ts @@ -0,0 +1,7 @@ +import { defineCollection } from 'astro:content'; + +const blog = defineCollection({}); + +export const collections = { + blog, +}; diff --git a/packages/integrations/mdx/test/fixtures/mdx-images/src/content/config.ts b/packages/integrations/mdx/test/fixtures/mdx-images/src/content/config.ts new file mode 100644 index 0000000000000..14443e78d6f7b --- /dev/null +++ b/packages/integrations/mdx/test/fixtures/mdx-images/src/content/config.ts @@ -0,0 +1,5 @@ +import { defineCollection, z } from 'astro:content'; + +const blog = defineCollection({}); + +export const collections = { blog }; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index de1530c77a5db..0b51a09ab5a5d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -54,13 +54,13 @@ importers: version: 0.14.1 turbo: specifier: ^2.1.2 - version: 2.1.2 + version: 2.1.3 typescript: specifier: ~5.6.2 version: 5.6.2 typescript-eslint: specifier: ^8.7.0 - version: 8.7.0(eslint@9.11.1(jiti@1.21.0))(typescript@5.6.2) + version: 8.8.0(eslint@9.11.1(jiti@1.21.0))(typescript@5.6.2) benchmark: dependencies: @@ -93,7 +93,7 @@ importers: version: 6.1.1 sharp: specifier: ^0.33.3 - version: 0.33.5 + version: 0.33.3 tinyexec: specifier: ^0.3.0 version: 0.3.0 @@ -302,7 +302,7 @@ importers: dependencies: '@astrojs/node': specifier: ^9.0.0-alpha.1 - version: 9.0.0-beta.2(astro@packages+astro) + version: 9.0.0-alpha.1(astro@packages+astro) astro: specifier: ^5.0.0-beta.3 version: link:../../packages/astro @@ -317,7 +317,7 @@ importers: dependencies: '@astrojs/node': specifier: ^9.0.0-alpha.1 - version: 9.0.0-beta.2(astro@packages+astro) + version: 9.0.0-alpha.1(astro@packages+astro) astro: specifier: ^5.0.0-beta.3 version: link:../../packages/astro @@ -351,7 +351,7 @@ importers: devDependencies: '@astrojs/node': specifier: ^9.0.0-alpha.1 - version: 9.0.0-beta.2(astro@packages+astro) + version: 9.0.0-alpha.1(astro@packages+astro) '@astrojs/react': specifier: ^3.6.2 version: link:../../packages/integrations/react @@ -390,7 +390,7 @@ importers: dependencies: '@astrojs/node': specifier: ^9.0.0-alpha.1 - version: 9.0.0-beta.2(astro@packages+astro) + version: 9.0.0-alpha.1(astro@packages+astro) '@astrojs/svelte': specifier: ^6.0.0-beta.0 version: link:../../packages/integrations/svelte @@ -411,7 +411,7 @@ importers: version: 1.79.4 sharp: specifier: ^0.33.3 - version: 0.33.5 + version: 0.33.3 examples/toolbar-app: devDependencies: @@ -423,7 +423,7 @@ importers: devDependencies: '@astrojs/node': specifier: ^9.0.0-alpha.1 - version: 9.0.0-beta.2(astro@packages+astro) + version: 9.0.0-alpha.1(astro@packages+astro) '@astrojs/tailwind': specifier: ^5.1.1 version: link:../../packages/integrations/tailwind @@ -561,7 +561,7 @@ importers: version: 1.1.0 '@rollup/pluginutils': specifier: ^5.1.2 - version: 5.1.2(rollup@4.22.5) + version: 5.1.2(rollup@4.23.0) '@types/cookie': specifier: ^0.6.0 version: 0.6.0 @@ -724,7 +724,7 @@ importers: optionalDependencies: sharp: specifier: ^0.33.3 - version: 0.33.5 + version: 0.33.3 devDependencies: '@astrojs/check': specifier: ^0.9.3 @@ -818,7 +818,7 @@ importers: version: 0.1.2 rollup: specifier: ^4.22.5 - version: 4.22.5 + version: 4.23.0 sass: specifier: ^1.79.4 version: 1.79.4 @@ -3351,6 +3351,21 @@ importers: specifier: workspace:* version: link:../../.. + packages/astro/test/fixtures/legacy-content-collections: + dependencies: + '@astrojs/mdx': + specifier: workspace:* + version: link:../../../../integrations/mdx + astro: + specifier: workspace:* + version: link:../../.. + + packages/astro/test/fixtures/legacy-data-collections: + dependencies: + astro: + specifier: workspace:* + version: link:../../.. + packages/astro/test/fixtures/markdown: dependencies: '@astrojs/preact': @@ -5085,7 +5100,7 @@ importers: devDependencies: '@astrojs/node': specifier: ^8.3.3 - version: 8.3.4(astro@packages+astro) + version: 8.3.3(astro@packages+astro) astro: specifier: workspace:* version: link:../../astro @@ -5222,7 +5237,7 @@ importers: version: 3.5.10 vite-plugin-vue-devtools: specifier: ^7.4.6 - version: 7.4.6(rollup@4.22.5)(vite@6.0.0-beta.2(@types/node@18.19.31)(sass@1.79.4))(vue@3.5.10(typescript@5.6.2)) + version: 7.4.6(rollup@4.23.0)(vite@6.0.0-beta.2(@types/node@18.19.31)(sass@1.79.4))(vue@3.5.10(typescript@5.6.2)) devDependencies: astro: specifier: workspace:* @@ -5646,15 +5661,20 @@ packages: prettier-plugin-astro: optional: true + '@astrojs/node@8.3.3': + resolution: {integrity: sha512-idrKhnnPSi0ABV+PCQsRQqVNwpOvVDF/+fkwcIiE8sr9J8EMvW9g/oyAt8T4X2OBJ8FUzYPL8klfCdG7r0eB5g==} + peerDependencies: + astro: ^4.2.0 + '@astrojs/node@8.3.4': resolution: {integrity: sha512-xzQs39goN7xh9np9rypGmbgZj3AmmjNxEMj9ZWz5aBERlqqFF3n8A/w/uaJeZ/bkHS60l1BXVS0tgsQt9MFqBA==} peerDependencies: astro: ^4.2.0 - '@astrojs/node@9.0.0-beta.2': - resolution: {integrity: sha512-0r0LVuwBk2s6rI54VvGpByXFw8eE8CiLuC/iXnDagXyxj54/OZifq/VtC5a79/cyfyBugYKODcr+tp/wkuaddA==} + '@astrojs/node@9.0.0-alpha.1': + resolution: {integrity: sha512-5KsaJYuAnKP4tmT/skEWLs4UP6FQhtwIVa26MBU5imiS/aL33cIwmZ7Gl2W0rP/t4Wnz9ehf42lXWXLPekhETw==} peerDependencies: - astro: ^5.0.0-alpha.8 + astro: ^5.0.0-alpha.0 '@astrojs/yaml2ts@0.2.1': resolution: {integrity: sha512-CBaNwDQJz20E5WxzQh4thLVfhB3JEEGz72wRA+oJp6fQR37QLAqXZJU0mHC+yqMOQ6oj0GfRPJrz6hjf+zm6zA==} @@ -6243,8 +6263,8 @@ packages: '@emmetio/stream-reader@2.2.0': resolution: {integrity: sha512-fXVXEyFA5Yv3M3n8sUGT7+fvecGrZP4k6FnWWMSZVQf69kAq0LLpaBQLGcPR30m3zMmKYhECP4k/ZkzvhEW5kw==} - '@emnapi/runtime@1.2.0': - resolution: {integrity: sha512-bV21/9LQmcQeCPEg3BDFtvwL6cwiTMksYNWQQ4KOxCZikEGalWtenoZ0wCiukJINlGCIi2KXx01g4FoH/LxpzQ==} + '@emnapi/runtime@1.1.1': + resolution: {integrity: sha512-3bfqkzuR1KLx57nZfjr2NLnFOobvyS0aTszaEGCGqmYMVDRaGvgIZbjGSV/MHSSmLgQ/b9JFHQ5xm5WRZYd+XQ==} '@esbuild/aix-ppc64@0.21.5': resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} @@ -6580,108 +6600,116 @@ packages: resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==} engines: {node: '>=18.18'} - '@img/sharp-darwin-arm64@0.33.5': - resolution: {integrity: sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-darwin-arm64@0.33.3': + resolution: {integrity: sha512-FaNiGX1MrOuJ3hxuNzWgsT/mg5OHG/Izh59WW2mk1UwYHUwtfbhk5QNKYZgxf0pLOhx9ctGiGa2OykD71vOnSw==} + engines: {glibc: '>=2.26', node: ^18.17.0 || ^20.3.0 || >=21.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} cpu: [arm64] os: [darwin] - '@img/sharp-darwin-x64@0.33.5': - resolution: {integrity: sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-darwin-x64@0.33.3': + resolution: {integrity: sha512-2QeSl7QDK9ru//YBT4sQkoq7L0EAJZA3rtV+v9p8xTKl4U1bUqTIaCnoC7Ctx2kCjQgwFXDasOtPTCT8eCTXvw==} + engines: {glibc: '>=2.26', node: ^18.17.0 || ^20.3.0 || >=21.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} cpu: [x64] os: [darwin] - '@img/sharp-libvips-darwin-arm64@1.0.4': - resolution: {integrity: sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==} + '@img/sharp-libvips-darwin-arm64@1.0.2': + resolution: {integrity: sha512-tcK/41Rq8IKlSaKRCCAuuY3lDJjQnYIW1UXU1kxcEKrfL8WR7N6+rzNoOxoQRJWTAECuKwgAHnPvqXGN8XfkHA==} + engines: {macos: '>=11', npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} cpu: [arm64] os: [darwin] - '@img/sharp-libvips-darwin-x64@1.0.4': - resolution: {integrity: sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==} + '@img/sharp-libvips-darwin-x64@1.0.2': + resolution: {integrity: sha512-Ofw+7oaWa0HiiMiKWqqaZbaYV3/UGL2wAPeLuJTx+9cXpCRdvQhCLG0IH8YGwM0yGWGLpsF4Su9vM1o6aer+Fw==} + engines: {macos: '>=10.13', npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} cpu: [x64] os: [darwin] - '@img/sharp-libvips-linux-arm64@1.0.4': - resolution: {integrity: sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==} + '@img/sharp-libvips-linux-arm64@1.0.2': + resolution: {integrity: sha512-x7kCt3N00ofFmmkkdshwj3vGPCnmiDh7Gwnd4nUwZln2YjqPxV1NlTyZOvoDWdKQVDL911487HOueBvrpflagw==} + engines: {glibc: '>=2.26', npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} cpu: [arm64] os: [linux] - '@img/sharp-libvips-linux-arm@1.0.5': - resolution: {integrity: sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==} + '@img/sharp-libvips-linux-arm@1.0.2': + resolution: {integrity: sha512-iLWCvrKgeFoglQxdEwzu1eQV04o8YeYGFXtfWU26Zr2wWT3q3MTzC+QTCO3ZQfWd3doKHT4Pm2kRmLbupT+sZw==} + engines: {glibc: '>=2.28', npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} cpu: [arm] os: [linux] - '@img/sharp-libvips-linux-s390x@1.0.4': - resolution: {integrity: sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==} + '@img/sharp-libvips-linux-s390x@1.0.2': + resolution: {integrity: sha512-cmhQ1J4qVhfmS6szYW7RT+gLJq9dH2i4maq+qyXayUSn9/3iY2ZeWpbAgSpSVbV2E1JUL2Gg7pwnYQ1h8rQIog==} + engines: {glibc: '>=2.28', npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} cpu: [s390x] os: [linux] - '@img/sharp-libvips-linux-x64@1.0.4': - resolution: {integrity: sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==} + '@img/sharp-libvips-linux-x64@1.0.2': + resolution: {integrity: sha512-E441q4Qdb+7yuyiADVi5J+44x8ctlrqn8XgkDTwr4qPJzWkaHwD489iZ4nGDgcuya4iMN3ULV6NwbhRZJ9Z7SQ==} + engines: {glibc: '>=2.26', npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} cpu: [x64] os: [linux] - '@img/sharp-libvips-linuxmusl-arm64@1.0.4': - resolution: {integrity: sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==} + '@img/sharp-libvips-linuxmusl-arm64@1.0.2': + resolution: {integrity: sha512-3CAkndNpYUrlDqkCM5qhksfE+qSIREVpyoeHIU6jd48SJZViAmznoQQLAv4hVXF7xyUB9zf+G++e2v1ABjCbEQ==} + engines: {musl: '>=1.2.2', npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} cpu: [arm64] os: [linux] - '@img/sharp-libvips-linuxmusl-x64@1.0.4': - resolution: {integrity: sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==} + '@img/sharp-libvips-linuxmusl-x64@1.0.2': + resolution: {integrity: sha512-VI94Q6khIHqHWNOh6LLdm9s2Ry4zdjWJwH56WoiJU7NTeDwyApdZZ8c+SADC8OH98KWNQXnE01UdJ9CSfZvwZw==} + engines: {musl: '>=1.2.2', npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} cpu: [x64] os: [linux] - '@img/sharp-linux-arm64@0.33.5': - resolution: {integrity: sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-linux-arm64@0.33.3': + resolution: {integrity: sha512-Zf+sF1jHZJKA6Gor9hoYG2ljr4wo9cY4twaxgFDvlG0Xz9V7sinsPp8pFd1XtlhTzYo0IhDbl3rK7P6MzHpnYA==} + engines: {glibc: '>=2.26', node: ^18.17.0 || ^20.3.0 || >=21.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} cpu: [arm64] os: [linux] - '@img/sharp-linux-arm@0.33.5': - resolution: {integrity: sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-linux-arm@0.33.3': + resolution: {integrity: sha512-Q7Ee3fFSC9P7vUSqVEF0zccJsZ8GiiCJYGWDdhEjdlOeS9/jdkyJ6sUSPj+bL8VuOYFSbofrW0t/86ceVhx32w==} + engines: {glibc: '>=2.28', node: ^18.17.0 || ^20.3.0 || >=21.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} cpu: [arm] os: [linux] - '@img/sharp-linux-s390x@0.33.5': - resolution: {integrity: sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-linux-s390x@0.33.3': + resolution: {integrity: sha512-vFk441DKRFepjhTEH20oBlFrHcLjPfI8B0pMIxGm3+yilKyYeHEVvrZhYFdqIseSclIqbQ3SnZMwEMWonY5XFA==} + engines: {glibc: '>=2.28', node: ^18.17.0 || ^20.3.0 || >=21.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} cpu: [s390x] os: [linux] - '@img/sharp-linux-x64@0.33.5': - resolution: {integrity: sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-linux-x64@0.33.3': + resolution: {integrity: sha512-Q4I++herIJxJi+qmbySd072oDPRkCg/SClLEIDh5IL9h1zjhqjv82H0Seupd+q2m0yOfD+/fJnjSoDFtKiHu2g==} + engines: {glibc: '>=2.26', node: ^18.17.0 || ^20.3.0 || >=21.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} cpu: [x64] os: [linux] - '@img/sharp-linuxmusl-arm64@0.33.5': - resolution: {integrity: sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-linuxmusl-arm64@0.33.3': + resolution: {integrity: sha512-qnDccehRDXadhM9PM5hLvcPRYqyFCBN31kq+ErBSZtZlsAc1U4Z85xf/RXv1qolkdu+ibw64fUDaRdktxTNP9A==} + engines: {musl: '>=1.2.2', node: ^18.17.0 || ^20.3.0 || >=21.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} cpu: [arm64] os: [linux] - '@img/sharp-linuxmusl-x64@0.33.5': - resolution: {integrity: sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-linuxmusl-x64@0.33.3': + resolution: {integrity: sha512-Jhchim8kHWIU/GZ+9poHMWRcefeaxFIs9EBqf9KtcC14Ojk6qua7ghKiPs0sbeLbLj/2IGBtDcxHyjCdYWkk2w==} + engines: {musl: '>=1.2.2', node: ^18.17.0 || ^20.3.0 || >=21.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} cpu: [x64] os: [linux] - '@img/sharp-wasm32@0.33.5': - resolution: {integrity: sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-wasm32@0.33.3': + resolution: {integrity: sha512-68zivsdJ0koE96stdUfM+gmyaK/NcoSZK5dV5CAjES0FUXS9lchYt8LAB5rTbM7nlWtxaU/2GON0HVN6/ZYJAQ==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} cpu: [wasm32] - '@img/sharp-win32-ia32@0.33.5': - resolution: {integrity: sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-win32-ia32@0.33.3': + resolution: {integrity: sha512-CyimAduT2whQD8ER4Ux7exKrtfoaUiVr7HG0zZvO0XTFn2idUWljjxv58GxNTkFb8/J9Ub9AqITGkJD6ZginxQ==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} cpu: [ia32] os: [win32] - '@img/sharp-win32-x64@0.33.5': - resolution: {integrity: sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-win32-x64@0.33.3': + resolution: {integrity: sha512-viT4fUIDKnli3IfOephGnolMzhz5VaTvDRkYqtZxOMIoMQ4MrAziO7pT1nVnOt2FAm7qW5aa+CCc13aEY6Le0g==} + engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0', yarn: '>=3.2.0'} cpu: [x64] os: [win32] @@ -6888,83 +6916,83 @@ packages: rollup: optional: true - '@rollup/rollup-android-arm-eabi@4.22.5': - resolution: {integrity: sha512-SU5cvamg0Eyu/F+kLeMXS7GoahL+OoizlclVFX3l5Ql6yNlywJJ0OuqTzUx0v+aHhPHEB/56CT06GQrRrGNYww==} + '@rollup/rollup-android-arm-eabi@4.23.0': + resolution: {integrity: sha512-8OR+Ok3SGEMsAZispLx8jruuXw0HVF16k+ub2eNXKHDmdxL4cf9NlNpAzhlOhNyXzKDEJuFeq0nZm+XlNb1IFw==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.22.5': - resolution: {integrity: sha512-S4pit5BP6E5R5C8S6tgU/drvgjtYW76FBuG6+ibG3tMvlD1h9LHVF9KmlmaUBQ8Obou7hEyS+0w+IR/VtxwNMQ==} + '@rollup/rollup-android-arm64@4.23.0': + resolution: {integrity: sha512-rEFtX1nP8gqmLmPZsXRMoLVNB5JBwOzIAk/XAcEPuKrPa2nPJ+DuGGpfQUR0XjRm8KjHfTZLpWbKXkA5BoFL3w==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.22.5': - resolution: {integrity: sha512-250ZGg4ipTL0TGvLlfACkIxS9+KLtIbn7BCZjsZj88zSg2Lvu3Xdw6dhAhfe/FjjXPVNCtcSp+WZjVsD3a/Zlw==} + '@rollup/rollup-darwin-arm64@4.23.0': + resolution: {integrity: sha512-ZbqlMkJRMMPeapfaU4drYHns7Q5MIxjM/QeOO62qQZGPh9XWziap+NF9fsqPHT0KzEL6HaPspC7sOwpgyA3J9g==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.22.5': - resolution: {integrity: sha512-D8brJEFg5D+QxFcW6jYANu+Rr9SlKtTenmsX5hOSzNYVrK5oLAEMTUgKWYJP+wdKyCdeSwnapLsn+OVRFycuQg==} + '@rollup/rollup-darwin-x64@4.23.0': + resolution: {integrity: sha512-PfmgQp78xx5rBCgn2oYPQ1rQTtOaQCna0kRaBlc5w7RlA3TDGGo7m3XaptgitUZ54US9915i7KeVPHoy3/W8tA==} cpu: [x64] os: [darwin] - '@rollup/rollup-linux-arm-gnueabihf@4.22.5': - resolution: {integrity: sha512-PNqXYmdNFyWNg0ma5LdY8wP+eQfdvyaBAojAXgO7/gs0Q/6TQJVXAXe8gwW9URjbS0YAammur0fynYGiWsKlXw==} + '@rollup/rollup-linux-arm-gnueabihf@4.23.0': + resolution: {integrity: sha512-WAeZfAAPus56eQgBioezXRRzArAjWJGjNo/M+BHZygUcs9EePIuGI1Wfc6U/Ki+tMW17FFGvhCfYnfcKPh18SA==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.22.5': - resolution: {integrity: sha512-kSSCZOKz3HqlrEuwKd9TYv7vxPYD77vHSUvM2y0YaTGnFc8AdI5TTQRrM1yIp3tXCKrSL9A7JLoILjtad5t8pQ==} + '@rollup/rollup-linux-arm-musleabihf@4.23.0': + resolution: {integrity: sha512-v7PGcp1O5XKZxKX8phTXtmJDVpE20Ub1eF6w9iMmI3qrrPak6yR9/5eeq7ziLMrMTjppkkskXyxnmm00HdtXjA==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.22.5': - resolution: {integrity: sha512-oTXQeJHRbOnwRnRffb6bmqmUugz0glXaPyspp4gbQOPVApdpRrY/j7KP3lr7M8kTfQTyrBUzFjj5EuHAhqH4/w==} + '@rollup/rollup-linux-arm64-gnu@4.23.0': + resolution: {integrity: sha512-nAbWsDZ9UkU6xQiXEyXBNHAKbzSAi95H3gTStJq9UGiS1v+YVXwRHcQOQEF/3CHuhX5BVhShKoeOf6Q/1M+Zhg==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.22.5': - resolution: {integrity: sha512-qnOTIIs6tIGFKCHdhYitgC2XQ2X25InIbZFor5wh+mALH84qnFHvc+vmWUpyX97B0hNvwNUL4B+MB8vJvH65Fw==} + '@rollup/rollup-linux-arm64-musl@4.23.0': + resolution: {integrity: sha512-5QT/Di5FbGNPaVw8hHO1wETunwkPuZBIu6W+5GNArlKHD9fkMHy7vS8zGHJk38oObXfWdsuLMogD4sBySLJ54g==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.22.5': - resolution: {integrity: sha512-TMYu+DUdNlgBXING13rHSfUc3Ky5nLPbWs4bFnT+R6Vu3OvXkTkixvvBKk8uO4MT5Ab6lC3U7x8S8El2q5o56w==} + '@rollup/rollup-linux-powerpc64le-gnu@4.23.0': + resolution: {integrity: sha512-Sefl6vPyn5axzCsO13r1sHLcmPuiSOrKIImnq34CBurntcJ+lkQgAaTt/9JkgGmaZJ+OkaHmAJl4Bfd0DmdtOQ==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.22.5': - resolution: {integrity: sha512-PTQq1Kz22ZRvuhr3uURH+U/Q/a0pbxJoICGSprNLAoBEkyD3Sh9qP5I0Asn0y0wejXQBbsVMRZRxlbGFD9OK4A==} + '@rollup/rollup-linux-riscv64-gnu@4.23.0': + resolution: {integrity: sha512-o4QI2KU/QbP7ZExMse6ULotdV3oJUYMrdx3rBZCgUF3ur3gJPfe8Fuasn6tia16c5kZBBw0aTmaUygad6VB/hQ==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.22.5': - resolution: {integrity: sha512-bR5nCojtpuMss6TDEmf/jnBnzlo+6n1UhgwqUvRoe4VIotC7FG1IKkyJbwsT7JDsF2jxR+NTnuOwiGv0hLyDoQ==} + '@rollup/rollup-linux-s390x-gnu@4.23.0': + resolution: {integrity: sha512-+bxqx+V/D4FGrpXzPGKp/SEZIZ8cIW3K7wOtcJAoCrmXvzRtmdUhYNbgd+RztLzfDEfA2WtKj5F4tcbNPuqgeg==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.22.5': - resolution: {integrity: sha512-N0jPPhHjGShcB9/XXZQWuWBKZQnC1F36Ce3sDqWpujsGjDz/CQtOL9LgTrJ+rJC8MJeesMWrMWVLKKNR/tMOCA==} + '@rollup/rollup-linux-x64-gnu@4.23.0': + resolution: {integrity: sha512-I/eXsdVoCKtSgK9OwyQKPAfricWKUMNCwJKtatRYMmDo5N859tbO3UsBw5kT3dU1n6ZcM1JDzPRSGhAUkxfLxw==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.22.5': - resolution: {integrity: sha512-uBa2e28ohzNNwjr6Uxm4XyaA1M/8aTgfF2T7UIlElLaeXkgpmIJ2EitVNQxjO9xLLLy60YqAgKn/AqSpCUkE9g==} + '@rollup/rollup-linux-x64-musl@4.23.0': + resolution: {integrity: sha512-4ZoDZy5ShLbbe1KPSafbFh1vbl0asTVfkABC7eWqIs01+66ncM82YJxV2VtV3YVJTqq2P8HMx3DCoRSWB/N3rw==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.22.5': - resolution: {integrity: sha512-RXT8S1HP8AFN/Kr3tg4fuYrNxZ/pZf1HemC5Tsddc6HzgGnJm0+Lh5rAHJkDuW3StI0ynNXukidROMXYl6ew8w==} + '@rollup/rollup-win32-arm64-msvc@4.23.0': + resolution: {integrity: sha512-+5Ky8dhft4STaOEbZu3/NU4QIyYssKO+r1cD3FzuusA0vO5gso15on7qGzKdNXnc1gOrsgCqZjRw1w+zL4y4hQ==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.22.5': - resolution: {integrity: sha512-ElTYOh50InL8kzyUD6XsnPit7jYCKrphmddKAe1/Ytt74apOxDq5YEcbsiKs0fR3vff3jEneMM+3I7jbqaMyBg==} + '@rollup/rollup-win32-ia32-msvc@4.23.0': + resolution: {integrity: sha512-0SPJk4cPZQhq9qA1UhIRumSE3+JJIBBjtlGl5PNC///BoaByckNZd53rOYD0glpTkYFBQSt7AkMeLVPfx65+BQ==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.22.5': - resolution: {integrity: sha512-+lvL/4mQxSV8MukpkKyyvfwhH266COcWlXE/1qxwN08ajovta3459zrjLghYMgDerlzNwLAcFpvU+WWE5y6nAQ==} + '@rollup/rollup-win32-x64-msvc@4.23.0': + resolution: {integrity: sha512-lqCK5GQC8fNo0+JvTSxcG7YB1UKYp8yrNLhsArlvPWN+16ovSZgoehlVHg6X0sSWPUkpjRBR5TuR12ZugowZ4g==} cpu: [x64] os: [win32] @@ -7076,6 +7104,9 @@ packages: '@types/estree-jsx@1.0.5': resolution: {integrity: sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==} + '@types/estree@1.0.5': + resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} + '@types/estree@1.0.6': resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} @@ -7217,8 +7248,8 @@ packages: '@types/yargs-parser@21.0.3': resolution: {integrity: sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==} - '@typescript-eslint/eslint-plugin@8.7.0': - resolution: {integrity: sha512-RIHOoznhA3CCfSTFiB6kBGLQtB/sox+pJ6jeFu6FxJvqL8qRxq/FfGO/UhsGgQM9oGdXkV4xUgli+dt26biB6A==} + '@typescript-eslint/eslint-plugin@8.8.0': + resolution: {integrity: sha512-wORFWjU30B2WJ/aXBfOm1LX9v9nyt9D3jsSOxC3cCaTQGCW5k4jNpmjFv3U7p/7s4yvdjHzwtv2Sd2dOyhjS0A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 @@ -7228,8 +7259,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@8.7.0': - resolution: {integrity: sha512-lN0btVpj2unxHlNYLI//BQ7nzbMJYBVQX5+pbNXvGYazdlgYonMn4AhhHifQ+J4fGRYA/m1DjaQjx+fDetqBOQ==} + '@typescript-eslint/parser@8.8.0': + resolution: {integrity: sha512-uEFUsgR+tl8GmzmLjRqz+VrDv4eoaMqMXW7ruXfgThaAShO9JTciKpEsB+TvnfFfbg5IpujgMXVV36gOJRLtZg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -7238,12 +7269,12 @@ packages: typescript: optional: true - '@typescript-eslint/scope-manager@8.7.0': - resolution: {integrity: sha512-87rC0k3ZlDOuz82zzXRtQ7Akv3GKhHs0ti4YcbAJtaomllXoSO8hi7Ix3ccEvCd824dy9aIX+j3d2UMAfCtVpg==} + '@typescript-eslint/scope-manager@8.8.0': + resolution: {integrity: sha512-EL8eaGC6gx3jDd8GwEFEV091210U97J0jeEHrAYvIYosmEGet4wJ+g0SYmLu+oRiAwbSA5AVrt6DxLHfdd+bUg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.7.0': - resolution: {integrity: sha512-tl0N0Mj3hMSkEYhLkjREp54OSb/FI6qyCzfiiclvJvOqre6hsZTGSnHtmFLDU8TIM62G7ygEa1bI08lcuRwEnQ==} + '@typescript-eslint/type-utils@8.8.0': + resolution: {integrity: sha512-IKwJSS7bCqyCeG4NVGxnOP6lLT9Okc3Zj8hLO96bpMkJab+10HIfJbMouLrlpyOr3yrQ1cA413YPFiGd1mW9/Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -7251,12 +7282,12 @@ packages: typescript: optional: true - '@typescript-eslint/types@8.7.0': - resolution: {integrity: sha512-LLt4BLHFwSfASHSF2K29SZ+ZCsbQOM+LuarPjRUuHm+Qd09hSe3GCeaQbcCr+Mik+0QFRmep/FyZBO6fJ64U3w==} + '@typescript-eslint/types@8.8.0': + resolution: {integrity: sha512-QJwc50hRCgBd/k12sTykOJbESe1RrzmX6COk8Y525C9l7oweZ+1lw9JiU56im7Amm8swlz00DRIlxMYLizr2Vw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.7.0': - resolution: {integrity: sha512-MC8nmcGHsmfAKxwnluTQpNqceniT8SteVwd2voYlmiSWGOtjvGXdPl17dYu2797GVscK30Z04WRM28CrKS9WOg==} + '@typescript-eslint/typescript-estree@8.8.0': + resolution: {integrity: sha512-ZaMJwc/0ckLz5DaAZ+pNLmHv8AMVGtfWxZe/x2JVEkD5LnmhWiQMMcYT7IY7gkdJuzJ9P14fRy28lUrlDSWYdw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -7264,14 +7295,14 @@ packages: typescript: optional: true - '@typescript-eslint/utils@8.7.0': - resolution: {integrity: sha512-ZbdUdwsl2X/s3CiyAu3gOlfQzpbuG3nTWKPoIvAu1pu5r8viiJvv2NPN2AqArL35NCYtw/lrPPfM4gxrMLNLPw==} + '@typescript-eslint/utils@8.8.0': + resolution: {integrity: sha512-QE2MgfOTem00qrlPgyByaCHay9yb1+9BjnMFnSFkUKQfu7adBXDTnCAivURnuPPAG/qiB+kzKkZKmKfaMT0zVg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/visitor-keys@8.7.0': - resolution: {integrity: sha512-b1tx0orFCCh/THWPQa2ZwWzvOeyzzp36vkJYOpVg0u8UVOIsfVrnuC9FqAw9gRKn+rG2VmWQ/zDJZzkxUnj/XQ==} + '@typescript-eslint/visitor-keys@8.8.0': + resolution: {integrity: sha512-8mq51Lx6Hpmd7HnA2fcHQo3YgfX1qbccxQOgZcb4tvasu//zXRaA1j5ZRFeCw/VRAdFi4mRM9DnZw0Nu0Q2d1g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript/twoslash@3.1.0': @@ -7380,9 +7411,15 @@ packages: '@vue/compiler-core@3.5.10': resolution: {integrity: sha512-iXWlk+Cg/ag7gLvY0SfVucU8Kh2CjysYZjhhP70w9qI4MvSox4frrP+vDGvtQuzIcgD8+sxM6lZvCtdxGunTAA==} + '@vue/compiler-core@3.5.3': + resolution: {integrity: sha512-adAfy9boPkP233NTyvLbGEqVuIfK/R0ZsBsIOW4BZNfb4BRpRW41Do1u+ozJpsb+mdoy80O20IzAsHaihRb5qA==} + '@vue/compiler-dom@3.5.10': resolution: {integrity: sha512-DyxHC6qPcktwYGKOIy3XqnHRrrXyWR2u91AjP+nLkADko380srsC2DC3s7Y1Rk6YfOlxOlvEQKa9XXmLI+W4ZA==} + '@vue/compiler-dom@3.5.3': + resolution: {integrity: sha512-wnzFArg9zpvk/811CDOZOadJRugf1Bgl/TQ3RfV4nKfSPok4hi0w10ziYUQR6LnnBAUlEXYLUfZ71Oj9ds/+QA==} + '@vue/compiler-sfc@3.5.10': resolution: {integrity: sha512-to8E1BgpakV7224ZCm8gz1ZRSyjNCAWEplwFMWKlzCdP9DkMKhRRwt0WkCjY7jkzi/Vz3xgbpeig5Pnbly4Tow==} @@ -7423,6 +7460,9 @@ packages: '@vue/shared@3.5.10': resolution: {integrity: sha512-VkkBhU97Ki+XJ0xvl4C9YJsIZ2uIlQ7HqPpZOS3m9VCvmROPaChZU6DexdMJqvz9tbgG+4EtFVrSuailUq5KGQ==} + '@vue/shared@3.5.3': + resolution: {integrity: sha512-Jp2v8nylKBT+PlOUjun2Wp/f++TfJVFjshLzNtJDdmFJabJa7noGMncqXRM1vXGX+Yo2V7WykQFNxusSim8SCA==} + '@webcomponents/template-shadowroot@0.2.1': resolution: {integrity: sha512-fXL/vIUakyZL62hyvUh+EMwbVoTc0hksublmRz6ai6et8znHkJa6gtqMUZo1oc7dIz46exHSIImml9QTdknMHg==} @@ -7500,6 +7540,9 @@ packages: argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + aria-query@5.3.0: + resolution: {integrity: sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==} + aria-query@5.3.2: resolution: {integrity: sha512-COROpnaoap1E2F000S62r6A60uHZnmlvomhfyT2DlTcrY1OrBKn2UhH7qn5wTC9zMvD0AY7csdPSNwKP+7WiQw==} engines: {node: '>= 0.4'} @@ -7902,8 +7945,8 @@ packages: cssom@0.5.0: resolution: {integrity: sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==} - cssstyle@4.1.0: - resolution: {integrity: sha512-h66W1URKpBS5YMI/V8PyXvTMFT8SupJ1IzoIV8IeBC/ji8WVmrO8dGlTi+2dh6whmdk6BiKJLD/ZBkhWbcg6nA==} + cssstyle@4.0.1: + resolution: {integrity: sha512-8ZYiJ3A/3OkDd093CBT/0UKDWry7ak4BdPTFP2+QEP7cmhouyq/Up709ASSj2cK02BbZiMgk7kYjZNS4QP5qrQ==} engines: {node: '>=18'} csstype@3.1.3: @@ -8627,8 +8670,8 @@ packages: resolution: {integrity: sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==} engines: {node: '>= 14'} - https-proxy-agent@7.0.5: - resolution: {integrity: sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==} + https-proxy-agent@7.0.4: + resolution: {integrity: sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==} engines: {node: '>= 14'} human-id@1.0.2: @@ -9034,6 +9077,9 @@ packages: mdast-util-math@3.0.0: resolution: {integrity: sha512-Tl9GBNeG/AhJnQM221bJR2HPvLOSnLE/T9cJI9tlc6zwQk2nPk/4f0cHkOdEixQPC/j8UtKDdITswvLAy1OZ1w==} + mdast-util-mdx-expression@2.0.0: + resolution: {integrity: sha512-fGCu8eWdKUKNu5mohVGkhBXCXGnOTLuFqOvGMvdikr+J1w7lDJgxThOKpwRWzzbyXAU2hhSwsmssOY4yTokluw==} + mdast-util-mdx-expression@2.0.1: resolution: {integrity: sha512-J6f+9hUp+ldTZqKRSg7Vw5V6MqjATc+3E4gf3CFNcuZNWD8XdyI6zQ8GqH7f8169MM6P7hMBRDVGnn7oHB9kXQ==} @@ -10047,17 +10093,14 @@ packages: rfdc@1.4.1: resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==} - rollup@4.22.5: - resolution: {integrity: sha512-WoinX7GeQOFMGznEcWA1WrTQCd/tpEbMkc3nuMs9BT0CPjMdSjPMTVClwWd4pgSQwJdP65SK9mTCNvItlr5o7w==} + rollup@4.23.0: + resolution: {integrity: sha512-vXB4IT9/KLDrS2WRXmY22sVB2wTsTwkpxjB8Q3mnakTENcYw3FRmfdYDy/acNmls+lHmDazgrRjK/yQ6hQAtwA==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true rrweb-cssom@0.6.0: resolution: {integrity: sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==} - rrweb-cssom@0.7.1: - resolution: {integrity: sha512-TrEMa7JGdVm0UThDJSx7ddw5nVm3UJS9o9CCIZ72B1vSyEZoziDqBYP3XIoi/12lKrJR8rE3jeFHMok2F/Mnsg==} - run-applescript@7.0.0: resolution: {integrity: sha512-9by4Ij99JUr/MCFBUkDKLWK3G9HVXmabKz9U5MlIAIuvuzkiOicRYs8XJLxX+xahD+mLiiCYDqF9dKAgtzKP1A==} engines: {node: '>=18'} @@ -10132,9 +10175,9 @@ packages: setprototypeof@1.2.0: resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} - sharp@0.33.5: - resolution: {integrity: sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + sharp@0.33.3: + resolution: {integrity: sha512-vHUeXJU1UvlO/BNwTpT0x/r53WkLUVxrmb5JTgW92fdFCFk0ispLMAeu/jPO2vjkXM1fYUi3K7/qcLF47pwM1A==} + engines: {libvips: '>=8.15.2', node: ^18.17.0 || ^20.3.0 || >=21.0.0} shebang-command@1.2.0: resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} @@ -10219,6 +10262,10 @@ packages: peerDependencies: solid-js: ^1.3 + source-map-js@1.2.0: + resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==} + engines: {node: '>=0.10.0'} + source-map-js@1.2.1: resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} engines: {node: '>=0.10.0'} @@ -10494,41 +10541,41 @@ packages: tslib@2.1.0: resolution: {integrity: sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==} - tslib@2.7.0: - resolution: {integrity: sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==} + tslib@2.6.2: + resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} - turbo-darwin-64@2.1.2: - resolution: {integrity: sha512-3TEBxHWh99h2yIzkuIigMEOXt/ItYQp0aPiJjPd1xN4oDcsKK5AxiFKPH9pdtfIBzYsY59kQhZiFj0ELnSP7Bw==} + turbo-darwin-64@2.1.3: + resolution: {integrity: sha512-ouJOm0g0YyoBuhmikEujVCBGo3Zr0lbSOWFIsQtWUTItC88F2w2byhjtsYGPXQwMlTbXwmoBU2lOCfWNkeEwHQ==} cpu: [x64] os: [darwin] - turbo-darwin-arm64@2.1.2: - resolution: {integrity: sha512-he0miWNq2WxJzsH82jS2Z4MXpnkzn9SH8a79iPXiJkq25QREImucscM4RPasXm8wARp91pyysJMq6aasD45CeA==} + turbo-darwin-arm64@2.1.3: + resolution: {integrity: sha512-j2FOJsK4LAOtHQlb3Oom0yWB/Vi0nF1ljInr311mVzHoFAJRZtfW2fRvdZRb/lBUwjSp8be58qWHzANIcrA0OA==} cpu: [arm64] os: [darwin] - turbo-linux-64@2.1.2: - resolution: {integrity: sha512-fKUBcc0rK8Vdqv5a/E3CSpMBLG1bzwv+Q0Q83F8fG2ZfNCNKGbcEYABdonNZkkx141Rj03cZQFCgxu3MVEGU+A==} + turbo-linux-64@2.1.3: + resolution: {integrity: sha512-ubRHkI1gSel7H7wsmxKK8C9UlLWqg/2dkCC88LFupaK6TKgvBKqDqA0Z1M9C/escK0Jsle2k0H8bybV9OYIl4Q==} cpu: [x64] os: [linux] - turbo-linux-arm64@2.1.2: - resolution: {integrity: sha512-sV8Bpmm0WiuxgbhxymcC7wSsuxfBBieI98GegSwbr/bs1ANAgzCg93urIrdKdQ3/b31zZxQwcaP4FBF1wx1Qdg==} + turbo-linux-arm64@2.1.3: + resolution: {integrity: sha512-LffUL+e5wv7BtD6DgnM2kKOlDkMo2eRjhbAjVnrCD3wi2ug0tl6NDzajnHHjtaMyOnIf4AvzSKdLWsBxafGBQA==} cpu: [arm64] os: [linux] - turbo-windows-64@2.1.2: - resolution: {integrity: sha512-wcmIJZI9ORT9ykHGliFE6kWRQrlH930QGSjSgWC8uFChFFuOyUlvC7ttcxuSvU9VqC7NF4C+GVAcFJQ8lTjN7g==} + turbo-windows-64@2.1.3: + resolution: {integrity: sha512-S9SvcZZoaq5jKr6kA6eF7/xgQhVn8Vh7PVy5lono9zybvhyL4eY++y2PaLToIgL8G9IcbLmgOC73ExNjFBg9XQ==} cpu: [x64] os: [win32] - turbo-windows-arm64@2.1.2: - resolution: {integrity: sha512-zdnXjrhk7YO6CP+Q5wPueEvOCLH4lDa6C4rrwiakcWcPgcQGbVozJlo4uaQ6awo8HLWQEvOwu84RkWTdLAc/Hw==} + turbo-windows-arm64@2.1.3: + resolution: {integrity: sha512-twlEo8lRrGbrR6T/ZklUIquW3IlFCEtywklgVA81aIrSBm56+GEVpSrHhIlsx1hiYeSNrs+GpDwZGe+V7fvEVQ==} cpu: [arm64] os: [win32] - turbo@2.1.2: - resolution: {integrity: sha512-Jb0rbU4iHEVQ18An/YfakdIv9rKnd3zUfSE117EngrfWXFHo3RndVH96US3GsT8VHpwTncPePDBT2t06PaFLrw==} + turbo@2.1.3: + resolution: {integrity: sha512-lY0yj2GH2a2a3NExZ3rGe+rHUVeFE2aXuRAue57n+08E7Z7N7YCmynju0kPC1grAQzERmoLpKrmzmWd+PNiADw==} hasBin: true type-check@0.4.0: @@ -10559,8 +10606,8 @@ packages: typescript-auto-import-cache@0.3.3: resolution: {integrity: sha512-ojEC7+Ci1ij9eE6hp8Jl9VUNnsEKzztktP5gtYNRMrTmfXVwA1PITYYAkpxCvvupdSYa/Re51B6KMcv1CTZEUA==} - typescript-eslint@8.7.0: - resolution: {integrity: sha512-nEHbEYJyHwsuf7c3V3RS7Saq+1+la3i0ieR3qP0yjqWSzVmh8Drp47uOl9LjbPANac4S7EFSqvcYIKXUUwIfIQ==} + typescript-eslint@8.8.0: + resolution: {integrity: sha512-BjIT/VwJ8+0rVO01ZQ2ZVnjE1svFBiRczcpr1t1Yxt7sT25VSbPfrJtDsQ8uQTy2pilX5nI9gwxhUyLULNentw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -11019,8 +11066,8 @@ packages: resolution: {integrity: sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==} engines: {node: '>=18'} - ws@8.18.0: - resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} + ws@8.16.0: + resolution: {integrity: sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 @@ -11222,6 +11269,14 @@ snapshots: transitivePeerDependencies: - typescript + '@astrojs/node@8.3.3(astro@packages+astro)': + dependencies: + astro: link:packages/astro + send: 0.18.0 + server-destroy: 1.0.1 + transitivePeerDependencies: + - supports-color + '@astrojs/node@8.3.4(astro@packages+astro)': dependencies: astro: link:packages/astro @@ -11230,7 +11285,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@astrojs/node@9.0.0-beta.2(astro@packages+astro)': + '@astrojs/node@9.0.0-alpha.1(astro@packages+astro)': dependencies: astro: link:packages/astro send: 0.18.0 @@ -11970,9 +12025,9 @@ snapshots: '@emmetio/stream-reader@2.2.0': {} - '@emnapi/runtime@1.2.0': + '@emnapi/runtime@1.1.1': dependencies: - tslib: 2.7.0 + tslib: 2.6.2 optional: true '@esbuild/aix-ppc64@0.21.5': @@ -12165,79 +12220,79 @@ snapshots: '@humanwhocodes/retry@0.3.0': {} - '@img/sharp-darwin-arm64@0.33.5': + '@img/sharp-darwin-arm64@0.33.3': optionalDependencies: - '@img/sharp-libvips-darwin-arm64': 1.0.4 + '@img/sharp-libvips-darwin-arm64': 1.0.2 optional: true - '@img/sharp-darwin-x64@0.33.5': + '@img/sharp-darwin-x64@0.33.3': optionalDependencies: - '@img/sharp-libvips-darwin-x64': 1.0.4 + '@img/sharp-libvips-darwin-x64': 1.0.2 optional: true - '@img/sharp-libvips-darwin-arm64@1.0.4': + '@img/sharp-libvips-darwin-arm64@1.0.2': optional: true - '@img/sharp-libvips-darwin-x64@1.0.4': + '@img/sharp-libvips-darwin-x64@1.0.2': optional: true - '@img/sharp-libvips-linux-arm64@1.0.4': + '@img/sharp-libvips-linux-arm64@1.0.2': optional: true - '@img/sharp-libvips-linux-arm@1.0.5': + '@img/sharp-libvips-linux-arm@1.0.2': optional: true - '@img/sharp-libvips-linux-s390x@1.0.4': + '@img/sharp-libvips-linux-s390x@1.0.2': optional: true - '@img/sharp-libvips-linux-x64@1.0.4': + '@img/sharp-libvips-linux-x64@1.0.2': optional: true - '@img/sharp-libvips-linuxmusl-arm64@1.0.4': + '@img/sharp-libvips-linuxmusl-arm64@1.0.2': optional: true - '@img/sharp-libvips-linuxmusl-x64@1.0.4': + '@img/sharp-libvips-linuxmusl-x64@1.0.2': optional: true - '@img/sharp-linux-arm64@0.33.5': + '@img/sharp-linux-arm64@0.33.3': optionalDependencies: - '@img/sharp-libvips-linux-arm64': 1.0.4 + '@img/sharp-libvips-linux-arm64': 1.0.2 optional: true - '@img/sharp-linux-arm@0.33.5': + '@img/sharp-linux-arm@0.33.3': optionalDependencies: - '@img/sharp-libvips-linux-arm': 1.0.5 + '@img/sharp-libvips-linux-arm': 1.0.2 optional: true - '@img/sharp-linux-s390x@0.33.5': + '@img/sharp-linux-s390x@0.33.3': optionalDependencies: - '@img/sharp-libvips-linux-s390x': 1.0.4 + '@img/sharp-libvips-linux-s390x': 1.0.2 optional: true - '@img/sharp-linux-x64@0.33.5': + '@img/sharp-linux-x64@0.33.3': optionalDependencies: - '@img/sharp-libvips-linux-x64': 1.0.4 + '@img/sharp-libvips-linux-x64': 1.0.2 optional: true - '@img/sharp-linuxmusl-arm64@0.33.5': + '@img/sharp-linuxmusl-arm64@0.33.3': optionalDependencies: - '@img/sharp-libvips-linuxmusl-arm64': 1.0.4 + '@img/sharp-libvips-linuxmusl-arm64': 1.0.2 optional: true - '@img/sharp-linuxmusl-x64@0.33.5': + '@img/sharp-linuxmusl-x64@0.33.3': optionalDependencies: - '@img/sharp-libvips-linuxmusl-x64': 1.0.4 + '@img/sharp-libvips-linuxmusl-x64': 1.0.2 optional: true - '@img/sharp-wasm32@0.33.5': + '@img/sharp-wasm32@0.33.3': dependencies: - '@emnapi/runtime': 1.2.0 + '@emnapi/runtime': 1.1.1 optional: true - '@img/sharp-win32-ia32@0.33.5': + '@img/sharp-win32-ia32@0.33.3': optional: true - '@img/sharp-win32-x64@0.33.5': + '@img/sharp-win32-x64@0.33.3': optional: true '@isaacs/cliui@8.0.2': @@ -12268,21 +12323,21 @@ snapshots: '@jsdevtools/rehype-toc@3.0.2': {} - '@jsonjoy.com/base64@1.1.2(tslib@2.7.0)': + '@jsonjoy.com/base64@1.1.2(tslib@2.6.2)': dependencies: - tslib: 2.7.0 + tslib: 2.6.2 - '@jsonjoy.com/json-pack@1.0.4(tslib@2.7.0)': + '@jsonjoy.com/json-pack@1.0.4(tslib@2.6.2)': dependencies: - '@jsonjoy.com/base64': 1.1.2(tslib@2.7.0) - '@jsonjoy.com/util': 1.3.0(tslib@2.7.0) + '@jsonjoy.com/base64': 1.1.2(tslib@2.6.2) + '@jsonjoy.com/util': 1.3.0(tslib@2.6.2) hyperdyperid: 1.2.0 - thingies: 1.21.0(tslib@2.7.0) - tslib: 2.7.0 + thingies: 1.21.0(tslib@2.6.2) + tslib: 2.6.2 - '@jsonjoy.com/util@1.3.0(tslib@2.7.0)': + '@jsonjoy.com/util@1.3.0(tslib@2.6.2)': dependencies: - tslib: 2.7.0 + tslib: 2.6.2 '@libsql/client@0.14.0': dependencies: @@ -12320,7 +12375,7 @@ snapshots: '@libsql/isomorphic-ws@0.1.5': dependencies: '@types/ws': 8.5.10 - ws: 8.18.0 + ws: 8.16.0 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -12478,60 +12533,60 @@ snapshots: estree-walker: 2.0.2 picomatch: 2.3.1 - '@rollup/pluginutils@5.1.2(rollup@4.22.5)': + '@rollup/pluginutils@5.1.2(rollup@4.23.0)': dependencies: '@types/estree': 1.0.6 estree-walker: 2.0.2 picomatch: 2.3.1 optionalDependencies: - rollup: 4.22.5 + rollup: 4.23.0 - '@rollup/rollup-android-arm-eabi@4.22.5': + '@rollup/rollup-android-arm-eabi@4.23.0': optional: true - '@rollup/rollup-android-arm64@4.22.5': + '@rollup/rollup-android-arm64@4.23.0': optional: true - '@rollup/rollup-darwin-arm64@4.22.5': + '@rollup/rollup-darwin-arm64@4.23.0': optional: true - '@rollup/rollup-darwin-x64@4.22.5': + '@rollup/rollup-darwin-x64@4.23.0': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.22.5': + '@rollup/rollup-linux-arm-gnueabihf@4.23.0': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.22.5': + '@rollup/rollup-linux-arm-musleabihf@4.23.0': optional: true - '@rollup/rollup-linux-arm64-gnu@4.22.5': + '@rollup/rollup-linux-arm64-gnu@4.23.0': optional: true - '@rollup/rollup-linux-arm64-musl@4.22.5': + '@rollup/rollup-linux-arm64-musl@4.23.0': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.22.5': + '@rollup/rollup-linux-powerpc64le-gnu@4.23.0': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.22.5': + '@rollup/rollup-linux-riscv64-gnu@4.23.0': optional: true - '@rollup/rollup-linux-s390x-gnu@4.22.5': + '@rollup/rollup-linux-s390x-gnu@4.23.0': optional: true - '@rollup/rollup-linux-x64-gnu@4.22.5': + '@rollup/rollup-linux-x64-gnu@4.23.0': optional: true - '@rollup/rollup-linux-x64-musl@4.22.5': + '@rollup/rollup-linux-x64-musl@4.23.0': optional: true - '@rollup/rollup-win32-arm64-msvc@4.22.5': + '@rollup/rollup-win32-arm64-msvc@4.23.0': optional: true - '@rollup/rollup-win32-ia32-msvc@4.22.5': + '@rollup/rollup-win32-ia32-msvc@4.23.0': optional: true - '@rollup/rollup-win32-x64-msvc@4.22.5': + '@rollup/rollup-win32-x64-msvc@4.23.0': optional: true '@shikijs/core@1.21.0': @@ -12664,6 +12719,8 @@ snapshots: dependencies: '@types/estree': 1.0.6 + '@types/estree@1.0.5': {} + '@types/estree@1.0.6': {} '@types/express-serve-static-core@4.19.0': @@ -12814,14 +12871,14 @@ snapshots: '@types/yargs-parser@21.0.3': {} - '@typescript-eslint/eslint-plugin@8.7.0(@typescript-eslint/parser@8.7.0(eslint@9.11.1(jiti@1.21.0))(typescript@5.6.2))(eslint@9.11.1(jiti@1.21.0))(typescript@5.6.2)': + '@typescript-eslint/eslint-plugin@8.8.0(@typescript-eslint/parser@8.8.0(eslint@9.11.1(jiti@1.21.0))(typescript@5.6.2))(eslint@9.11.1(jiti@1.21.0))(typescript@5.6.2)': dependencies: '@eslint-community/regexpp': 4.11.0 - '@typescript-eslint/parser': 8.7.0(eslint@9.11.1(jiti@1.21.0))(typescript@5.6.2) - '@typescript-eslint/scope-manager': 8.7.0 - '@typescript-eslint/type-utils': 8.7.0(eslint@9.11.1(jiti@1.21.0))(typescript@5.6.2) - '@typescript-eslint/utils': 8.7.0(eslint@9.11.1(jiti@1.21.0))(typescript@5.6.2) - '@typescript-eslint/visitor-keys': 8.7.0 + '@typescript-eslint/parser': 8.8.0(eslint@9.11.1(jiti@1.21.0))(typescript@5.6.2) + '@typescript-eslint/scope-manager': 8.8.0 + '@typescript-eslint/type-utils': 8.8.0(eslint@9.11.1(jiti@1.21.0))(typescript@5.6.2) + '@typescript-eslint/utils': 8.8.0(eslint@9.11.1(jiti@1.21.0))(typescript@5.6.2) + '@typescript-eslint/visitor-keys': 8.8.0 eslint: 9.11.1(jiti@1.21.0) graphemer: 1.4.0 ignore: 5.3.1 @@ -12832,12 +12889,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.7.0(eslint@9.11.1(jiti@1.21.0))(typescript@5.6.2)': + '@typescript-eslint/parser@8.8.0(eslint@9.11.1(jiti@1.21.0))(typescript@5.6.2)': dependencies: - '@typescript-eslint/scope-manager': 8.7.0 - '@typescript-eslint/types': 8.7.0 - '@typescript-eslint/typescript-estree': 8.7.0(typescript@5.6.2) - '@typescript-eslint/visitor-keys': 8.7.0 + '@typescript-eslint/scope-manager': 8.8.0 + '@typescript-eslint/types': 8.8.0 + '@typescript-eslint/typescript-estree': 8.8.0(typescript@5.6.2) + '@typescript-eslint/visitor-keys': 8.8.0 debug: 4.3.7 eslint: 9.11.1(jiti@1.21.0) optionalDependencies: @@ -12845,15 +12902,15 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.7.0': + '@typescript-eslint/scope-manager@8.8.0': dependencies: - '@typescript-eslint/types': 8.7.0 - '@typescript-eslint/visitor-keys': 8.7.0 + '@typescript-eslint/types': 8.8.0 + '@typescript-eslint/visitor-keys': 8.8.0 - '@typescript-eslint/type-utils@8.7.0(eslint@9.11.1(jiti@1.21.0))(typescript@5.6.2)': + '@typescript-eslint/type-utils@8.8.0(eslint@9.11.1(jiti@1.21.0))(typescript@5.6.2)': dependencies: - '@typescript-eslint/typescript-estree': 8.7.0(typescript@5.6.2) - '@typescript-eslint/utils': 8.7.0(eslint@9.11.1(jiti@1.21.0))(typescript@5.6.2) + '@typescript-eslint/typescript-estree': 8.8.0(typescript@5.6.2) + '@typescript-eslint/utils': 8.8.0(eslint@9.11.1(jiti@1.21.0))(typescript@5.6.2) debug: 4.3.7 ts-api-utils: 1.3.0(typescript@5.6.2) optionalDependencies: @@ -12862,12 +12919,12 @@ snapshots: - eslint - supports-color - '@typescript-eslint/types@8.7.0': {} + '@typescript-eslint/types@8.8.0': {} - '@typescript-eslint/typescript-estree@8.7.0(typescript@5.6.2)': + '@typescript-eslint/typescript-estree@8.8.0(typescript@5.6.2)': dependencies: - '@typescript-eslint/types': 8.7.0 - '@typescript-eslint/visitor-keys': 8.7.0 + '@typescript-eslint/types': 8.8.0 + '@typescript-eslint/visitor-keys': 8.8.0 debug: 4.3.7 fast-glob: 3.3.2 is-glob: 4.0.3 @@ -12879,20 +12936,20 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.7.0(eslint@9.11.1(jiti@1.21.0))(typescript@5.6.2)': + '@typescript-eslint/utils@8.8.0(eslint@9.11.1(jiti@1.21.0))(typescript@5.6.2)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.11.1(jiti@1.21.0)) - '@typescript-eslint/scope-manager': 8.7.0 - '@typescript-eslint/types': 8.7.0 - '@typescript-eslint/typescript-estree': 8.7.0(typescript@5.6.2) + '@typescript-eslint/scope-manager': 8.8.0 + '@typescript-eslint/types': 8.8.0 + '@typescript-eslint/typescript-estree': 8.8.0(typescript@5.6.2) eslint: 9.11.1(jiti@1.21.0) transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/visitor-keys@8.7.0': + '@typescript-eslint/visitor-keys@8.8.0': dependencies: - '@typescript-eslint/types': 8.7.0 + '@typescript-eslint/types': 8.8.0 eslint-visitor-keys: 3.4.3 '@typescript/twoslash@3.1.0': @@ -13068,13 +13125,26 @@ snapshots: '@vue/shared': 3.5.10 entities: 4.5.0 estree-walker: 2.0.2 - source-map-js: 1.2.1 + source-map-js: 1.2.0 + + '@vue/compiler-core@3.5.3': + dependencies: + '@babel/parser': 7.25.4 + '@vue/shared': 3.5.3 + entities: 4.5.0 + estree-walker: 2.0.2 + source-map-js: 1.2.0 '@vue/compiler-dom@3.5.10': dependencies: '@vue/compiler-core': 3.5.10 '@vue/shared': 3.5.10 + '@vue/compiler-dom@3.5.3': + dependencies: + '@vue/compiler-core': 3.5.3 + '@vue/shared': 3.5.3 + '@vue/compiler-sfc@3.5.10': dependencies: '@babel/parser': 7.25.4 @@ -13085,7 +13155,7 @@ snapshots: estree-walker: 2.0.2 magic-string: 0.30.11 postcss: 8.4.47 - source-map-js: 1.2.1 + source-map-js: 1.2.0 '@vue/compiler-ssr@3.5.10': dependencies: @@ -13148,6 +13218,8 @@ snapshots: '@vue/shared@3.5.10': {} + '@vue/shared@3.5.3': {} + '@webcomponents/template-shadowroot@0.2.1': {} accepts@1.3.8: @@ -13224,6 +13296,10 @@ snapshots: argparse@2.0.1: {} + aria-query@5.3.0: + dependencies: + dequal: 2.0.3 + aria-query@5.3.2: {} array-iterate@2.0.1: {} @@ -13625,12 +13701,12 @@ snapshots: css-tree@2.2.1: dependencies: mdn-data: 2.0.28 - source-map-js: 1.2.1 + source-map-js: 1.2.0 css-tree@2.3.1: dependencies: mdn-data: 2.0.30 - source-map-js: 1.2.1 + source-map-js: 1.2.0 css-what@6.1.0: {} @@ -13644,9 +13720,9 @@ snapshots: cssom@0.5.0: {} - cssstyle@4.1.0: + cssstyle@4.0.1: dependencies: - rrweb-cssom: 0.7.1 + rrweb-cssom: 0.6.0 csstype@3.1.3: {} @@ -13980,7 +14056,7 @@ snapshots: estree-walker@3.0.3: dependencies: - '@types/estree': 1.0.6 + '@types/estree': 1.0.5 esutils@2.0.3: {} @@ -14439,7 +14515,7 @@ snapshots: transitivePeerDependencies: - supports-color - https-proxy-agent@7.0.5: + https-proxy-agent@7.0.4: dependencies: agent-base: 7.1.1 debug: 4.3.7 @@ -14578,13 +14654,13 @@ snapshots: jsdom@23.2.0: dependencies: '@asamuzakjp/dom-selector': 2.0.2 - cssstyle: 4.1.0 + cssstyle: 4.0.1 data-urls: 5.0.0 decimal.js: 10.4.3 form-data: 4.0.0 html-encoding-sniffer: 4.0.0 http-proxy-agent: 7.0.2 - https-proxy-agent: 7.0.5 + https-proxy-agent: 7.0.4 is-potential-custom-element-name: 1.0.1 parse5: 7.1.2 rrweb-cssom: 0.6.0 @@ -14596,7 +14672,7 @@ snapshots: whatwg-encoding: 3.1.1 whatwg-mimetype: 4.0.0 whatwg-url: 14.0.0 - ws: 8.18.0 + ws: 8.16.0 xml-name-validator: 5.0.0 transitivePeerDependencies: - bufferutil @@ -14754,7 +14830,7 @@ snapshots: lower-case@2.0.2: dependencies: - tslib: 2.7.0 + tslib: 2.6.2 lru-cache@10.2.0: {} @@ -14781,7 +14857,7 @@ snapshots: dependencies: '@babel/parser': 7.25.4 '@babel/types': 7.25.6 - source-map-js: 1.2.1 + source-map-js: 1.2.0 manage-path@2.0.0: {} @@ -14906,6 +14982,17 @@ snapshots: transitivePeerDependencies: - supports-color + mdast-util-mdx-expression@2.0.0: + dependencies: + '@types/estree-jsx': 1.0.5 + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + devlop: 1.1.0 + mdast-util-from-markdown: 2.0.0 + mdast-util-to-markdown: 2.1.0 + transitivePeerDependencies: + - supports-color + mdast-util-mdx-expression@2.0.1: dependencies: '@types/estree-jsx': 1.0.5 @@ -14937,7 +15024,7 @@ snapshots: mdast-util-mdx@3.0.0: dependencies: mdast-util-from-markdown: 2.0.0 - mdast-util-mdx-expression: 2.0.1 + mdast-util-mdx-expression: 2.0.0 mdast-util-mdx-jsx: 3.1.3 mdast-util-mdxjs-esm: 2.0.1 mdast-util-to-markdown: 2.1.0 @@ -15005,10 +15092,10 @@ snapshots: memfs@4.12.0: dependencies: - '@jsonjoy.com/json-pack': 1.0.4(tslib@2.7.0) - '@jsonjoy.com/util': 1.3.0(tslib@2.7.0) - tree-dump: 1.0.1(tslib@2.7.0) - tslib: 2.7.0 + '@jsonjoy.com/json-pack': 1.0.4(tslib@2.6.2) + '@jsonjoy.com/util': 1.3.0(tslib@2.6.2) + tree-dump: 1.0.1(tslib@2.6.2) + tslib: 2.6.2 merge-anything@5.1.7: dependencies: @@ -15385,7 +15472,7 @@ snapshots: no-case@3.0.4: dependencies: lower-case: 2.0.2 - tslib: 2.7.0 + tslib: 2.6.2 node-domexception@1.0.0: {} @@ -15584,7 +15671,7 @@ snapshots: pascal-case@3.1.2: dependencies: no-case: 3.0.4 - tslib: 2.7.0 + tslib: 2.6.2 path-browserify@1.0.1: {} @@ -16210,32 +16297,30 @@ snapshots: rfdc@1.4.1: {} - rollup@4.22.5: + rollup@4.23.0: dependencies: '@types/estree': 1.0.6 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.22.5 - '@rollup/rollup-android-arm64': 4.22.5 - '@rollup/rollup-darwin-arm64': 4.22.5 - '@rollup/rollup-darwin-x64': 4.22.5 - '@rollup/rollup-linux-arm-gnueabihf': 4.22.5 - '@rollup/rollup-linux-arm-musleabihf': 4.22.5 - '@rollup/rollup-linux-arm64-gnu': 4.22.5 - '@rollup/rollup-linux-arm64-musl': 4.22.5 - '@rollup/rollup-linux-powerpc64le-gnu': 4.22.5 - '@rollup/rollup-linux-riscv64-gnu': 4.22.5 - '@rollup/rollup-linux-s390x-gnu': 4.22.5 - '@rollup/rollup-linux-x64-gnu': 4.22.5 - '@rollup/rollup-linux-x64-musl': 4.22.5 - '@rollup/rollup-win32-arm64-msvc': 4.22.5 - '@rollup/rollup-win32-ia32-msvc': 4.22.5 - '@rollup/rollup-win32-x64-msvc': 4.22.5 + '@rollup/rollup-android-arm-eabi': 4.23.0 + '@rollup/rollup-android-arm64': 4.23.0 + '@rollup/rollup-darwin-arm64': 4.23.0 + '@rollup/rollup-darwin-x64': 4.23.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.23.0 + '@rollup/rollup-linux-arm-musleabihf': 4.23.0 + '@rollup/rollup-linux-arm64-gnu': 4.23.0 + '@rollup/rollup-linux-arm64-musl': 4.23.0 + '@rollup/rollup-linux-powerpc64le-gnu': 4.23.0 + '@rollup/rollup-linux-riscv64-gnu': 4.23.0 + '@rollup/rollup-linux-s390x-gnu': 4.23.0 + '@rollup/rollup-linux-x64-gnu': 4.23.0 + '@rollup/rollup-linux-x64-musl': 4.23.0 + '@rollup/rollup-win32-arm64-msvc': 4.23.0 + '@rollup/rollup-win32-ia32-msvc': 4.23.0 + '@rollup/rollup-win32-x64-msvc': 4.23.0 fsevents: 2.3.3 rrweb-cssom@0.6.0: {} - rrweb-cssom@0.7.1: {} - run-applescript@7.0.0: {} run-parallel@1.2.0: @@ -16256,7 +16341,7 @@ snapshots: dependencies: chokidar: 4.0.1 immutable: 4.3.5 - source-map-js: 1.2.1 + source-map-js: 1.2.0 sax@1.3.0: {} @@ -16326,31 +16411,31 @@ snapshots: setprototypeof@1.2.0: {} - sharp@0.33.5: + sharp@0.33.3: dependencies: color: 4.2.3 detect-libc: 2.0.3 semver: 7.6.3 optionalDependencies: - '@img/sharp-darwin-arm64': 0.33.5 - '@img/sharp-darwin-x64': 0.33.5 - '@img/sharp-libvips-darwin-arm64': 1.0.4 - '@img/sharp-libvips-darwin-x64': 1.0.4 - '@img/sharp-libvips-linux-arm': 1.0.5 - '@img/sharp-libvips-linux-arm64': 1.0.4 - '@img/sharp-libvips-linux-s390x': 1.0.4 - '@img/sharp-libvips-linux-x64': 1.0.4 - '@img/sharp-libvips-linuxmusl-arm64': 1.0.4 - '@img/sharp-libvips-linuxmusl-x64': 1.0.4 - '@img/sharp-linux-arm': 0.33.5 - '@img/sharp-linux-arm64': 0.33.5 - '@img/sharp-linux-s390x': 0.33.5 - '@img/sharp-linux-x64': 0.33.5 - '@img/sharp-linuxmusl-arm64': 0.33.5 - '@img/sharp-linuxmusl-x64': 0.33.5 - '@img/sharp-wasm32': 0.33.5 - '@img/sharp-win32-ia32': 0.33.5 - '@img/sharp-win32-x64': 0.33.5 + '@img/sharp-darwin-arm64': 0.33.3 + '@img/sharp-darwin-x64': 0.33.3 + '@img/sharp-libvips-darwin-arm64': 1.0.2 + '@img/sharp-libvips-darwin-x64': 1.0.2 + '@img/sharp-libvips-linux-arm': 1.0.2 + '@img/sharp-libvips-linux-arm64': 1.0.2 + '@img/sharp-libvips-linux-s390x': 1.0.2 + '@img/sharp-libvips-linux-x64': 1.0.2 + '@img/sharp-libvips-linuxmusl-arm64': 1.0.2 + '@img/sharp-libvips-linuxmusl-x64': 1.0.2 + '@img/sharp-linux-arm': 0.33.3 + '@img/sharp-linux-arm64': 0.33.3 + '@img/sharp-linux-s390x': 0.33.3 + '@img/sharp-linux-x64': 0.33.3 + '@img/sharp-linuxmusl-arm64': 0.33.3 + '@img/sharp-linuxmusl-x64': 0.33.3 + '@img/sharp-wasm32': 0.33.3 + '@img/sharp-win32-ia32': 0.33.3 + '@img/sharp-win32-x64': 0.33.3 shebang-command@1.2.0: dependencies: @@ -16449,6 +16534,8 @@ snapshots: transitivePeerDependencies: - supports-color + source-map-js@1.2.0: {} + source-map-js@1.2.1: {} source-map@0.6.1: {} @@ -16584,9 +16671,9 @@ snapshots: '@ampproject/remapping': 2.3.0 '@jridgewell/sourcemap-codec': 1.5.0 '@jridgewell/trace-mapping': 0.3.25 - '@types/estree': 1.0.6 + '@types/estree': 1.0.5 acorn: 8.12.1 - aria-query: 5.3.2 + aria-query: 5.3.0 axobject-query: 4.1.0 code-red: 1.0.4 css-tree: 2.3.1 @@ -16663,9 +16750,9 @@ snapshots: dependencies: any-promise: 1.3.0 - thingies@1.21.0(tslib@2.7.0): + thingies@1.21.0(tslib@2.6.2): dependencies: - tslib: 2.7.0 + tslib: 2.6.2 timestring@6.0.0: {} @@ -16708,9 +16795,9 @@ snapshots: dependencies: punycode: 2.3.1 - tree-dump@1.0.1(tslib@2.7.0): + tree-dump@1.0.1(tslib@2.6.2): dependencies: - tslib: 2.7.0 + tslib: 2.6.2 trim-lines@3.0.1: {} @@ -16728,34 +16815,34 @@ snapshots: tslib@2.1.0: {} - tslib@2.7.0: {} + tslib@2.6.2: {} - turbo-darwin-64@2.1.2: + turbo-darwin-64@2.1.3: optional: true - turbo-darwin-arm64@2.1.2: + turbo-darwin-arm64@2.1.3: optional: true - turbo-linux-64@2.1.2: + turbo-linux-64@2.1.3: optional: true - turbo-linux-arm64@2.1.2: + turbo-linux-arm64@2.1.3: optional: true - turbo-windows-64@2.1.2: + turbo-windows-64@2.1.3: optional: true - turbo-windows-arm64@2.1.2: + turbo-windows-arm64@2.1.3: optional: true - turbo@2.1.2: + turbo@2.1.3: optionalDependencies: - turbo-darwin-64: 2.1.2 - turbo-darwin-arm64: 2.1.2 - turbo-linux-64: 2.1.2 - turbo-linux-arm64: 2.1.2 - turbo-windows-64: 2.1.2 - turbo-windows-arm64: 2.1.2 + turbo-darwin-64: 2.1.3 + turbo-darwin-arm64: 2.1.3 + turbo-linux-64: 2.1.3 + turbo-linux-arm64: 2.1.3 + turbo-windows-64: 2.1.3 + turbo-windows-arm64: 2.1.3 type-check@0.4.0: dependencies: @@ -16784,11 +16871,11 @@ snapshots: dependencies: semver: 7.6.3 - typescript-eslint@8.7.0(eslint@9.11.1(jiti@1.21.0))(typescript@5.6.2): + typescript-eslint@8.8.0(eslint@9.11.1(jiti@1.21.0))(typescript@5.6.2): dependencies: - '@typescript-eslint/eslint-plugin': 8.7.0(@typescript-eslint/parser@8.7.0(eslint@9.11.1(jiti@1.21.0))(typescript@5.6.2))(eslint@9.11.1(jiti@1.21.0))(typescript@5.6.2) - '@typescript-eslint/parser': 8.7.0(eslint@9.11.1(jiti@1.21.0))(typescript@5.6.2) - '@typescript-eslint/utils': 8.7.0(eslint@9.11.1(jiti@1.21.0))(typescript@5.6.2) + '@typescript-eslint/eslint-plugin': 8.8.0(@typescript-eslint/parser@8.8.0(eslint@9.11.1(jiti@1.21.0))(typescript@5.6.2))(eslint@9.11.1(jiti@1.21.0))(typescript@5.6.2) + '@typescript-eslint/parser': 8.8.0(eslint@9.11.1(jiti@1.21.0))(typescript@5.6.2) + '@typescript-eslint/utils': 8.8.0(eslint@9.11.1(jiti@1.21.0))(typescript@5.6.2) optionalDependencies: typescript: 5.6.2 transitivePeerDependencies: @@ -16964,10 +17051,10 @@ snapshots: - supports-color - terser - vite-plugin-inspect@0.8.7(rollup@4.22.5)(vite@6.0.0-beta.2(@types/node@18.19.31)(sass@1.79.4)): + vite-plugin-inspect@0.8.7(rollup@4.23.0)(vite@6.0.0-beta.2(@types/node@18.19.31)(sass@1.79.4)): dependencies: '@antfu/utils': 0.7.10 - '@rollup/pluginutils': 5.1.2(rollup@4.22.5) + '@rollup/pluginutils': 5.1.2(rollup@4.23.0) debug: 4.3.7 error-stack-parser-es: 0.1.5 fs-extra: 11.2.0 @@ -16993,7 +17080,7 @@ snapshots: transitivePeerDependencies: - supports-color - vite-plugin-vue-devtools@7.4.6(rollup@4.22.5)(vite@6.0.0-beta.2(@types/node@18.19.31)(sass@1.79.4))(vue@3.5.10(typescript@5.6.2)): + vite-plugin-vue-devtools@7.4.6(rollup@4.23.0)(vite@6.0.0-beta.2(@types/node@18.19.31)(sass@1.79.4))(vue@3.5.10(typescript@5.6.2)): dependencies: '@vue/devtools-core': 7.4.6(vite@6.0.0-beta.2(@types/node@18.19.31)(sass@1.79.4))(vue@3.5.10(typescript@5.6.2)) '@vue/devtools-kit': 7.4.6 @@ -17001,7 +17088,7 @@ snapshots: execa: 8.0.1 sirv: 2.0.4 vite: 6.0.0-beta.2(@types/node@18.19.31)(sass@1.79.4) - vite-plugin-inspect: 0.8.7(rollup@4.22.5)(vite@6.0.0-beta.2(@types/node@18.19.31)(sass@1.79.4)) + vite-plugin-inspect: 0.8.7(rollup@4.23.0)(vite@6.0.0-beta.2(@types/node@18.19.31)(sass@1.79.4)) vite-plugin-vue-inspector: 5.2.0(vite@6.0.0-beta.2(@types/node@18.19.31)(sass@1.79.4)) transitivePeerDependencies: - '@nuxt/kit' @@ -17017,7 +17104,7 @@ snapshots: '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.25.2) '@babel/plugin-transform-typescript': 7.24.7(@babel/core@7.25.2) '@vue/babel-plugin-jsx': 1.2.2(@babel/core@7.25.2) - '@vue/compiler-dom': 3.5.10 + '@vue/compiler-dom': 3.5.3 kolorist: 1.8.0 magic-string: 0.30.11 vite: 6.0.0-beta.2(@types/node@18.19.31)(sass@1.79.4) @@ -17033,7 +17120,7 @@ snapshots: dependencies: esbuild: 0.24.0 postcss: 8.4.47 - rollup: 4.22.5 + rollup: 4.23.0 optionalDependencies: '@types/node': 18.19.31 fsevents: 2.3.3 @@ -17281,7 +17368,7 @@ snapshots: string-width: 7.2.0 strip-ansi: 7.1.0 - ws@8.18.0: {} + ws@8.16.0: {} xml-name-validator@5.0.0: {}