Skip to content

Commit

Permalink
Merge branch 'main' into feat/cooler-audits
Browse files Browse the repository at this point in the history
  • Loading branch information
Princesseuh committed Mar 8, 2024
2 parents ce0586a + c7edb22 commit 7a9f1d7
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions packages/astro/e2e/dev-toolbar.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ test.describe('Dev Toolbar', () => {
await expect(customAppNotification).toHaveAttribute('data-level', 'warning');

await expect(customAppNotification).toBeVisible();
});
});

test('can quit apps by clicking outside the window', async ({ page, astro }) => {
await page.goto(astro.resolveUrl('/'));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export default {
matches.push(element);
}
} catch (e) {
console.error("Error while running audit's match function", e);
settings.logger.error(`Error while running audit's match function: ${e}`);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { settings } from '../../../settings.js';
import type { DefinedIcon } from '../../../ui-library/icons.js';
import { a11y } from './a11y.js';
import { perf } from './perf.js';
Expand Down Expand Up @@ -60,7 +61,7 @@ export function resolveAuditRule(rule: AuditRule, element: Element): ResolvedAud

resolved[key] = value(element);
} catch (err) {
console.error(`Error resolving dynamic audit rule ${rule.code}'s ${key}:`, err);
settings.logger.error(`Error resolving dynamic audit rule ${rule.code}'s ${key}: ${err}`);
resolved[key] = 'Error resolving dynamic rule';
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getIconElement, isDefinedIcon, type Icon } from './icons.js';
import { settings } from '../settings.js';
import { type Icon, getIconElement, isDefinedIcon } from './icons.js';

const styles = ['purple', 'gray', 'red', 'green', 'yellow', 'blue'] as const;

Expand Down
4 changes: 2 additions & 2 deletions packages/astro/src/transitions/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ async function updateDOM(
const shouldCopyProps = (el: HTMLElement): boolean => {
const persistProps = el.dataset.astroTransitionPersistProps;
return persistProps == null || persistProps === 'false';
}
};

const defaultSwap = (beforeSwapEvent: TransitionBeforeSwapEvent) => {
// swap attributes of the html element
Expand Down Expand Up @@ -375,7 +375,7 @@ async function updateDOM(
// from the old page so that state is preserved.
newEl.replaceWith(el);
// For islands, copy over the props to allow them to re-render
if(newEl.localName === 'astro-island' && shouldCopyProps(el as HTMLElement)) {
if (newEl.localName === 'astro-island' && shouldCopyProps(el as HTMLElement)) {
el.setAttribute('ssr', '');
el.setAttribute('props', newEl.getAttribute('props')!);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/integrations/react/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function getChildren(childString, experimentalReactChildren) {
let rootMap = new WeakMap();
const getOrCreateRoot = (element, creator) => {
let root = rootMap.get(element);
if(!root) {
if (!root) {
root = creator();
rootMap.set(element, root);
}
Expand Down
4 changes: 2 additions & 2 deletions packages/markdown/remark/src/rehype-shiki.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { Root } from 'hast';
import type { Plugin } from 'unified';
import { createShikiHighlighter, type ShikiHighlighter } from './shiki.js';
import type { ShikiConfig } from './types.js';
import { highlightCodeBlocks } from './highlight.js';
import { type ShikiHighlighter, createShikiHighlighter } from './shiki.js';
import type { ShikiConfig } from './types.js';

export const rehypeShiki: Plugin<[ShikiConfig?], Root> = (config) => {
let highlighterAsync: Promise<ShikiHighlighter> | undefined;
Expand Down

0 comments on commit 7a9f1d7

Please sign in to comment.