diff --git a/.changeset/strong-stingrays-provide.md b/.changeset/strong-stingrays-provide.md new file mode 100644 index 0000000000..a98fea0f8d --- /dev/null +++ b/.changeset/strong-stingrays-provide.md @@ -0,0 +1,9 @@ +--- +'@astrojs/solid-js': patch +'@astrojs/vue': patch +'@astrojs/svelte': patch +'@astrojs/react': patch +'@astrojs/preact': patch +--- + +Resolve `vite` peer dependency problem for strict package managers like **Yarn in PnP mode**. diff --git a/.github/scripts/announce.mjs b/.github/scripts/announce.mjs index 346e0f112b..2e05a7ae8a 100755 --- a/.github/scripts/announce.mjs +++ b/.github/scripts/announce.mjs @@ -1,6 +1,6 @@ -import { globby as glob } from 'globby'; -import { fileURLToPath } from 'node:url'; import { readFile } from 'node:fs/promises'; +import { fileURLToPath } from 'node:url'; +import { globby as glob } from 'globby'; import { setOutput } from './utils.mjs'; const { GITHUB_REF = 'main' } = process.env; @@ -18,34 +18,34 @@ const descriptors = [ 'updates', ]; const verbs = [ - "just went out!", - "just launched!", - "now available!", - "in the wild!", - "now live!", - "hit the registry!", - "to share!", - "for you!", - "for y’all! 🤠", - "comin’ your way!", - "comin’ atcha!", - "comin’ in hot!", - "freshly minted on the blockchain! (jk)", - "[is] out (now with 100% more reticulated splines!)", - "(as seen on TV!)", - "just dropped!", - "– artisanally hand-crafted just for you.", - "– oh happy day!", - "– enjoy!", - "now out. Be the first on your block to download!", - "made with love 💕", - "[is] out! Our best [version] yet!", - "[is] here. DOWNLOAD! DOWNLOAD! DOWNLOAD!", - "... HUZZAH!", - "[has] landed!", - "landed! The internet just got a little more fun.", - "– from our family to yours.", - "– go forth and build!" + 'just went out!', + 'just launched!', + 'now available!', + 'in the wild!', + 'now live!', + 'hit the registry!', + 'to share!', + 'for you!', + 'for y’all! 🤠', + 'comin’ your way!', + 'comin’ atcha!', + 'comin’ in hot!', + 'freshly minted on the blockchain! (jk)', + '[is] out (now with 100% more reticulated splines!)', + '(as seen on TV!)', + 'just dropped!', + '– artisanally hand-crafted just for you.', + '– oh happy day!', + '– enjoy!', + 'now out. Be the first on your block to download!', + 'made with love 💕', + '[is] out! Our best [version] yet!', + '[is] here. DOWNLOAD! DOWNLOAD! DOWNLOAD!', + '... HUZZAH!', + '[has] landed!', + 'landed! The internet just got a little more fun.', + '– from our family to yours.', + '– go forth and build!', ]; const extraVerbs = [ 'new', @@ -72,7 +72,7 @@ const plurals = new Map([ function pluralize(text) { return text.replace(/(\[([^\]]+)\])/gm, (_, _full, match) => - plurals.has(match) ? plurals.get(match) : `${match}s` + plurals.has(match) ? plurals.get(match) : `${match}s`, ); } @@ -91,7 +91,7 @@ async function generatePackageMap() { const pkgFile = fileURLToPath(new URL(pkg, packageRoot)); const content = await readFile(pkgFile).then((res) => JSON.parse(res.toString())); packageMap.set(content.name, `./packages/${pkg.replace('/package.json', '')}`); - }) + }), ); } @@ -110,7 +110,7 @@ async function generateMessage() { version, url: new URL(`${p}/CHANGELOG.md#${version.replace(/\./g, '')}`, baseUrl).toString(), }; - }) + }), ); const emoji = item(emojis); @@ -122,7 +122,7 @@ async function generateMessage() { if (packages.length === 1) { const { name, version, url } = packages[0]; message += `${emoji} \`${name}@${version}\` ${singularlize( - verb + verb, )}\nRead the [release notes →](<${url}>)\n`; } else { message += `${emoji} Some ${descriptor} ${pluralize(verb)}\n\n`; diff --git a/.github/scripts/bundle-size.mjs b/.github/scripts/bundle-size.mjs index 690d6e9284..76d6b3f297 100644 --- a/.github/scripts/bundle-size.mjs +++ b/.github/scripts/bundle-size.mjs @@ -1,18 +1,18 @@ -import { build } from 'esbuild'; import { existsSync } from 'node:fs'; +import { build } from 'esbuild'; const CLIENT_RUNTIME_PATH = 'packages/astro/src/runtime/client/'; function formatBytes(bytes, decimals = 2) { - if (bytes === 0) return '0 B'; + if (bytes === 0) return '0 B'; - const k = 1024; - const dm = decimals < 0 ? 0 : decimals; - const sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; + const k = 1024; + const dm = decimals < 0 ? 0 : decimals; + const sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; - const i = Math.floor(Math.log(bytes) / Math.log(k)); + const i = Math.floor(Math.log(bytes) / Math.log(k)); - return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i]; + return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i]; } export default async function checkBundleSize({ github, context }) { @@ -24,7 +24,7 @@ export default async function checkBundleSize({ github, context }) { pull_number: PR_NUM, }); const clientRuntimeFiles = files.filter((file) => { - return file.filename.startsWith(CLIENT_RUNTIME_PATH) && file.status !== 'removed' + return file.filename.startsWith(CLIENT_RUNTIME_PATH) && file.status !== 'removed'; }); if (clientRuntimeFiles.length === 0) return; @@ -35,17 +35,24 @@ export default async function checkBundleSize({ github, context }) { const output = await bundle(clientRuntimeFiles); for (let [filename, { oldSize, newSize, sourceFile }] of Object.entries(output)) { - filename = ['idle', 'load', 'media', 'only', 'visible'].includes(filename) ? `client:${filename}` : filename; - const prefix = (newSize - oldSize) === 0 ? '' : (newSize - oldSize) > 0 ? '+ ' : '- '; + filename = ['idle', 'load', 'media', 'only', 'visible'].includes(filename) + ? `client:${filename}` + : filename; + const prefix = newSize - oldSize === 0 ? '' : newSize - oldSize > 0 ? '+ ' : '- '; const change = `${prefix}${formatBytes(newSize - oldSize)}`; - table.push(`| [\`${filename}\`](https://github.com/${context.repo.owner}/${context.repo.repo}/tree/${context.payload.pull_request.head.ref}/${sourceFile}) | ${formatBytes(oldSize)} | ${formatBytes(newSize)} | ${change} |`); + table.push( + `| [\`${filename}\`](https://github.com/${context.repo.owner}/${context.repo.repo}/tree/${context.payload.pull_request.head.ref}/${sourceFile}) | ${formatBytes(oldSize)} | ${formatBytes(newSize)} | ${change} |`, + ); } const { data: comments } = await github.rest.issues.listComments({ ...context.repo, - issue_number: PR_NUM - }) - const comment = comments.find(comment => comment.user.login === 'github-actions[bot]' && comment.body.includes('Bundle Size Check')); + issue_number: PR_NUM, + }); + const comment = comments.find( + (comment) => + comment.user.login === 'github-actions[bot]' && comment.body.includes('Bundle Size Check'), + ); const method = comment ? 'updateComment' : 'createComment'; const payload = comment ? { comment_id: comment.id } : { issue_number: PR_NUM }; await github.rest.issues[method]({ @@ -60,9 +67,11 @@ ${table.join('\n')}`, } async function bundle(files) { - const { metafile } = await build({ - entryPoints: [...files.map(({ filename }) => filename), ...files.map(({ filename }) => `main/${filename}`).filter(f => existsSync(f))], + entryPoints: [ + ...files.map(({ filename }) => filename), + ...files.map(({ filename }) => `main/${filename}`).filter((f) => existsSync(f)), + ], bundle: true, minify: true, sourcemap: false, @@ -70,17 +79,24 @@ async function bundle(files) { outdir: 'out', external: ['astro:*', 'aria-query', 'axobject-query'], metafile: true, - }) + }); return Object.entries(metafile.outputs).reduce((acc, [filename, info]) => { filename = filename.slice('out/'.length); if (filename.startsWith('main/')) { filename = filename.slice('main/'.length).replace(CLIENT_RUNTIME_PATH, '').replace('.js', ''); const oldSize = info.bytes; - return Object.assign(acc, { [filename]: Object.assign(acc[filename] ?? { oldSize: 0, newSize: 0 }, { oldSize }) }); + return Object.assign(acc, { + [filename]: Object.assign(acc[filename] ?? { oldSize: 0, newSize: 0 }, { oldSize }), + }); } filename = filename.replace(CLIENT_RUNTIME_PATH, '').replace('.js', ''); const newSize = info.bytes; - return Object.assign(acc, { [filename]: Object.assign(acc[filename] ?? { oldSize: 0, newSize: 0 }, { newSize, sourceFile: Object.keys(info.inputs).find(src => src.endsWith('.ts')) }) }); + return Object.assign(acc, { + [filename]: Object.assign(acc[filename] ?? { oldSize: 0, newSize: 0 }, { + newSize, + sourceFile: Object.keys(info.inputs).find((src) => src.endsWith('.ts')), + }), + }); }, {}); } diff --git a/.github/scripts/utils.mjs b/.github/scripts/utils.mjs index da5befc2c2..7683022301 100644 --- a/.github/scripts/utils.mjs +++ b/.github/scripts/utils.mjs @@ -1,59 +1,53 @@ -import * as fs from 'node:fs' -import * as os from 'node:os' -import * as crypto from 'node:crypto' +import * as crypto from 'node:crypto'; +import * as fs from 'node:fs'; +import * as os from 'node:os'; /** Based on https://github.com/actions/toolkit/blob/4e3b068ce116d28cb840033c02f912100b4592b0/packages/core/src/file-command.ts */ export function setOutput(key, value) { - const filePath = process.env['GITHUB_OUTPUT'] || '' - if (filePath) { - return issueFileCommand('OUTPUT', prepareKeyValueMessage(key, value)) - } - process.stdout.write(os.EOL) + const filePath = process.env['GITHUB_OUTPUT'] || ''; + if (filePath) { + return issueFileCommand('OUTPUT', prepareKeyValueMessage(key, value)); + } + process.stdout.write(os.EOL); } function issueFileCommand(command, message) { - const filePath = process.env[`GITHUB_${command}`] - if (!filePath) { - throw new Error( - `Unable to find environment variable for file command ${command}` - ) - } - if (!fs.existsSync(filePath)) { - throw new Error(`Missing file at path: ${filePath}`) - } + const filePath = process.env[`GITHUB_${command}`]; + if (!filePath) { + throw new Error(`Unable to find environment variable for file command ${command}`); + } + if (!fs.existsSync(filePath)) { + throw new Error(`Missing file at path: ${filePath}`); + } - fs.appendFileSync(filePath, `${toCommandValue(message)}${os.EOL}`, { - encoding: 'utf8' - }) + fs.appendFileSync(filePath, `${toCommandValue(message)}${os.EOL}`, { + encoding: 'utf8', + }); } function prepareKeyValueMessage(key, value) { - const delimiter = `gh-delimiter-${crypto.randomUUID()}` - const convertedValue = toCommandValue(value) + const delimiter = `gh-delimiter-${crypto.randomUUID()}`; + const convertedValue = toCommandValue(value); - // These should realistically never happen, but just in case someone finds a - // way to exploit uuid generation let's not allow keys or values that contain - // the delimiter. - if (key.includes(delimiter)) { - throw new Error( - `Unexpected input: name should not contain the delimiter "${delimiter}"` - ) - } + // These should realistically never happen, but just in case someone finds a + // way to exploit uuid generation let's not allow keys or values that contain + // the delimiter. + if (key.includes(delimiter)) { + throw new Error(`Unexpected input: name should not contain the delimiter "${delimiter}"`); + } - if (convertedValue.includes(delimiter)) { - throw new Error( - `Unexpected input: value should not contain the delimiter "${delimiter}"` - ) - } + if (convertedValue.includes(delimiter)) { + throw new Error(`Unexpected input: value should not contain the delimiter "${delimiter}"`); + } - return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}` + return `${key}<<${delimiter}${os.EOL}${convertedValue}${os.EOL}${delimiter}`; } function toCommandValue(input) { - if (input === null || input === undefined) { - return '' - } else if (typeof input === 'string' || input instanceof String) { - return input - } - return JSON.stringify(input) + if (input === null || input === undefined) { + return ''; + } else if (typeof input === 'string' || input instanceof String) { + return input; + } + return JSON.stringify(input); } diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9dc024dd3a..7d0331c26b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -95,9 +95,12 @@ jobs: - name: Build Packages run: pnpm run build - - name: Lint + - name: Lint source code run: pnpm run lint:ci + - name: Lint publish code + run: pnpm run publint + test: name: "Test: ${{ matrix.os }} (node@${{ matrix.NODE_VERSION }})" runs-on: ${{ matrix.os }} diff --git a/.github/workflows/continuous_benchmark.yml b/.github/workflows/continuous_benchmark.yml index 10abc7bcd2..00a7e0c5b1 100644 --- a/.github/workflows/continuous_benchmark.yml +++ b/.github/workflows/continuous_benchmark.yml @@ -5,20 +5,24 @@ on: pull_request: branches: - main + paths: + - 'packages/astro/src/**/*.ts' + - 'benchmark/**' push: branches: - main + paths: + - 'packages/astro/src/**/*.ts' + - 'benchmark/**' env: TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} TURBO_TEAM: ${{ secrets.TURBO_TEAM }} FORCE_COLOR: true - CODSPEED_TOKEN: ${{ secrets.CODSPEED_TOKEN }} CODSPEED: true jobs: codspeed: - if: ${{ github.repository_owner == 'withastro' }} runs-on: ubuntu-latest permissions: contents: read @@ -47,4 +51,5 @@ jobs: timeout-minutes: 30 with: run: pnpm benchmark codspeed + token: ${{ secrets.CODSPEED_TOKEN }} diff --git a/STYLE_GUIDE.md b/STYLE_GUIDE.md index 52501fa383..0c7239cfc1 100644 --- a/STYLE_GUIDE.md +++ b/STYLE_GUIDE.md @@ -16,8 +16,8 @@ Anything enforced by linting and formatting is considered a **style rule.** It i These style rules are maintained in configuration files, and therefore not documented in this document. Read any of the following configuration files to learn more about the style rules that we strictly enforced across the codebase: -- [ESLint](https://github.com/withastro/astro/blob/main/.eslintrc.cjs) (Linting) -- [Prettier](https://github.com/withastro/astro/blob/main/.prettierrc.json) (Formatting) +- [ESLint](https://github.com/withastro/astro/blob/main/eslint.config.js) (Linting) +- [Prettier](https://github.com/withastro/astro/blob/main/prettier.config.js) (Formatting) Alternatively, don't worry too much about style rules and trust that our tools will catch these issues for you and offer inline suggestions as you work. diff --git a/biome.jsonc b/biome.jsonc index edd0ea8717..adadd8f597 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -1,19 +1,13 @@ { "$schema": "https://biomejs.dev/schemas/1.9.3/schema.json", "files": { - "ignore": [ - "vendor", - "**/dist/**", - "**/smoke/**", - "**/fixtures/**", - "**/_temp-fixtures/**", - "**/vendor/**", - "**/.vercel/**", - "benchmark/projects/", - "benchmark/results/", - "benchmark/bench/_template.js", - ], - "include": ["test/**", "e2e/**", "packages/**", "/scripts/**", "benchmark/bench"], + "ignore": ["**/smoke/**", "**/fixtures/**", "**/_temp-fixtures/**", "**/vendor/**"], + "include": ["test/**", "e2e/**", "packages/**", "scripts/**", "benchmark/bench"], + }, + "vcs": { + "enabled": true, + "clientKind": "git", + "useIgnoreFile": true, }, "formatter": { "indentStyle": "tab", diff --git a/package.json b/package.json index 56dc0765f8..fb9e1dd266 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "private": true, "repository": { "type": "git", - "url": "https://github.com/withastro/astro.git" + "url": "git+https://github.com/withastro/astro.git" }, "scripts": { "release": "pnpm run build && changeset publish", @@ -37,6 +37,7 @@ "lint": "biome lint && eslint . --report-unused-disable-directives", "lint:ci": "biome ci --formatter-enabled=false --organize-imports-enabled=false --reporter=github && eslint . --report-unused-disable-directives", "lint:fix": "biome lint --write --unsafe", + "publint": "pnpm -r --filter=astro --filter=create-astro --filter=\"@astrojs/*\" --no-bail exec publint", "version": "changeset version && node ./scripts/deps/update-example-versions.js && pnpm install --no-frozen-lockfile && pnpm run format", "preinstall": "npx only-allow pnpm" }, @@ -65,6 +66,7 @@ "only-allow": "^1.2.1", "prettier": "^3.3.3", "prettier-plugin-astro": "^0.14.1", + "publint": "^0.2.12", "turbo": "^2.2.3", "typescript": "~5.6.3", "typescript-eslint": "^8.13.0" diff --git a/packages/astro-prism/package.json b/packages/astro-prism/package.json index 82c0c33605..f3ba16f4e8 100644 --- a/packages/astro-prism/package.json +++ b/packages/astro-prism/package.json @@ -8,7 +8,7 @@ "bugs": "https://github.com/withastro/astro/issues", "repository": { "type": "git", - "url": "https://github.com/withastro/astro.git", + "url": "git+https://github.com/withastro/astro.git", "directory": "packages/astro-prism" }, "homepage": "https://docs.astro.build/en/reference/api-reference/#prism-", diff --git a/packages/astro-rss/package.json b/packages/astro-rss/package.json index 8de405fd7c..627b4dd6ca 100644 --- a/packages/astro-rss/package.json +++ b/packages/astro-rss/package.json @@ -8,7 +8,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/withastro/astro.git", + "url": "git+https://github.com/withastro/astro.git", "directory": "packages/astro-rss" }, "bugs": "https://github.com/withastro/astro/issues", diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index 0cae3a4da7..178d2d9c1b 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -1195,6 +1195,22 @@ - Updated dependencies [[`83a2a64`](https://github.com/withastro/astro/commit/83a2a648418ad30f4eb781d1c1b5f2d8a8ac846e)]: - @astrojs/markdown-remark@6.0.0-alpha.0 +## 4.16.14 + +### Patch Changes + +- [#12480](https://github.com/withastro/astro/pull/12480) [`c3b7e7c`](https://github.com/withastro/astro/commit/c3b7e7cfa13603c08eb923703f31a92d514e82db) Thanks [@matthewp](https://github.com/matthewp)! - Removes the default throw behavior in `astro:env` + +- [#12444](https://github.com/withastro/astro/pull/12444) [`28dd3ce`](https://github.com/withastro/astro/commit/28dd3ce5222a667fe113238254edf59318b3fa14) Thanks [@ematipico](https://github.com/ematipico)! - Fixes an issue where a server island hydration script might fail case the island ID misses from the DOM. + +- [#12476](https://github.com/withastro/astro/pull/12476) [`80a9a52`](https://github.com/withastro/astro/commit/80a9a5299a9d51f2b09900d3200976d687feae8f) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Fixes a case where the Content Layer `glob()` loader would not update when renaming or deleting an entry + +- [#12418](https://github.com/withastro/astro/pull/12418) [`25baa4e`](https://github.com/withastro/astro/commit/25baa4ed0c5f55fa85c2c7e2c15848937ed1dc9b) Thanks [@oliverlynch](https://github.com/oliverlynch)! - Fix cached image redownloading if it is the first asset + +- [#12477](https://github.com/withastro/astro/pull/12477) [`46f6b38`](https://github.com/withastro/astro/commit/46f6b386b3db6332f286d79958ef10261958cceb) Thanks [@ematipico](https://github.com/ematipico)! - Fixes an issue where the SSR build was emitting the `dist/server/entry.mjs` file with an incorrect import at the top of the file/ + +- [#12365](https://github.com/withastro/astro/pull/12365) [`a23985b`](https://github.com/withastro/astro/commit/a23985b02165c2ddce56d511b3f97b6815c452c9) Thanks [@apatel369](https://github.com/apatel369)! - Fixes an issue where `Astro.currentLocale` was not correctly returning the locale for 404 and 500 pages. + ## 4.16.13 ### Patch Changes diff --git a/packages/astro/package.json b/packages/astro/package.json index e0cf3eef4c..3ca98a18a5 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -7,7 +7,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/withastro/astro.git", + "url": "git+https://github.com/withastro/astro.git", "directory": "packages/astro" }, "bugs": "https://github.com/withastro/astro/issues", diff --git a/packages/astro/src/assets/build/generate.ts b/packages/astro/src/assets/build/generate.ts index 00261d5b7f..37b6915255 100644 --- a/packages/astro/src/assets/build/generate.ts +++ b/packages/astro/src/assets/build/generate.ts @@ -153,6 +153,9 @@ export async function generateImagesForPath( const isLocalImage = isESMImportedImage(options.src); const finalFileURL = new URL('.' + filepath, env.clientRoot); + const finalFolderURL = new URL('./', finalFileURL); + await fs.promises.mkdir(finalFolderURL, { recursive: true }); + // For remote images, instead of saving the image directly, we save a JSON file with the image data and expiration date from the server const cacheFile = basename(filepath) + (isLocalImage ? '' : '.json'); const cachedFileURL = new URL(cacheFile, env.assetsCacheDir); @@ -194,9 +197,6 @@ export async function generateImagesForPath( // If the cache file doesn't exist, just move on, and we'll generate it } - const finalFolderURL = new URL('./', finalFileURL); - await fs.promises.mkdir(finalFolderURL, { recursive: true }); - // The original filepath or URL from the image transform const originalImagePath = isLocalImage ? (options.src as ImageMetadata).src diff --git a/packages/astro/src/content/loaders/glob.ts b/packages/astro/src/content/loaders/glob.ts index 154ae7d7b7..1e080c57a6 100644 --- a/packages/astro/src/content/loaders/glob.ts +++ b/packages/astro/src/content/loaders/glob.ts @@ -130,6 +130,7 @@ export function glob(globOptions: GlobOptions): Loader { const existingEntry = store.get(id); const digest = generateDigest(contents); + const filePath = fileURLToPath(fileUrl); if (existingEntry && existingEntry.digest === digest && existingEntry.filePath) { if (existingEntry.deferredRender) { @@ -141,11 +142,10 @@ export function glob(globOptions: GlobOptions): Loader { store.addAssetImports(existingEntry.assetImports, existingEntry.filePath); } + fileToIdMap.set(filePath, id); return; } - const filePath = fileURLToPath(fileUrl); - const relativePath = posixRelative(fileURLToPath(config.root), filePath); const parsedData = await parseData({ diff --git a/packages/astro/src/core/app/pipeline.ts b/packages/astro/src/core/app/pipeline.ts index 3492d56c59..c6d748af06 100644 --- a/packages/astro/src/core/app/pipeline.ts +++ b/packages/astro/src/core/app/pipeline.ts @@ -49,7 +49,6 @@ export class AppPipeline extends Pipeline { undefined, undefined, undefined, - false, defaultRoutes, ); pipeline.#manifestData = manifestData; diff --git a/packages/astro/src/core/base-pipeline.ts b/packages/astro/src/core/base-pipeline.ts index ad7de6de5a..545cf5ed28 100644 --- a/packages/astro/src/core/base-pipeline.ts +++ b/packages/astro/src/core/base-pipeline.ts @@ -56,7 +56,6 @@ export abstract class Pipeline { * Used for `Astro.site`. */ readonly site = manifest.site ? new URL(manifest.site) : undefined, - readonly callSetGetEnv = true, /** * Array of built-in, internal, routes. * Used to find the route module @@ -70,13 +69,6 @@ export abstract class Pipeline { createI18nMiddleware(i18n, manifest.base, manifest.trailingSlash, manifest.buildFormat), ); } - // In SSR, getSecret should fail by default. Setting it here will run before the - // adapter override. - if (callSetGetEnv && manifest.envGetSecretEnabled) { - setGetEnv(() => { - throw new AstroError(AstroErrorData.EnvUnsupportedGetSecret); - }, true); - } } abstract headElements(routeData: RouteData): Promise | HeadElements; diff --git a/packages/astro/src/core/build/generate.ts b/packages/astro/src/core/build/generate.ts index 1a35e06a4b..1cc25aaee7 100644 --- a/packages/astro/src/core/build/generate.ts +++ b/packages/astro/src/core/build/generate.ts @@ -30,6 +30,7 @@ import type { import type { SSRManifest, SSRManifestI18n } from '../app/types.js'; import { NoPrerenderedRoutesWithDomains } from '../errors/errors-data.js'; import { AstroError, AstroErrorData } from '../errors/index.js'; +import { NOOP_MIDDLEWARE_FN } from '../middleware/noop-middleware.js'; import { getRedirectLocationOrThrow, routeIsRedirect } from '../redirects/index.js'; import { RenderContext } from '../render-context.js'; import { callGetStaticPaths } from '../render/route-cache.js'; @@ -59,14 +60,9 @@ export async function generatePages(options: StaticBuildOptions, internals: Buil const baseDirectory = getOutputDirectory(options.settings); const renderersEntryUrl = new URL('renderers.mjs', baseDirectory); const renderers = await import(renderersEntryUrl.toString()); - let middleware: MiddlewareHandler = (_, next) => next(); - try { - // middleware.mjs is not emitted if there is no user middleware - // in which case the import fails with ERR_MODULE_NOT_FOUND, and we fall back to a no-op middleware - middleware = await import(new URL('middleware.mjs', baseDirectory).toString()).then( - (mod) => mod.onRequest, - ); - } catch {} + const middleware: MiddlewareHandler = internals.middlewareEntryPoint + ? await import(internals.middlewareEntryPoint.toString()).then((mod) => mod.onRequest) + : NOOP_MIDDLEWARE_FN; manifest = createBuildManifest( options.settings, internals, diff --git a/packages/astro/src/core/build/pipeline.ts b/packages/astro/src/core/build/pipeline.ts index 478d0a21ad..14bb08662a 100644 --- a/packages/astro/src/core/build/pipeline.ts +++ b/packages/astro/src/core/build/pipeline.ts @@ -130,15 +130,13 @@ export class BuildPipeline extends Pipeline { const renderersEntryUrl = new URL(`renderers.mjs?time=${Date.now()}`, baseDirectory); const renderers = await import(renderersEntryUrl.toString()); - const middleware = await import(new URL('middleware.mjs', baseDirectory).toString()) - .then((mod) => { - return function () { - return { onRequest: mod.onRequest }; - }; - }) - // middleware.mjs is not emitted if there is no user middleware - // in which case the import fails with ERR_MODULE_NOT_FOUND, and we fall back to a no-op middleware - .catch(() => manifest.middleware); + const middleware = internals.middlewareEntryPoint + ? await import(internals.middlewareEntryPoint.toString()).then((mod) => { + return function () { + return { onRequest: mod.onRequest }; + }; + }) + : manifest.middleware; if (!renderers) { throw new Error( diff --git a/packages/astro/src/core/build/plugins/plugin-ssr.ts b/packages/astro/src/core/build/plugins/plugin-ssr.ts index 6acc236aed..d0174e4b4c 100644 --- a/packages/astro/src/core/build/plugins/plugin-ssr.ts +++ b/packages/astro/src/core/build/plugins/plugin-ssr.ts @@ -170,7 +170,6 @@ function generateSSRCode(adapter: AstroAdapter, middlewareId: string) { `import { renderers } from '${RENDERERS_MODULE_ID}';`, `import * as serverEntrypointModule from '${ADAPTER_VIRTUAL_MODULE_ID}';`, `import { manifest as defaultManifest } from '${SSR_MANIFEST_VIRTUAL_MODULE_ID}';`, - edgeMiddleware ? `` : `import { onRequest as middleware } from '${middlewareId}';`, `import { serverIslandMap } from '${VIRTUAL_ISLAND_MAP_ID}';`, ]; diff --git a/packages/astro/src/core/errors/errors-data.ts b/packages/astro/src/core/errors/errors-data.ts index 1b19b6064a..158d5eade7 100644 --- a/packages/astro/src/core/errors/errors-data.ts +++ b/packages/astro/src/core/errors/errors-data.ts @@ -1215,17 +1215,6 @@ export const EnvInvalidVariables = { `The following environment variables defined in \`env.schema\` are invalid:\n\n${errors.map((err) => `- ${err}`).join('\n')}\n`, } satisfies ErrorData; -/** - * @docs - * @description - * The `astro:env/server` exported function `getSecret()` is not supported by your adapter. - */ -export const EnvUnsupportedGetSecret = { - name: 'EnvUnsupportedGetSecret', - title: 'Unsupported astro:env getSecret', - message: '`astro:env/server` exported function `getSecret` is not supported by your adapter.', -} satisfies ErrorData; - /** * @docs * @description diff --git a/packages/astro/src/core/middleware/vite-plugin.ts b/packages/astro/src/core/middleware/vite-plugin.ts index 0b7f46c0c1..10c5683f74 100644 --- a/packages/astro/src/core/middleware/vite-plugin.ts +++ b/packages/astro/src/core/middleware/vite-plugin.ts @@ -13,7 +13,6 @@ export const MIDDLEWARE_MODULE_ID = '\0astro-internal:middleware'; const NOOP_MIDDLEWARE = '\0noop-middleware'; export function vitePluginMiddleware({ settings }: { settings: AstroSettings }): VitePlugin { - let isCommandBuild = false; let resolvedMiddlewareId: string | undefined = undefined; const hasIntegrationMiddleware = settings.middlewares.pre.length > 0 || settings.middlewares.post.length > 0; @@ -21,9 +20,6 @@ export function vitePluginMiddleware({ settings }: { settings: AstroSettings }): return { name: '@astro/plugin-middleware', - config(_, { command }) { - isCommandBuild = command === 'build'; - }, async resolveId(id) { if (id === MIDDLEWARE_MODULE_ID) { const middlewareId = await this.resolve( @@ -53,15 +49,6 @@ export function vitePluginMiddleware({ settings }: { settings: AstroSettings }): if (!userMiddlewareIsPresent && settings.config.i18n?.routing === 'manual') { throw new AstroError(MissingMiddlewareForInternationalization); } - // In the build, tell Vite to emit this file - if (isCommandBuild) { - this.emitFile({ - type: 'chunk', - preserveSignature: 'strict', - fileName: 'middleware.mjs', - id, - }); - } const preMiddleware = createMiddlewareImports(settings.middlewares.pre, 'pre'); const postMiddleware = createMiddlewareImports(settings.middlewares.post, 'post'); @@ -124,7 +111,7 @@ export function vitePluginMiddlewareBuild( writeBundle(_, bundle) { for (const [chunkName, chunk] of Object.entries(bundle)) { - if (chunk.type !== 'asset' && chunk.fileName === 'middleware.mjs') { + if (chunk.type !== 'asset' && chunk.facadeModuleId === MIDDLEWARE_MODULE_ID) { const outputDirectory = getOutputDirectory(opts.settings); internals.middlewareEntryPoint = new URL(chunkName, outputDirectory); } diff --git a/packages/astro/src/core/render-context.ts b/packages/astro/src/core/render-context.ts index 691613412e..611b9cbcbe 100644 --- a/packages/astro/src/core/render-context.ts +++ b/packages/astro/src/core/render-context.ts @@ -29,6 +29,7 @@ import { callMiddleware } from './middleware/callMiddleware.js'; import { sequence } from './middleware/index.js'; import { renderRedirect } from './redirects/render.js'; import { type Pipeline, Slots, getParams, getProps } from './render/index.js'; +import { isRoute404or500 } from './routing/match.js'; import { copyRequest, getOriginPathname, setOriginPathname } from './routing/rewrite.js'; import { SERVER_ISLAND_COMPONENT } from './server-islands/endpoint.js'; @@ -573,11 +574,9 @@ export class RenderContext { computedLocale = computeCurrentLocale(referer, locales, defaultLocale); } } else { - if (routeData.pathname) { - computedLocale = computeCurrentLocale(routeData.pathname, locales, defaultLocale); - } else { - computedLocale = computeCurrentLocale(url.pathname, locales, defaultLocale); - } + const pathname = + routeData.pathname && !isRoute404or500(routeData) ? routeData.pathname : url.pathname; + computedLocale = computeCurrentLocale(pathname, locales, defaultLocale); } this.#currentLocale = computedLocale ?? fallbackTo; diff --git a/packages/astro/src/core/routing/match.ts b/packages/astro/src/core/routing/match.ts index 403b3fb953..0e8a9e3387 100644 --- a/packages/astro/src/core/routing/match.ts +++ b/packages/astro/src/core/routing/match.ts @@ -16,3 +16,13 @@ export function matchRoute(pathname: string, manifest: ManifestData): RouteData export function matchAllRoutes(pathname: string, manifest: ManifestData): RouteData[] { return manifest.routes.filter((route) => route.pattern.test(decodeURI(pathname))); } + +/** + * Determines if the given route matches a 404 or 500 error page. + * + * @param {RouteData} route - The route data to check. + * @returns {boolean} `true` if the route matches a 404 or 500 error page, otherwise `false`. + */ +export function isRoute404or500(route: RouteData): boolean { + return route.pattern.test('/404') || route.pattern.test('/500'); +} diff --git a/packages/astro/src/runtime/server/render/server-islands.ts b/packages/astro/src/runtime/server/render/server-islands.ts index 3e5e993d96..97bf1d3314 100644 --- a/packages/astro/src/runtime/server/render/server-islands.ts +++ b/packages/astro/src/runtime/server/render/server-islands.ts @@ -119,22 +119,23 @@ let response = await fetch('${serverIslandUrl}', { }); ` } - -if(response.status === 200 && response.headers.get('content-type') === 'text/html') { - let html = await response.text(); - - // Swap! - while(script.previousSibling && - script.previousSibling.nodeType !== 8 && - script.previousSibling.data !== '[if astro]>server-island-startserver-island-start`); }, }; diff --git a/packages/astro/test/content-layer.test.js b/packages/astro/test/content-layer.test.js index e2d92df3d9..16aa96c293 100644 --- a/packages/astro/test/content-layer.test.js +++ b/packages/astro/test/content-layer.test.js @@ -424,5 +424,26 @@ describe('Content Layer', () => { assert.equal(res.status, 500); assert.ok(text.includes('RenderUndefinedEntryError')); }); + + it('update the store when a file is renamed', async () => { + const rawJsonResponse = await fixture.fetch('/collections.json'); + const initialJson = devalue.parse(await rawJsonResponse.text()); + assert.equal(initialJson.numbers.map((e) => e.id).includes('src/data/glob-data/three'), true); + + const oldPath = new URL('./data/glob-data/three.json', fixture.config.srcDir); + const newPath = new URL('./data/glob-data/four.json', fixture.config.srcDir); + + await fs.rename(oldPath, newPath); + await fixture.onNextDataStoreChange(); + + try { + const updatedJsonResponse = await fixture.fetch('/collections.json'); + const updated = devalue.parse(await updatedJsonResponse.text()); + assert.equal(updated.numbers.map((e) => e.id).includes('src/data/glob-data/three'), false); + assert.equal(updated.numbers.map((e) => e.id).includes('src/data/glob-data/four'), true); + } finally { + await fs.rename(newPath, oldPath); + } + }); }); }); diff --git a/packages/astro/test/fixtures/content-layer/src/pages/collections.json.js b/packages/astro/test/fixtures/content-layer/src/pages/collections.json.js index 6bced27e45..5467550d70 100644 --- a/packages/astro/test/fixtures/content-layer/src/pages/collections.json.js +++ b/packages/astro/test/fixtures/content-layer/src/pages/collections.json.js @@ -29,6 +29,8 @@ export async function GET() { const tomlLoader = await getCollection('songs'); const nestedJsonLoader = await getCollection('birds'); + + const numbers = await getCollection('numbers'); return new Response( devalue.stringify({ @@ -41,11 +43,12 @@ export async function GET() { entryWithImagePath, referencedEntry, increment, + numbers, images, probes, yamlLoader, tomlLoader, nestedJsonLoader, - }), + }) ); } diff --git a/packages/astro/test/fixtures/i18n-routing/src/pages/404.astro b/packages/astro/test/fixtures/i18n-routing/src/pages/404.astro new file mode 100644 index 0000000000..fce4a30b83 --- /dev/null +++ b/packages/astro/test/fixtures/i18n-routing/src/pages/404.astro @@ -0,0 +1,12 @@ +--- +const currentLocale = Astro.currentLocale; +--- + + + 404 - Not Found + + +

404 - Not Found

+

Current Locale: {currentLocale ? currentLocale : "none"}

+ + diff --git a/packages/astro/test/i18n-routing.test.js b/packages/astro/test/i18n-routing.test.js index 5b7e8c2e7a..5e3a3d3553 100644 --- a/packages/astro/test/i18n-routing.test.js +++ b/packages/astro/test/i18n-routing.test.js @@ -82,6 +82,18 @@ describe('[DEV] i18n routing', () => { assert.equal(response.status, 200); assert.equal((await response.text()).includes('Endurance'), true); }); + + it('should return the correct locale on 404 page for non existing default locale page', async () => { + const response = await fixture.fetch('/es/nonexistent-page'); + assert.equal(response.status, 404); + assert.equal((await response.text()).includes('Current Locale: es'), true); + }); + + it('should return the correct locale on 404 page for non existing english locale page', async () => { + const response = await fixture.fetch('/en/nonexistent-page'); + assert.equal(response.status, 404); + assert.equal((await response.text()).includes('Current Locale: en'), true); + }); }); describe('i18n routing', () => { @@ -1200,6 +1212,20 @@ describe('[SSR] i18n routing', () => { assert.equal(response.status, 200); assert.equal((await response.text()).includes('Endurance'), true); }); + + it('should return the correct locale on 404 page for non existing default locale page', async () => { + let request = new Request('http://example.com/es/nonexistent-page'); + let response = await app.render(request); + assert.equal(response.status, 404); + assert.equal((await response.text()).includes('Current Locale: es'), true); + }); + + it('should return the correct locale on 404 page for non existing english locale page', async () => { + let request = new Request('http://example.com/en/nonexistent-page'); + let response = await app.render(request); + assert.equal(response.status, 404); + assert.equal((await response.text()).includes('Current Locale: en'), true); + }); }); describe('default', () => { diff --git a/packages/create-astro/package.json b/packages/create-astro/package.json index 9745ad223e..1d20f12b79 100644 --- a/packages/create-astro/package.json +++ b/packages/create-astro/package.json @@ -6,7 +6,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/withastro/astro.git", + "url": "git+https://github.com/withastro/astro.git", "directory": "packages/create-astro" }, "bugs": "https://github.com/withastro/astro/issues", diff --git a/packages/db/package.json b/packages/db/package.json index 02576f84ff..d513c4d0bb 100644 --- a/packages/db/package.json +++ b/packages/db/package.json @@ -5,7 +5,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/withastro/astro.git", + "url": "git+https://github.com/withastro/astro.git", "directory": "packages/db" }, "bugs": "https://github.com/withastro/astro/issues", diff --git a/packages/integrations/alpinejs/package.json b/packages/integrations/alpinejs/package.json index b0f3f4e3d8..5c506688e5 100644 --- a/packages/integrations/alpinejs/package.json +++ b/packages/integrations/alpinejs/package.json @@ -8,7 +8,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/withastro/astro.git", + "url": "git+https://github.com/withastro/astro.git", "directory": "packages/integrations/alpinejs" }, "keywords": [ diff --git a/packages/integrations/cloudflare/package.json b/packages/integrations/cloudflare/package.json index 9e6bf7f836..05e18bc647 100644 --- a/packages/integrations/cloudflare/package.json +++ b/packages/integrations/cloudflare/package.json @@ -2,6 +2,7 @@ "name": "@astrojs/cloudflare", "version": "0.0.0", "private": true, + "type": "module", "keywords": [], "dont_remove": "This is a placeholder for the sake of the docs smoke test" } diff --git a/packages/integrations/markdoc/package.json b/packages/integrations/markdoc/package.json index 42bac876d5..1c3ec68eea 100644 --- a/packages/integrations/markdoc/package.json +++ b/packages/integrations/markdoc/package.json @@ -8,7 +8,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/withastro/astro.git", + "url": "git+https://github.com/withastro/astro.git", "directory": "packages/integrations/markdoc" }, "keywords": [ diff --git a/packages/integrations/mdx/package.json b/packages/integrations/mdx/package.json index d35e7116ce..16d9864fa7 100644 --- a/packages/integrations/mdx/package.json +++ b/packages/integrations/mdx/package.json @@ -8,7 +8,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/withastro/astro.git", + "url": "git+https://github.com/withastro/astro.git", "directory": "packages/integrations/mdx" }, "keywords": [ diff --git a/packages/integrations/netlify/package.json b/packages/integrations/netlify/package.json index 2d9ce88d39..4b54bb6c09 100644 --- a/packages/integrations/netlify/package.json +++ b/packages/integrations/netlify/package.json @@ -2,6 +2,7 @@ "name": "@astrojs/netlify", "version": "0.0.0", "private": true, + "type": "module", "keywords": [], "dont_remove": "This is a placeholder for the sake of the docs smoke test" } diff --git a/packages/integrations/node/package.json b/packages/integrations/node/package.json index 656c453933..134ba5d86a 100644 --- a/packages/integrations/node/package.json +++ b/packages/integrations/node/package.json @@ -2,6 +2,7 @@ "name": "@astrojs/node", "version": "0.0.0", "private": true, + "type": "module", "keywords": [], "dont_remove": "This is a placeholder for the sake of the docs smoke test" } diff --git a/packages/integrations/partytown/package.json b/packages/integrations/partytown/package.json index e8fd6e5e6b..0a171c1c0e 100644 --- a/packages/integrations/partytown/package.json +++ b/packages/integrations/partytown/package.json @@ -8,7 +8,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/withastro/astro.git", + "url": "git+https://github.com/withastro/astro.git", "directory": "packages/integrations/partytown" }, "keywords": [ diff --git a/packages/integrations/preact/package.json b/packages/integrations/preact/package.json index e88470166e..b441bca21a 100644 --- a/packages/integrations/preact/package.json +++ b/packages/integrations/preact/package.json @@ -8,7 +8,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/withastro/astro.git", + "url": "git+https://github.com/withastro/astro.git", "directory": "packages/integrations/preact" }, "keywords": [ @@ -40,7 +40,8 @@ "@preact/preset-vite": "2.8.2", "@preact/signals": "^1.3.0", "babel-plugin-transform-hook-names": "^1.0.2", - "preact-render-to-string": "^6.5.11" + "preact-render-to-string": "^6.5.11", + "vite": "^5.4.10" }, "devDependencies": { "astro": "workspace:*", diff --git a/packages/integrations/react/package.json b/packages/integrations/react/package.json index 3e358a5391..0010b7fdf5 100644 --- a/packages/integrations/react/package.json +++ b/packages/integrations/react/package.json @@ -8,7 +8,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/withastro/astro.git", + "url": "git+https://github.com/withastro/astro.git", "directory": "packages/integrations/react" }, "keywords": [ @@ -24,14 +24,8 @@ "./actions": "./dist/actions.js", "./client.js": "./client.js", "./client-v17.js": "./client-v17.js", - "./server.js": { - "default": "./server.js", - "types": "./server.d.ts" - }, - "./server-v17.js": { - "default": "./server-v17.js", - "types": "./server-v17.d.ts" - }, + "./server.js": "./server.js", + "./server-v17.js": "./server-v17.js", "./package.json": "./package.json", "./jsx-runtime": "./jsx-runtime.js" }, @@ -56,7 +50,8 @@ }, "dependencies": { "@vitejs/plugin-react": "^4.3.3", - "ultrahtml": "^1.5.3" + "ultrahtml": "^1.5.3", + "vite": "6.0.0-beta.6" }, "devDependencies": { "@types/react": "^18.3.12", @@ -65,8 +60,7 @@ "astro-scripts": "workspace:*", "cheerio": "1.0.0", "react": "^18.3.1", - "react-dom": "^18.3.1", - "vite": "6.0.0-beta.6" + "react-dom": "^18.3.1" }, "peerDependencies": { "@types/react": "^17.0.50 || ^18.0.21", diff --git a/packages/integrations/sitemap/package.json b/packages/integrations/sitemap/package.json index 7e4bfb3a67..ec4c02b824 100644 --- a/packages/integrations/sitemap/package.json +++ b/packages/integrations/sitemap/package.json @@ -8,7 +8,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/withastro/astro.git", + "url": "git+https://github.com/withastro/astro.git", "directory": "packages/integrations/sitemap" }, "keywords": [ diff --git a/packages/integrations/solid/package.json b/packages/integrations/solid/package.json index 33b27651ff..b798a69a0c 100644 --- a/packages/integrations/solid/package.json +++ b/packages/integrations/solid/package.json @@ -8,7 +8,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/withastro/astro.git", + "url": "git+https://github.com/withastro/astro.git", "directory": "packages/integrations/solid" }, "keywords": [ @@ -35,13 +35,13 @@ "dev": "astro-scripts dev \"src/**/*.ts\"" }, "dependencies": { - "vite-plugin-solid": "^2.10.2" + "vite-plugin-solid": "^2.10.2", + "vite": "6.0.0-beta.6" }, "devDependencies": { "astro": "workspace:*", "astro-scripts": "workspace:*", - "solid-js": "^1.9.3", - "vite": "6.0.0-beta.6" + "solid-js": "^1.9.3" }, "peerDependencies": { "solid-devtools": "^0.30.1", diff --git a/packages/integrations/svelte/CHANGELOG.md b/packages/integrations/svelte/CHANGELOG.md index ab1373bc5f..5a8cf53559 100644 --- a/packages/integrations/svelte/CHANGELOG.md +++ b/packages/integrations/svelte/CHANGELOG.md @@ -1,5 +1,11 @@ # @astrojs/svelte +## 6.0.1 + +### Patch Changes + +- [#12442](https://github.com/withastro/astro/pull/12442) [`bde49f1`](https://github.com/withastro/astro/commit/bde49f186e4d620ce0c926353db38215e33dceef) Thanks [@bluwy](https://github.com/bluwy)! - Publishes missing file + ## 6.0.0 ### Major Changes diff --git a/packages/integrations/svelte/package.json b/packages/integrations/svelte/package.json index 2c07837e5a..e88e6d5e71 100644 --- a/packages/integrations/svelte/package.json +++ b/packages/integrations/svelte/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/svelte", - "version": "6.0.0", + "version": "6.0.1", "description": "Use Svelte components within Astro", "type": "module", "types": "./dist/index.d.ts", @@ -8,7 +8,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/withastro/astro.git", + "url": "git+https://github.com/withastro/astro.git", "directory": "packages/integrations/svelte" }, "keywords": [ @@ -24,15 +24,12 @@ "./editor": "./dist/editor.cjs", "./*": "./*", "./client.js": "./client.svelte.js", - "./server.js": { - "default": "./server.js", - "types": "./server.d.ts" - }, + "./server.js": "./server.js", "./package.json": "./package.json" }, "files": [ "dist", - "client.js", + "client.svelte.js", "server.js", "server.d.ts" ], @@ -43,13 +40,13 @@ }, "dependencies": { "@sveltejs/vite-plugin-svelte": "^4.0.0", - "svelte2tsx": "^0.7.22" + "svelte2tsx": "^0.7.22", + "vite": "6.0.0-beta.6" }, "devDependencies": { "astro": "workspace:*", "astro-scripts": "workspace:*", - "svelte": "^5.1.16", - "vite": "6.0.0-beta.6" + "svelte": "^5.1.16" }, "peerDependencies": { "astro": "^4.0.0", diff --git a/packages/integrations/tailwind/package.json b/packages/integrations/tailwind/package.json index ba06a9eba5..073de3d411 100644 --- a/packages/integrations/tailwind/package.json +++ b/packages/integrations/tailwind/package.json @@ -8,7 +8,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/withastro/astro.git", + "url": "git+https://github.com/withastro/astro.git", "directory": "packages/integrations/tailwind" }, "keywords": [ diff --git a/packages/integrations/vercel/package.json b/packages/integrations/vercel/package.json index 7fef2f9b89..57beba344a 100644 --- a/packages/integrations/vercel/package.json +++ b/packages/integrations/vercel/package.json @@ -2,6 +2,7 @@ "name": "@astrojs/vercel", "version": "0.0.0", "private": true, + "type": "module", "keywords": [], "dont_remove": "This is a placeholder for the sake of the docs smoke test" } diff --git a/packages/integrations/vue/package.json b/packages/integrations/vue/package.json index c8677a6072..5817fab62d 100644 --- a/packages/integrations/vue/package.json +++ b/packages/integrations/vue/package.json @@ -8,7 +8,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/withastro/astro.git", + "url": "git+https://github.com/withastro/astro.git", "directory": "packages/integrations/vue" }, "keywords": [ @@ -24,10 +24,7 @@ "./editor": "./dist/editor.cjs", "./*": "./*", "./client.js": "./client.js", - "./server.js": { - "default": "./server.js", - "types": "./server.d.ts" - }, + "./server.js": "./server.js", "./package.json": "./package.json" }, "files": [ @@ -48,14 +45,14 @@ "@vitejs/plugin-vue": "^5.1.4", "@vitejs/plugin-vue-jsx": "^4.0.1", "@vue/compiler-sfc": "^3.5.12", - "vite-plugin-vue-devtools": "^7.6.3" + "vite-plugin-vue-devtools": "^7.6.3", + "vite": "6.0.0-beta.6" }, "devDependencies": { "astro": "workspace:*", "astro-scripts": "workspace:*", "cheerio": "1.0.0", "linkedom": "^0.18.5", - "vite": "6.0.0-beta.6", "vue": "^3.5.12" }, "peerDependencies": { diff --git a/packages/integrations/web-vitals/package.json b/packages/integrations/web-vitals/package.json index 13ceeb5e6e..d06582b15b 100644 --- a/packages/integrations/web-vitals/package.json +++ b/packages/integrations/web-vitals/package.json @@ -7,7 +7,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/withastro/astro.git", + "url": "git+https://github.com/withastro/astro.git", "directory": "packages/integrations/web-vitals" }, "keywords": [ diff --git a/packages/internal-helpers/package.json b/packages/internal-helpers/package.json index bbf4938b0c..9f5ebfbb06 100644 --- a/packages/internal-helpers/package.json +++ b/packages/internal-helpers/package.json @@ -7,7 +7,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/withastro/astro.git", + "url": "git+https://github.com/withastro/astro.git", "directory": "packages/internal-helpers" }, "bugs": "https://github.com/withastro/astro/issues", diff --git a/packages/markdown/remark/package.json b/packages/markdown/remark/package.json index ac6235547f..a5d2da9a44 100644 --- a/packages/markdown/remark/package.json +++ b/packages/markdown/remark/package.json @@ -6,7 +6,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/withastro/astro.git", + "url": "git+https://github.com/withastro/astro.git", "directory": "packages/markdown/remark" }, "bugs": "https://github.com/withastro/astro/issues", diff --git a/packages/studio/package.json b/packages/studio/package.json index d049cb063c..05be0d15e2 100644 --- a/packages/studio/package.json +++ b/packages/studio/package.json @@ -5,7 +5,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/withastro/astro.git", + "url": "git+https://github.com/withastro/astro.git", "directory": "packages/studio" }, "bugs": "https://github.com/withastro/astro/issues", diff --git a/packages/telemetry/package.json b/packages/telemetry/package.json index 69aac31bc5..5111f168c0 100644 --- a/packages/telemetry/package.json +++ b/packages/telemetry/package.json @@ -7,7 +7,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/withastro/astro.git", + "url": "git+https://github.com/withastro/astro.git", "directory": "packages/telemetry" }, "bugs": "https://github.com/withastro/astro/issues", diff --git a/packages/underscore-redirects/package.json b/packages/underscore-redirects/package.json index eb5620c34e..8e0d3941a1 100644 --- a/packages/underscore-redirects/package.json +++ b/packages/underscore-redirects/package.json @@ -7,7 +7,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/withastro/astro.git", + "url": "git+https://github.com/withastro/astro.git", "directory": "packages/underscore-redirects" }, "bugs": "https://github.com/withastro/astro/issues", diff --git a/packages/upgrade/package.json b/packages/upgrade/package.json index 38655068b3..872f6e7295 100644 --- a/packages/upgrade/package.json +++ b/packages/upgrade/package.json @@ -6,7 +6,7 @@ "license": "MIT", "repository": { "type": "git", - "url": "https://github.com/withastro/astro.git", + "url": "git+https://github.com/withastro/astro.git", "directory": "packages/upgrade" }, "bugs": "https://github.com/withastro/astro/issues", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 428de532b1..fd4f684500 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -52,6 +52,9 @@ importers: prettier-plugin-astro: specifier: ^0.14.1 version: 0.14.1 + publint: + specifier: ^0.2.12 + version: 0.2.12 turbo: specifier: ^2.2.3 version: 2.2.3 @@ -4487,6 +4490,37 @@ importers: packages/integrations/cloudflare: {} + packages/integrations/lit: + dependencies: + '@lit-labs/ssr': + specifier: ^3.2.2 + version: 3.2.2 + '@lit-labs/ssr-client': + specifier: ^1.1.7 + version: 1.1.7 + '@lit-labs/ssr-dom-shim': + specifier: ^1.2.1 + version: 1.2.1 + parse5: + specifier: ^7.2.1 + version: 7.2.1 + devDependencies: + astro: + specifier: workspace:* + version: link:../../astro + astro-scripts: + specifier: workspace:* + version: link:../../../scripts + cheerio: + specifier: 1.0.0 + version: 1.0.0 + lit: + specifier: ^3.2.1 + version: 3.2.1 + sass: + specifier: ^1.80.6 + version: 1.81.0 + packages/integrations/markdoc: dependencies: '@astrojs/internal-helpers': @@ -4966,7 +5000,7 @@ importers: version: 7.25.9(@babel/core@7.25.8) '@preact/preset-vite': specifier: 2.8.2 - version: 2.8.2(@babel/core@7.25.8)(preact@10.24.3)(vite@6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1)) + version: 2.8.2(@babel/core@7.25.8)(preact@10.24.3)(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0)) '@preact/signals': specifier: ^1.3.0 version: 1.3.0(preact@10.24.3) @@ -4976,6 +5010,9 @@ importers: preact-render-to-string: specifier: ^6.5.11 version: 6.5.11(preact@10.24.3) + vite: + specifier: ^5.4.10 + version: 5.4.11(@types/node@18.19.50)(sass@1.81.0) devDependencies: astro: specifier: workspace:* @@ -4995,6 +5032,9 @@ importers: ultrahtml: specifier: ^1.5.3 version: 1.5.3 + vite: + specifier: 6.0.0-beta.6 + version: 6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1) devDependencies: '@types/react': specifier: ^18.3.12 @@ -5017,9 +5057,6 @@ importers: react-dom: specifier: ^18.3.1 version: 18.3.1(react@18.3.1) - vite: - specifier: 6.0.0-beta.6 - version: 6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1) packages/integrations/react/test/fixtures/react-component: dependencies: @@ -5105,6 +5142,9 @@ importers: packages/integrations/solid: dependencies: + vite: + specifier: 6.0.0-beta.6 + version: 6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1) vite-plugin-solid: specifier: ^2.10.2 version: 2.10.2(solid-js@1.9.3)(vite@6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1)) @@ -5118,9 +5158,6 @@ importers: solid-js: specifier: ^1.9.3 version: 1.9.3 - vite: - specifier: 6.0.0-beta.6 - version: 6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1) packages/integrations/svelte: dependencies: @@ -5130,6 +5167,9 @@ importers: svelte2tsx: specifier: ^0.7.22 version: 0.7.22(svelte@5.2.3)(typescript@5.6.3) + vite: + specifier: 6.0.0-beta.6 + version: 6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1) devDependencies: astro: specifier: workspace:* @@ -5140,9 +5180,6 @@ importers: svelte: specifier: ^5.1.16 version: 5.2.3 - vite: - specifier: 6.0.0-beta.6 - version: 6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1) packages/integrations/tailwind: dependencies: @@ -5191,6 +5228,9 @@ importers: '@vue/compiler-sfc': specifier: ^3.5.12 version: 3.5.12 + vite: + specifier: 6.0.0-beta.6 + version: 6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1) vite-plugin-vue-devtools: specifier: ^7.6.3 version: 7.6.4(rollup@4.27.3)(vite@6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1))(vue@3.5.12(typescript@5.6.3)) @@ -5207,9 +5247,6 @@ importers: linkedom: specifier: ^0.18.5 version: 0.18.5 - vite: - specifier: 6.0.0-beta.6 - version: 6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1) vue: specifier: ^3.5.12 version: 3.5.12(typescript@5.6.3) @@ -6818,9 +6855,16 @@ packages: cpu: [x64] os: [win32] + '@lit-labs/ssr-client@1.1.7': + resolution: {integrity: sha512-VvqhY/iif3FHrlhkzEPsuX/7h/NqnfxLwVf0p8ghNIlKegRyRqgeaJevZ57s/u/LiFyKgqksRP5n+LmNvpxN+A==} + '@lit-labs/ssr-dom-shim@1.2.1': resolution: {integrity: sha512-wx4aBmgeGvFmOKucFKY+8VFJSYZxs9poN3SDNQFF6lT6NrQUnHiPB2PWz2sc4ieEcAaYYzN+1uWahEeTq2aRIQ==} + '@lit-labs/ssr@3.2.2': + resolution: {integrity: sha512-He5TzeNPM9ECmVpgXRYmVlz0UA5YnzHlT43kyLi2Lu6mUidskqJVonk9W5K699+2DKhoXp8Ra4EJmHR6KrcW1Q==} + engines: {node: '>=13.9.0'} + '@lit/reactive-element@2.0.4': resolution: {integrity: sha512-GFn91inaUa2oHLak8awSIigYz0cU0Payr1rcFsrkf5OJ5eSPxElyZfKh0f2p9FsTiZWXQdWGJeXZICEfXXYSXQ==} @@ -6946,6 +6990,9 @@ packages: resolution: {integrity: sha512-HNjmfLQEVRZmHRET336f20H/8kOozUGwk7yajvsonjNxbj2wBTK1WsQuHkD5yYh9RxFGL2EyDHryOihOwUoKDA==} engines: {node: '>= 10.0.0'} + '@parse5/tools@0.3.0': + resolution: {integrity: sha512-zxRyTHkqb7WQMV8kTNBKWb1BeOFUKXBXTBWuxg9H9hfvQB3IwP6Iw2U75Ia5eyRxPNltmY7E8YAlz6zWwUnjKg==} + '@pkgjs/parseargs@0.11.0': resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} @@ -7243,6 +7290,9 @@ packages: '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} + '@types/node@16.18.119': + resolution: {integrity: sha512-ia7V9a2FnhUFfetng4/sRPBMTwHZUkPFY736rb1cg9AgG7MZdR97q7/nLR9om+sq5f1la9C857E0l/nrI0RiFQ==} + '@types/node@17.0.45': resolution: {integrity: sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==} @@ -8284,6 +8334,10 @@ packages: encoding-sniffer@0.2.0: resolution: {integrity: sha512-ju7Wq1kg04I3HtiYIOrUrdfdDvkyO9s5XM8QAj/bN61Yo/Vb4vgJxy5vi4Yxk01gWHbrofpPtpxM8bKger9jhg==} + enhanced-resolve@5.17.1: + resolution: {integrity: sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==} + engines: {node: '>=10.13.0'} + enquirer@2.4.1: resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} engines: {node: '>=8.6'} @@ -8574,6 +8628,9 @@ packages: resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} engines: {node: '>= 8'} + fs.realpath@1.0.0: + resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + fsevents@2.3.2: resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -8621,6 +8678,11 @@ packages: resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==} hasBin: true + glob@8.1.0: + resolution: {integrity: sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==} + engines: {node: '>=12'} + deprecated: Glob versions prior to v9 are no longer supported + globals@11.12.0: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} @@ -8785,6 +8847,10 @@ packages: ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + ignore-walk@5.0.1: + resolution: {integrity: sha512-yemi4pMf51WKT7khInJqAvsIGzoqYXblnsz0ql8tM+yi1EKYTY1evX4NAbJrLL/Aanr2HyZeluqU+Oi7MGHokw==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + ignore@5.3.2: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} @@ -8803,6 +8869,10 @@ packages: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} + inflight@1.0.6: + resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. + inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} @@ -9356,6 +9426,10 @@ packages: minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + minimatch@5.1.6: + resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} + engines: {node: '>=10'} + minimatch@9.0.5: resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} @@ -9491,6 +9565,19 @@ packages: resolution: {integrity: sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==} engines: {node: '>=0.10.0'} + npm-bundled@2.0.1: + resolution: {integrity: sha512-gZLxXdjEzE/+mOstGDqR6b0EkhJ+kM6fxM6vUuckuctuVPh80Q6pw/rSZj9s4Gex9GxWtIicO1pc8DB9KZWudw==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + + npm-normalize-package-bin@2.0.0: + resolution: {integrity: sha512-awzfKUO7v0FscrSpRoogyNm0sajikhBWpU0QMrW09AMi9n1PoKU6WaIqUzuJSQnpciZZmJ/jMZ2Egfmb/9LiWQ==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + + npm-packlist@5.1.3: + resolution: {integrity: sha512-263/0NGrn32YFYi4J533qzrQ/krmmrWwhKkzwTuM4f/07ug51odoaNjUexxO4vxlzURHcmYMH1QjvHjsNDKLVg==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} + hasBin: true + npm-run-path@5.3.0: resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -9514,6 +9601,9 @@ packages: resolution: {integrity: sha512-y1HRYy8s/RlcBvDUwKXSmkODMdx4KSuIvloCnQYJ2LdBBC1asY4HtfhXwe3UWknLakATZDnbzht2Ijw3M1EqFg==} engines: {node: '>=9.4.0 || ^8.9.4'} + once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + onetime@5.1.2: resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} engines: {node: '>=6'} @@ -9629,6 +9719,9 @@ packages: parse5@7.2.0: resolution: {integrity: sha512-ZkDsAOcxsUMZ4Lz5fVciOehNcJ+Gb8gTzcA4yl3wnc273BAybYWrQ+Ks/OjCjSEpjvQkDSeZbybK9qj2VHHdGA==} + parse5@7.2.1: + resolution: {integrity: sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ==} + parseurl@1.3.3: resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} engines: {node: '>= 0.8'} @@ -9683,6 +9776,9 @@ packages: picocolors@1.1.0: resolution: {integrity: sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==} + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} + picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} @@ -9988,6 +10084,11 @@ packages: psl@1.9.0: resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} + publint@0.2.12: + resolution: {integrity: sha512-YNeUtCVeM4j9nDiTT2OPczmlyzOkIXNtdDZnSuajAxS/nZ6j3t7Vs9SUB4euQNddiltIwu7Tdd3s+hr08fAsMw==} + engines: {node: '>=16'} + hasBin: true + punycode@2.3.1: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} @@ -10220,6 +10321,10 @@ packages: s.color@0.0.15: resolution: {integrity: sha512-AUNrbEUHeKY8XsYr/DYpl+qk5+aM+DChopnWOPEzn8YKzOhv4l2zH6LzZms3tOZP3wwdOyc0RmTciyi46HLIuA==} + sade@1.8.1: + resolution: {integrity: sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==} + engines: {node: '>=6'} + safe-buffer@5.2.1: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} @@ -10532,6 +10637,10 @@ packages: engines: {node: '>=14.0.0'} hasBin: true + tapable@2.2.1: + resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} + engines: {node: '>=6'} + tar@6.2.1: resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==} engines: {node: '>=10'} @@ -10883,6 +10992,37 @@ packages: peerDependencies: vue: '>=3.2.13' + vite@5.4.11: + resolution: {integrity: sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || >=20.0.0 + less: '*' + lightningcss: ^1.21.0 + sass: '*' + sass-embedded: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + vite@6.0.0-beta.6: resolution: {integrity: sha512-XbMzqwx2CDrOOKDDRvenHMQx+JwUTSm/1a/GgjTL6oC5XwpAk+PgoxmB6vGh2UQi0t9EIVS5d2GZXMWd4P5ahA==} engines: {node: ^18.0.0 || >=20.0.0} @@ -11193,6 +11333,9 @@ packages: resolution: {integrity: sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==} engines: {node: '>=18'} + wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + ws@8.16.0: resolution: {integrity: sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==} engines: {node: '>=10.0.0'} @@ -12597,8 +12740,28 @@ snapshots: '@libsql/win32-x64-msvc@0.4.5': optional: true + '@lit-labs/ssr-client@1.1.7': + dependencies: + '@lit/reactive-element': 2.0.4 + lit: 3.2.1 + lit-html: 3.2.0 + '@lit-labs/ssr-dom-shim@1.2.1': {} + '@lit-labs/ssr@3.2.2': + dependencies: + '@lit-labs/ssr-client': 1.1.7 + '@lit-labs/ssr-dom-shim': 1.2.1 + '@lit/reactive-element': 2.0.4 + '@parse5/tools': 0.3.0 + '@types/node': 16.18.119 + enhanced-resolve: 5.17.1 + lit: 3.2.1 + lit-element: 4.1.0 + lit-html: 3.2.0 + node-fetch: 3.3.2 + parse5: 7.2.1 + '@lit/reactive-element@2.0.4': dependencies: '@lit-labs/ssr-dom-shim': 1.2.1 @@ -12733,6 +12896,10 @@ snapshots: '@parcel/watcher-win32-x64': 2.4.1 optional: true + '@parse5/tools@0.3.0': + dependencies: + parse5: 7.2.1 + '@pkgjs/parseargs@0.11.0': optional: true @@ -12742,12 +12909,12 @@ snapshots: '@polka/url@1.0.0-next.25': {} - '@preact/preset-vite@2.8.2(@babel/core@7.25.8)(preact@10.24.3)(vite@6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1))': + '@preact/preset-vite@2.8.2(@babel/core@7.25.8)(preact@10.24.3)(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0))': dependencies: '@babel/core': 7.25.8 '@babel/plugin-transform-react-jsx': 7.25.9(@babel/core@7.25.8) '@babel/plugin-transform-react-jsx-development': 7.25.9(@babel/core@7.25.8) - '@prefresh/vite': 2.4.5(preact@10.24.3)(vite@6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1)) + '@prefresh/vite': 2.4.5(preact@10.24.3)(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0)) '@rollup/pluginutils': 4.2.1 babel-plugin-transform-hook-names: 1.0.2(@babel/core@7.25.8) debug: 4.3.7 @@ -12757,7 +12924,7 @@ snapshots: resolve: 1.22.8 source-map: 0.7.4 stack-trace: 1.0.0-pre2 - vite: 6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1) + vite: 5.4.11(@types/node@18.19.50)(sass@1.81.0) transitivePeerDependencies: - preact - supports-color @@ -12777,7 +12944,7 @@ snapshots: '@prefresh/utils@1.2.0': {} - '@prefresh/vite@2.4.5(preact@10.24.3)(vite@6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1))': + '@prefresh/vite@2.4.5(preact@10.24.3)(vite@5.4.11(@types/node@18.19.50)(sass@1.81.0))': dependencies: '@babel/core': 7.25.8 '@prefresh/babel-plugin': 0.5.1 @@ -12785,7 +12952,7 @@ snapshots: '@prefresh/utils': 1.2.0 '@rollup/pluginutils': 4.2.1 preact: 10.24.3 - vite: 6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1) + vite: 5.4.11(@types/node@18.19.50)(sass@1.81.0) transitivePeerDependencies: - supports-color @@ -13019,6 +13186,8 @@ snapshots: '@types/node@12.20.55': {} + '@types/node@16.18.119': {} + '@types/node@17.0.45': {} '@types/node@18.19.50': @@ -14088,6 +14257,11 @@ snapshots: iconv-lite: 0.6.3 whatwg-encoding: 3.1.1 + enhanced-resolve@5.17.1: + dependencies: + graceful-fs: 4.2.11 + tapable: 2.2.1 + enquirer@2.4.1: dependencies: ansi-colors: 4.1.3 @@ -14460,6 +14634,8 @@ snapshots: dependencies: minipass: 3.3.6 + fs.realpath@1.0.0: {} + fsevents@2.3.2: optional: true @@ -14497,6 +14673,14 @@ snapshots: package-json-from-dist: 1.0.0 path-scurry: 1.11.1 + glob@8.1.0: + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 5.1.6 + once: 1.4.0 + globals@11.12.0: {} globals@14.0.0: {} @@ -14544,7 +14728,7 @@ snapshots: '@types/hast': 3.0.4 devlop: 1.1.0 hast-util-from-parse5: 8.0.1 - parse5: 7.2.0 + parse5: 7.2.1 vfile: 6.0.3 vfile-message: 4.0.2 @@ -14584,7 +14768,7 @@ snapshots: hast-util-to-parse5: 8.0.0 html-void-elements: 3.0.0 mdast-util-to-hast: 13.2.0 - parse5: 7.2.0 + parse5: 7.2.1 unist-util-position: 5.0.0 unist-util-visit: 5.0.0 vfile: 6.0.3 @@ -14781,6 +14965,10 @@ snapshots: ieee754@1.2.1: {} + ignore-walk@5.0.1: + dependencies: + minimatch: 5.1.6 + ignore@5.3.2: {} immutable@5.0.3: {} @@ -14794,6 +14982,11 @@ snapshots: imurmurhash@0.1.4: {} + inflight@1.0.6: + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + inherits@2.0.4: {} inline-style-parser@0.1.1: {} @@ -14897,7 +15090,7 @@ snapshots: http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.4 is-potential-custom-element-name: 1.0.1 - parse5: 7.2.0 + parse5: 7.2.1 rrweb-cssom: 0.6.0 saxes: 6.0.0 symbol-tree: 3.2.4 @@ -15629,6 +15822,10 @@ snapshots: dependencies: brace-expansion: 1.1.11 + minimatch@5.1.6: + dependencies: + brace-expansion: 2.0.1 + minimatch@9.0.5: dependencies: brace-expansion: 2.0.1 @@ -15734,6 +15931,19 @@ snapshots: normalize-range@0.1.2: {} + npm-bundled@2.0.1: + dependencies: + npm-normalize-package-bin: 2.0.0 + + npm-normalize-package-bin@2.0.0: {} + + npm-packlist@5.1.3: + dependencies: + glob: 8.1.0 + ignore-walk: 5.0.1 + npm-bundled: 2.0.1 + npm-normalize-package-bin: 2.0.0 + npm-run-path@5.3.0: dependencies: path-key: 4.0.0 @@ -15752,6 +15962,10 @@ snapshots: on-net-listen@1.1.2: {} + once@1.4.0: + dependencies: + wrappy: 1.0.2 + onetime@5.1.2: dependencies: mimic-fn: 2.1.0 @@ -15872,16 +16086,20 @@ snapshots: parse5-htmlparser2-tree-adapter@7.0.0: dependencies: domhandler: 5.0.3 - parse5: 7.2.0 + parse5: 7.2.1 parse5-parser-stream@7.1.2: dependencies: - parse5: 7.2.0 + parse5: 7.2.1 parse5@7.2.0: dependencies: entities: 4.5.0 + parse5@7.2.1: + dependencies: + entities: 4.5.0 + parseurl@1.3.3: {} pascal-case@3.1.2: @@ -15918,6 +16136,8 @@ snapshots: picocolors@1.1.0: {} + picocolors@1.1.1: {} + picomatch@2.3.1: {} picomatch@4.0.2: {} @@ -16246,6 +16466,12 @@ snapshots: psl@1.9.0: {} + publint@0.2.12: + dependencies: + npm-packlist: 5.1.3 + picocolors: 1.1.1 + sade: 1.8.1 + punycode@2.3.1: {} querystringify@2.2.0: {} @@ -16598,6 +16824,10 @@ snapshots: s.color@0.0.15: {} + sade@1.8.1: + dependencies: + mri: 1.2.0 + safe-buffer@5.2.1: {} safer-buffer@2.1.2: {} @@ -17002,6 +17232,8 @@ snapshots: transitivePeerDependencies: - ts-node + tapable@2.2.1: {} + tar@6.2.1: dependencies: chownr: 2.0.0 @@ -17402,6 +17634,16 @@ snapshots: svgo: 3.3.2 vue: 3.5.12(typescript@5.6.3) + vite@5.4.11(@types/node@18.19.50)(sass@1.81.0): + dependencies: + esbuild: 0.21.5 + postcss: 8.4.47 + rollup: 4.27.3 + optionalDependencies: + '@types/node': 18.19.50 + fsevents: 2.3.3 + sass: 1.81.0 + vite@6.0.0-beta.6(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1): dependencies: esbuild: 0.24.0 @@ -17700,6 +17942,8 @@ snapshots: string-width: 7.2.0 strip-ansi: 7.1.0 + wrappy@1.0.2: {} + ws@8.16.0: {} xml-name-validator@5.0.0: {} diff --git a/scripts/deps/update-example-versions.js b/scripts/deps/update-example-versions.js index 077c12b978..93b8b71406 100644 --- a/scripts/deps/update-example-versions.js +++ b/scripts/deps/update-example-versions.js @@ -26,7 +26,7 @@ for (const workspaceDir of workspaceDirs) { const packageJson = await readAndParsePackageJson(packageJsonPath); if (!packageJson) continue; - if (packageJson.private === true) continue + if (packageJson.private === true) continue; if (!packageJson.name) { throw new Error(`${packageJsonPath} does not contain a "name" field.`);