astro 6.1.0 → 6.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/add/index.js +1 -1
- package/dist/cli/infra/build-time-astro-version-provider.js +1 -1
- package/dist/content/content-layer.js +3 -3
- package/dist/core/constants.js +1 -1
- package/dist/core/dev/dev.js +1 -1
- package/dist/core/errors/errors-data.d.ts +2 -2
- package/dist/core/messages/runtime.js +1 -1
- package/dist/runtime/client/dev-toolbar/apps/audit/rules/a11y.js +12 -2
- package/dist/transitions/swap-functions.js +6 -0
- package/dist/types/public/config.d.ts +1 -1
- package/package.json +2 -2
package/dist/cli/add/index.js
CHANGED
|
@@ -492,7 +492,7 @@ function createPrettyError(err) {
|
|
|
492
492
|
Reason: ${err.message}
|
|
493
493
|
|
|
494
494
|
You will need to add these integration(s) manually.
|
|
495
|
-
Documentation: https://docs.astro.build/en/guides/integrations
|
|
495
|
+
Documentation: https://docs.astro.build/en/guides/integrations/`;
|
|
496
496
|
return err;
|
|
497
497
|
}
|
|
498
498
|
function addIntegration(mod, integration) {
|
|
@@ -192,7 +192,7 @@ ${contentConfig.error.message}`
|
|
|
192
192
|
logger.info("Content config changed");
|
|
193
193
|
shouldClear = true;
|
|
194
194
|
}
|
|
195
|
-
if (previousAstroVersion && previousAstroVersion !== "6.1.
|
|
195
|
+
if (previousAstroVersion && previousAstroVersion !== "6.1.1") {
|
|
196
196
|
logger.info("Astro version changed");
|
|
197
197
|
shouldClear = true;
|
|
198
198
|
}
|
|
@@ -200,8 +200,8 @@ ${contentConfig.error.message}`
|
|
|
200
200
|
logger.info("Clearing content store");
|
|
201
201
|
this.#store.clearAll();
|
|
202
202
|
}
|
|
203
|
-
if ("6.1.
|
|
204
|
-
this.#store.metaStore().set("astro-version", "6.1.
|
|
203
|
+
if ("6.1.1") {
|
|
204
|
+
this.#store.metaStore().set("astro-version", "6.1.1");
|
|
205
205
|
}
|
|
206
206
|
if (currentConfigDigest) {
|
|
207
207
|
this.#store.metaStore().set("content-config-digest", currentConfigDigest);
|
package/dist/core/constants.js
CHANGED
package/dist/core/dev/dev.js
CHANGED
|
@@ -37,7 +37,7 @@ async function dev(inlineConfig) {
|
|
|
37
37
|
await telemetry.record([]);
|
|
38
38
|
const restart = await createContainerWithAutomaticRestart({ inlineConfig, fs });
|
|
39
39
|
const logger = restart.container.logger;
|
|
40
|
-
const currentVersion = "6.1.
|
|
40
|
+
const currentVersion = "6.1.1";
|
|
41
41
|
const isPrerelease = currentVersion.includes("-");
|
|
42
42
|
if (!isPrerelease) {
|
|
43
43
|
try {
|
|
@@ -29,7 +29,7 @@ export declare const UnknownCompilerError: {
|
|
|
29
29
|
/**
|
|
30
30
|
* @docs
|
|
31
31
|
* @see
|
|
32
|
-
* - [Official integrations](https://docs.astro.build/en/guides/integrations
|
|
32
|
+
* - [Official integrations](https://docs.astro.build/en/guides/integrations/#official-integrations)
|
|
33
33
|
* - [Astro.clientAddress](https://docs.astro.build/en/reference/api-reference/#clientaddress)
|
|
34
34
|
* @description
|
|
35
35
|
* The adapter you're using unfortunately does not support `Astro.clientAddress`.
|
|
@@ -128,7 +128,7 @@ export declare const MissingMediaQueryDirective: {
|
|
|
128
128
|
* @message Unable to render `COMPONENT_NAME`. There are `RENDERER_COUNT` renderer(s) configured in your `astro.config.mjs` file, but none were able to server-side render `COMPONENT_NAME`.
|
|
129
129
|
* @see
|
|
130
130
|
* - [Frameworks components](https://docs.astro.build/en/guides/framework-components/)
|
|
131
|
-
* - [UI Frameworks](https://docs.astro.build/en/guides/integrations
|
|
131
|
+
* - [UI Frameworks](https://docs.astro.build/en/guides/integrations/#official-integrations)
|
|
132
132
|
* @description
|
|
133
133
|
* None of the installed integrations were able to render the component you imported. Make sure to install the appropriate integration for the type of component you are trying to include in your page.
|
|
134
134
|
*
|
|
@@ -451,7 +451,9 @@ const a11y = [
|
|
|
451
451
|
}
|
|
452
452
|
const elementRoles = role.split(WHITESPACE_REGEX);
|
|
453
453
|
for (const elementRole of elementRoles) {
|
|
454
|
-
const
|
|
454
|
+
const roleData = roles.get(normalizeAriaRole(elementRole));
|
|
455
|
+
if (!roleData) continue;
|
|
456
|
+
const { requiredProps } = roleData;
|
|
455
457
|
const required_role_props = Object.keys(requiredProps);
|
|
456
458
|
const missingProps = required_role_props.filter((prop) => !element.hasAttribute(prop));
|
|
457
459
|
if (missingProps.length > 0) {
|
|
@@ -477,7 +479,9 @@ const a11y = [
|
|
|
477
479
|
if (!role) return false;
|
|
478
480
|
const elementRoles = role.split(WHITESPACE_REGEX);
|
|
479
481
|
for (const elementRole of elementRoles) {
|
|
480
|
-
const
|
|
482
|
+
const roleData = roles.get(normalizeAriaRole(elementRole));
|
|
483
|
+
if (!roleData) continue;
|
|
484
|
+
const { props } = roleData;
|
|
481
485
|
const attributes = getAttributeObject(element);
|
|
482
486
|
const unsupportedAttributes = aria.keys().filter((attribute) => !(attribute in props));
|
|
483
487
|
const invalidAttributes = Object.keys(attributes).filter(
|
|
@@ -546,6 +550,12 @@ function menuitem_implicit_role(attributes) {
|
|
|
546
550
|
if (!type) return;
|
|
547
551
|
return menuitem_type_to_implicit_role.get(type);
|
|
548
552
|
}
|
|
553
|
+
const ariaQueryRoleAliases = {
|
|
554
|
+
image: "img"
|
|
555
|
+
};
|
|
556
|
+
function normalizeAriaRole(role) {
|
|
557
|
+
return ariaQueryRoleAliases[role] ?? role;
|
|
558
|
+
}
|
|
549
559
|
function getRole(element) {
|
|
550
560
|
if (element.hasAttribute("role")) {
|
|
551
561
|
return element.getAttribute("role");
|
|
@@ -116,6 +116,12 @@ const persistedHeadElement = (el, newDoc) => {
|
|
|
116
116
|
const href = el.getAttribute("href");
|
|
117
117
|
return newDoc.head.querySelector(`link[rel=stylesheet][href="${href}"]`);
|
|
118
118
|
}
|
|
119
|
+
if (import.meta.env.DEV && el.tagName === "STYLE") {
|
|
120
|
+
const viteDevId = el.getAttribute("data-vite-dev-id");
|
|
121
|
+
if (viteDevId) {
|
|
122
|
+
return newDoc.head.querySelector(`style[data-vite-dev-id="${viteDevId}"]`);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
119
125
|
if (el.tagName === "STYLE" && el.textContent) {
|
|
120
126
|
const styles = newDoc.head.querySelectorAll("style");
|
|
121
127
|
for (const s of styles) {
|
|
@@ -312,7 +312,7 @@ export interface AstroUserConfig<TLocales extends Locales = never, TDriver exten
|
|
|
312
312
|
*
|
|
313
313
|
* Extend Astro with custom integrations. Integrations are your one-stop-shop for adding framework support (like Solid.js), new features (like sitemaps), and new libraries (like Partytown).
|
|
314
314
|
*
|
|
315
|
-
* Read our [Integrations Guide](https://docs.astro.build/en/guides/integrations
|
|
315
|
+
* Read our [Integrations Guide](https://docs.astro.build/en/guides/integrations/) for help getting started with Astro Integrations.
|
|
316
316
|
*
|
|
317
317
|
* ```js
|
|
318
318
|
* import react from '@astrojs/react';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "astro",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.1",
|
|
4
4
|
"description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "withastro",
|
|
@@ -153,8 +153,8 @@
|
|
|
153
153
|
"xxhash-wasm": "^1.1.0",
|
|
154
154
|
"yargs-parser": "^22.0.0",
|
|
155
155
|
"zod": "^4.3.6",
|
|
156
|
-
"@astrojs/internal-helpers": "0.8.0",
|
|
157
156
|
"@astrojs/markdown-remark": "7.1.0",
|
|
157
|
+
"@astrojs/internal-helpers": "0.8.0",
|
|
158
158
|
"@astrojs/telemetry": "3.3.0"
|
|
159
159
|
},
|
|
160
160
|
"optionalDependencies": {
|