@strifeapp/astro 1.4.0 → 1.4.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.
@@ -159,8 +159,12 @@ const editMode = Astro.locals.editMode ?? false;
159
159
 
160
160
  async function runAccessibilityAudit() {
161
161
  try {
162
- const axe = await import('axe-core');
163
- const results = await axe.default.run(document, { resultTypes: ['violations'] });
162
+ // axe-core is CJS; the ESM interop varies by bundler/consumer — the API lives
163
+ // on the default export in some setups, on the namespace itself in others, so
164
+ // handle both rather than crash on `undefined.run`.
165
+ const axeModule = await import('axe-core');
166
+ const axe: any = (axeModule as any).default ?? axeModule;
167
+ const results = await axe.run(document, { resultTypes: ['violations'] });
164
168
 
165
169
  const byImpact = { critical: 0, serious: 0, moderate: 0, minor: 0 };
166
170
  for (const violation of results.violations) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strifeapp/astro",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "Official Strife integration for Astro — connect your Astro site to a RavenDB-backed Strife content store via a strife:store virtual module.",
5
5
  "keywords": [
6
6
  "astro-integration",