diff options
Diffstat (limited to 'packages')
45 files changed, 177 insertions, 130 deletions
diff --git a/packages/astro-prism/package.json b/packages/astro-prism/package.json index 82c0c3360..f3ba16f4e 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 8de405fd7..627b4dd6c 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 0cae3a4da..178d2d9c1 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 e0cf3eef4..3ca98a18a 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 00261d5b7..37b691525 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 154ae7d7b..1e080c57a 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 3492d56c5..c6d748af0 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 ad7de6de5..545cf5ed2 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> | HeadElements; diff --git a/packages/astro/src/core/build/generate.ts b/packages/astro/src/core/build/generate.ts index 1a35e06a4..1cc25aaee 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 478d0a21a..14bb08662 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 6acc236ae..d0174e4b4 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 1b19b6064..158d5eade 100644 --- a/packages/astro/src/core/errors/errors-data.ts +++ b/packages/astro/src/core/errors/errors-data.ts @@ -1218,17 +1218,6 @@ export const EnvInvalidVariables = { /** * @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 * This module is only available server-side. */ export const ServerOnlyModule = { diff --git a/packages/astro/src/core/middleware/vite-plugin.ts b/packages/astro/src/core/middleware/vite-plugin.ts index 0b7f46c0c..10c5683f7 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 691613412..611b9cbcb 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 403b3fb95..0e8a9e338 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 3e5e993d9..97bf1d331 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-start<![endif]') { - script.previousSibling.remove(); +if (script) { + 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-start<![endif]') { + script.previousSibling.remove(); + } + script.previousSibling?.remove(); + + let frag = document.createRange().createContextualFragment(html); + script.before(frag); } - script.previousSibling?.remove(); - - let frag = document.createRange().createContextualFragment(html); - script.before(frag); + script.remove(); } -script.remove(); </script>`); }, }; diff --git a/packages/astro/test/content-layer.test.js b/packages/astro/test/content-layer.test.js index e2d92df3d..16aa96c29 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 6bced27e4..5467550d7 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 000000000..fce4a30b8 --- /dev/null +++ b/packages/astro/test/fixtures/i18n-routing/src/pages/404.astro @@ -0,0 +1,12 @@ +--- +const currentLocale = Astro.currentLocale; +--- +<html> +<head> + <title>404 - Not Found</title> +</head> +<body> + <h1>404 - Not Found</h1> + <p>Current Locale: {currentLocale ? currentLocale : "none"}</p> +</body> +</html> diff --git a/packages/astro/test/i18n-routing.test.js b/packages/astro/test/i18n-routing.test.js index 5b7e8c2e7..5e3a3d355 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 9745ad223..1d20f12b7 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 02576f84f..d513c4d0b 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 b0f3f4e3d..5c506688e 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 9e6bf7f83..05e18bc64 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 42bac876d..1c3ec68ee 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 d35e7116c..16d9864fa 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 2d9ce88d3..4b54bb6c0 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 656c45393..134ba5d86 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 e8fd6e5e6..0a171c1c0 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 e88470166..b441bca21 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 3e358a539..0010b7fdf 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 7e4bfb3a6..ec4c02b82 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 33b27651f..b798a69a0 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 ab1373bc5..5a8cf5355 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 2c07837e5..e88e6d5e7 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 ba06a9eba..073de3d41 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 7fef2f9b8..57beba344 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 c8677a607..5817fab62 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 13ceeb5e6..d06582b15 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 bbf4938b0..9f5ebfbb0 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 ac6235547..a5d2da9a4 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 d049cb063..05be0d15e 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 69aac31bc..5111f168c 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 eb5620c34..8e0d3941a 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 38655068b..872f6e729 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", |