0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-30 22:03:56 -05:00
This commit is contained in:
Viktor Szépe 2024-05-01 07:56:38 +02:00 committed by GitHub
parent 1b7ed7a31a
commit a146cf1012
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
52 changed files with 70 additions and 70 deletions

View file

@ -2,6 +2,6 @@
This `make-project` folder contains different files to programmatically create a new Astro project. They are created inside the `projects` folder and are gitignored. These projects are used by benchmarks for testing.
Each benchmark can specify the default project to run in its `defaultProject` export, but it can be overriden if `--project <project-name>` is passed through the CLI.
Each benchmark can specify the default project to run in its `defaultProject` export, but it can be overridden if `--project <project-name>` is passed through the CLI.
You can duplicate `_template.js` to start a new project script. All shared utilities are kept in `_util.js`.

View file

@ -95,7 +95,7 @@ The blockquote element represents content that is quoted from another source, op
#### Syntax
we can use 3 backticks ``` in new line and write snippet and close with 3 backticks on new line and to highlight language specific syntac, write one word of language name after first 3 backticks, for eg. html, javascript, css, markdown, typescript, txt, bash
we can use 3 backticks ``` in new line and write snippet and close with 3 backticks on new line and to highlight language specific syntax, write one word of language name after first 3 backticks, for eg. html, javascript, css, markdown, typescript, txt, bash
````markdown
```html

View file

@ -149,6 +149,6 @@ hr {
clip: rect(1px, 1px, 1px, 1px);
/* modern browsers, clip-path works inwards from each corner */
clip-path: inset(50%);
/* added line to stop words getting smushed together (as they go onto seperate lines and some screen readers do not understand line feeds as a space */
/* added line to stop words getting smushed together (as they go onto separate lines and some screen readers do not understand line feeds as a space */
white-space: nowrap;
}

View file

@ -14,7 +14,7 @@ export default async function fetchAPI(path: string) {
}
return JSON.parse(text);
} catch (e) {
console.error(`Recevied from API: ${text}`);
console.error(`Received from API: ${text}`);
console.error(e);
return { error: e };
}

View file

@ -8,7 +8,7 @@ import {
} from './utils';
// View Transitions support cross-document navigations.
// Should compare performace.
// Should compare performance.
// https://github.com/WICG/view-transitions/blob/main/explainer.md#cross-document-same-origin-transitions
// https://github.com/WICG/view-transitions/blob/main/explainer.md#script-events
function shouldDisableSpa() {

View file

@ -5,7 +5,7 @@
fully-poseable action figurine comes equipped with:
</p>
<ul>
<li>A fabric space suit with adjustible straps</li>
<li>A fabric space suit with adjustable straps</li>
<li>Boots lightly dusted by the lunar surface *</li>
<li>An adjustable space visor</li>
</ul>

View file

@ -146,7 +146,7 @@ test.describe('Dev Toolbar', () => {
await expect(xrayWindow.locator('astro-dev-toolbar-icon[icon=lightbulb]')).toBeVisible();
});
test('audit shows higlights and tooltips', async ({ page, astro }) => {
test('audit shows highlights and tooltips', async ({ page, astro }) => {
await page.goto(astro.resolveUrl('/'));
const toolbar = page.locator('astro-dev-toolbar');

View file

@ -9,7 +9,7 @@ export default defineConfig({
"fr",
"es",
{
path: "portugues",
path: "portuguese",
codes: [
"pt-AO",
"pt",

View file

@ -4,4 +4,4 @@ import { getLocaleByPath } from "astro:i18n";
<p>Locale: {getLocaleByPath("en")}</p> <!-- will log "en" -->
<p>Locale: {getLocaleByPath("fr")}</p> <!-- will log "fr" -->
<p>Locale: {getLocaleByPath("portugues")}</p> <!-- will log "pt-AO" -->
<p>Locale: {getLocaleByPath("portuguese")}</p> <!-- will log "pt-AO" -->

View file

@ -3,7 +3,7 @@ import { ViewTransitions } from 'astro:transitions';
// For the test fixture, we import the script but we don't use the <ViewTransitions /> component
// While this seems to be some strange mistake,
// it might be realistic, e.g. in a configurable CommenHead component
// it might be realistic, e.g. in a configurable CommentHead component
interface Props {
transitions?: string;

View file

@ -16,7 +16,7 @@ import Layout from '../components/Layout.astro';
<div id="twelve" transition:name="#! /">#! /</div>
<div id="thirteen" transition:name="_01__02___">_01__02___</div>
<div id="batch0" transition:name="\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f">control chars</div>
<div id="batch1" transition:name="\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f">punctation &amp; numbers</div>
<div id="batch1" transition:name="\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f">punctuation &amp; numbers</div>
<div id="batch2" transition:name="\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f">upper case chars</div>
<div id="batch3" transition:name="\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f">lower case chars</div>
<div id="batch4" transition:name="\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f">80-9f</div>

View file

@ -665,7 +665,7 @@ test.describe('View Transitions', () => {
await expect(h, 'should be absent').not.toHaveAttribute('class', /.*/);
});
test('Link with data-astro-reload attribute should trigger page load, no tranistion', async ({
test('Link with data-astro-reload attribute should trigger page load, no transition', async ({
page,
astro,
}) => {
@ -728,7 +728,7 @@ test.describe('View Transitions', () => {
let locator = page.locator('#click-external');
await expect(locator).toBeInViewport();
// Go to a page that has not enabled ViewTransistions
// Go to a page that has not enabled ViewTransitions
await page.click('#click-external');
locator = page.locator('#three');
await expect(locator).toHaveText('Page 3');
@ -920,7 +920,7 @@ test.describe('View Transitions', () => {
test('Use the client side router in framework components', async ({ page, astro }) => {
await page.goto(astro.resolveUrl('/client-load'));
// the button is set to naviagte() to /two
// the button is set to navigate() to /two
const button = page.locator('#react-client-load-navigate-button');
await expect(button, 'should have content').toHaveText('Navigate to `/two`');

View file

@ -68,7 +68,7 @@ function extractOrientation(exifBlock: Uint8Array, isBigEndian: boolean) {
return
}
// unsinged int has 2 bytes per component
// unsigned int has 2 bytes per component
// if there would more than 4 bytes in total it's a pointer
const numberOfComponents = readUInt(block, 32, 4, isBigEndian)
if (numberOfComponents !== 1) {

View file

@ -320,7 +320,7 @@ const chars = {
bottomRight: '╯',
};
// this is only used to deternine the column width
// this is only used to determine the column width
function annotatedFormat(mv: AnnotatedValue) {
return mv.annotation ? `${mv.value} ${mv.annotation}` : mv.value.toString();
}

View file

@ -234,7 +234,7 @@ export async function generateLookupMap({
);
// Run 10 at a time to prevent `await getEntrySlug` from accessing the filesystem all at once.
// Each await shouldn't take too long for the work to be noticably slow too.
// Each await shouldn't take too long for the work to be noticeably slow too.
const limit = pLimit(10);
const promises: Promise<void>[] = [];

View file

@ -218,7 +218,7 @@ export class BuildPipeline extends Pipeline {
// We retrieve the original JS module
const filePath = this.internals.entrySpecifierToBundleMap.get(moduleSpecifier);
if (filePath) {
// it exists, added it to pages to render, using the file path that we jus retrieved
// it exists, added it to pages to render, using the file path that we just retrieved
pages.set(pageData, filePath);
}
}

View file

@ -49,7 +49,7 @@ export async function compile({
normalizedFilename: normalizeFilename(filename, astroConfig.root),
sourcemap: 'both',
internalURL: 'astro/compiler-runtime',
// TODO: this is no longer neccessary for `Astro.site`
// TODO: this is no longer necessary for `Astro.site`
// but it somehow allows working around caching issues in content collections for some tests
astroGlobalArgs: JSON.stringify(astroConfig.site),
scopedStyleStrategy: astroConfig.scopedStyleStrategy,

View file

@ -40,7 +40,7 @@ export const REROUTABLE_STATUS_CODES = [404, 500];
/**
* The symbol which is used as a field on the request object to store the client address.
* The clientAddresss provided by the adapter (or the dev server) is stored on this field.
* The clientAddress provided by the adapter (or the dev server) is stored on this field.
*/
export const clientAddressSymbol = Symbol.for('astro.clientAddress');

View file

@ -439,8 +439,8 @@ export const NoMatchingImport = {
export const InvalidPrerenderExport = {
name: 'InvalidPrerenderExport',
title: 'Invalid prerender export.',
message(prefix: string, suffix: string, isHydridOuput: boolean) {
const defaultExpectedValue = isHydridOuput ? 'false' : 'true';
message(prefix: string, suffix: string, isHydridOutput: boolean) {
const defaultExpectedValue = isHydridOutput ? 'false' : 'true';
let msg = `A \`prerender\` export has been detected, but its value cannot be statically analyzed.`;
if (prefix !== 'const') msg += `\nExpected \`const\` declaration but got \`${prefix}\`.`;
if (suffix !== 'true')

View file

@ -62,7 +62,7 @@ const style = /* css */ `
/* Theme toggle */
--toggle-ball-color: var(--accent);
--toggle-tabel-background: var(--background);
--toggle-table-background: var(--background);
--sun-icon-color: #ffffff;
--moon-icon-color: #a3acc8;
--toggle-border-color: #C3CADB;
@ -150,7 +150,7 @@ const style = /* css */ `
}
#theme-toggle-label {
background-color: var(--toggle-tabel-background);
background-color: var(--toggle-table-background);
border-radius: 50px;
cursor: pointer;
display: flex;

View file

@ -17,7 +17,7 @@ import type { RouteData } from '../../@types/astro.js';
* - Prerendered routes are sorted before non-prerendered routes.
* - Endpoints are sorted before pages.
* For example, a file `/foo.ts` is sorted before `/bar.astro`.
* - If both routes are equal regarding all previosu conditions, they are sorted alphabetically.
* - If both routes are equal regarding all previous conditions, they are sorted alphabetically.
* For example, `/bar` is sorted before `/foo`.
* The definition of "alphabetically" is dependent on the default locale of the running system.
*/

View file

@ -45,7 +45,7 @@ export default function astroPrefetch({ settings }: { settings: AstroSettings })
},
transform(code, id) {
// NOTE: Handle replacing the specifiers even if prefetch is disabled so View Transitions
// can import the interal module as not hit runtime issues.
// can import the internal module as not hit runtime issues.
if (id.includes(prefetchInternalModuleFsSubpath)) {
return code
.replace('__PREFETCH_PREFETCH_ALL__', JSON.stringify(prefetch?.prefetchAll))

View file

@ -10,7 +10,7 @@ export function getPrerenderDefault(config: AstroConfig) {
}
/**
* Returns the correct output directory of hte SSR build based on the configuration
* Returns the correct output directory of the SSR build based on the configuration
*/
export function getOutputDirectory(config: AstroConfig): URL {
const ssr = isServerLikeOutput(config);

View file

@ -30,7 +30,7 @@ function createAstroGlobFn() {
// inside of getStaticPaths. See the `astroGlobalArgs` option for parameter type.
export function createAstro(site: string | undefined): AstroGlobalPartial {
return {
// TODO: this is no longer neccessary for `Astro.site`
// TODO: this is no longer necessary for `Astro.site`
// but it somehow allows working around caching issues in content collections for some tests
site: site ? new URL(site) : undefined,
generator: `Astro v${ASTRO_VERSION}`,

View file

@ -71,7 +71,7 @@ function reEncode(s: string) {
// we replace it with its hex value escaped by an underscore for decodability (and better readability,
// because most of them are punctuations like ,'"":;_..., and '_' might be a better choice than '-')
// The underscore itself (code 95) is also escaped and encoded as two underscores to avoid
// collitions between original and encoded strings.
// collisions between original and encoded strings.
// All other values are just copied over
result +=
codepoint < 0x80

View file

@ -457,7 +457,7 @@ async function transition(
options: Options,
historyState?: State
) {
// The most recent navigation always has precendence
// The most recent navigation always has precedence
// Yes, there can be several navigation instances as the user can click links
// while we fetch content or simulate view transitions. Even synchronous creations are possible
// e.g. by calling navigate() from an transition event.
@ -666,7 +666,7 @@ async function transition(
// Scripts that depend on the view transition pseudo elements should hook on viewTransition.ready.
await currentTransition.viewTransition.updateCallbackDone;
} catch (e) {
// This log doesn't make it worse than before, where we got error messages about uncaught exceptions, which can't be catched when the trigger was a click or history traversal.
// This log doesn't make it worse than before, where we got error messages about uncaught exceptions, which can't be caught when the trigger was a click or history traversal.
// Needs more investigation on root causes if errors still occur sporadically
const err = e as Error;
console.log('[astro]', err.name, err.message, err.stack);

View file

@ -29,7 +29,7 @@ export async function* crawlGraph(
// Needed for slower CSS preprocessing like Tailwind
loader.getModulesByFile(id) ?? new Set()
: // For non-root files, we're safe to pull from "getModuleById" based on testing.
// TODO: Find better invalidation strat to use "getModuleById" in all cases!
// TODO: Find better invalidation strategy to use "getModuleById" in all cases!
new Set([loader.getModuleById(id)]);
// Collect all imported modules for the module(s).

View file

@ -4,7 +4,7 @@ import * as cheerio from 'cheerio';
import { loadFixture } from './test-utils.js';
// note: the hashes should be deterministic, but updating the file contents will change hashes
// be careful not to test that the HTML simply contains CSS, because it always will! filename and quanity matter here (bundling).
// be careful not to test that the HTML simply contains CSS, because it always will! filename and quantity matter here (bundling).
const EXPECTED_CSS = {
'/index.html': ['/_astro/'], // dont match hashes, which change based on content
'/one/index.html': ['/_astro/'],

View file

@ -174,11 +174,11 @@ describe('Slots', () => {
it('Arguments can be passed to named slots with Astro.slots.render()', async () => {
const html = await fixture.readFile('/slotted-named-functions/index.html');
const $ = cheerio.load(html);
const befor = $('div#before');
const [beforeDiv] = befor.children('div');
assert.deepEqual(beforeDiv.firstChild.data, 'Test Content BEFORE');
const after = $('div#after');
const [afterDiv] = after.children('div');
assert.deepEqual(afterDiv.firstChild.data, 'Test Content AFTER');
const beforeDiv = $('div#before');
const [beforeChildren] = beforeDiv.children('div');
assert.deepEqual(beforeChildren.firstChild.data, 'Test Content BEFORE');
const afterDiv = $('div#after');
const [afterChildren] = afterDiv.children('div');
assert.deepEqual(afterChildren.firstChild.data, 'Test Content AFTER');
});
});

View file

@ -291,7 +291,7 @@ describe('Experimental Content Collections cache', () => {
});
describe('With empty collections directory', () => {
it('Handles the empty directory correclty', async () => {
it('Handles the empty directory correctly', async () => {
const fixture = await loadFixture({
root: './fixtures/content-collections-empty-dir/',
experimental: {

View file

@ -1,12 +1,12 @@
---
const content = 'Test Content';
const beforeConent = await Astro.slots.render("before", [{content}])
const afterConent = await Astro.slots.render("after", [{content}])
const beforeContent = await Astro.slots.render("before", [{content}])
const afterContent = await Astro.slots.render("after", [{content}])
---
<div id="before">
{beforeConent}
{beforeContent}
</div>
<div id="after">
{afterConent}
{afterContent}
</div>

View file

@ -13,7 +13,7 @@ export async function getStaticPaths() {
},
{
slug: "products/astro-handbook",
title: "The ultimative Astro handbook",
title: "The ultimate Astro handbook",
text: "If you want to learn Astro, you must read this book.",
},
];

View file

@ -1,4 +1,4 @@
<html>
<head><title>Not Found</title></head>
<body>Can't find the page youre looking for.</body>
<body>Can't find the page you're looking for.</body>
</html>

View file

@ -82,7 +82,7 @@ By looping through the same repeater, we can get all the tabs out of the databas
There are a number of ways to do this. I could ask the user to input a number to uniquely identify the tab pane. But that would add extra work to the users flow, and they might easily find themselves out of their depth. I want to make this as easy as possible for the user.
On the other hand, Wordpress has a very useful function called Sanitize HTML, which we input the value of the title, take out spaces and capitals, and use this as the link:
On the other hand, WordPress has a very useful function called Sanitize HTML, which we input the value of the title, take out spaces and capitals, and use this as the link:
```php
<a href="#<?php echo sanitize_html_class( the_sub_field( 'tab_title' ) ); ?>"
@ -112,6 +112,6 @@ The final thing to do, is to keep the counter running, but adding this just befo
Once you've added these to the tab panes in a similar way, you'll be up and running with Bootstrap Tabs.
Below is a Github Gist, with the complete code for reference. [Link to this (if you can't see the iFrame)](https://gist.github.com/endymion1818/478d86025f41c8060888 "Github GIST for Advanced Custom Fields bootstrap tabs").
Below is a GitHub Gist, with the complete code for reference. [Link to this (if you can't see the iFrame)](https://gist.github.com/endymion1818/478d86025f41c8060888 "GitHub GIST for Advanced Custom Fields bootstrap tabs").
<script src="https://gist.github.com/endymion1818/478d86025f41c8060888.js"></script>

View file

@ -5,7 +5,7 @@ import Slot from '../../components/Slot.astro';
<html>
<body>
<h3>Bug: Astro.slots.render() with arguments does not work with &lt;Fragment&gt; slot</h3>
<p>Comment out working example and uncomment non working exmaples</p>
<p>Comment out working example and uncomment non working examples</p>
<hr>
<Slot>

View file

@ -26,7 +26,7 @@ import Img from '../components/Img.vue'
<!-- Test island deduplication account for non-render affecting props. -->
<Counter start="1" step-size="2" client:load>SSR Rendered, client:load</Counter>
<Counter start="10" client:idle>SSR Rendered, client:idle</Counter>
<!-- Test that two client:visibles have unique uids -->
<!-- Test that two client:visible have unique uids -->
<Counter start="100" client:visible>SSR Rendered, client:visible</Counter>
<Counter start="1000" client:visible>SSR Rendered, client:visible</Counter>
<Img />

View file

@ -27,7 +27,7 @@ import Result from '../components/Result.vue'
<!-- Test island deduplication account for non-render affecting props. -->
<Counter start="1" step-size="2" client:load>SSR Rendered, client:load</Counter>
<Counter start="10" client:idle>SSR Rendered, client:idle</Counter>
<!-- Test that two client:visibles have unique uids -->
<!-- Test that two client:visible have unique uids -->
<Counter start="100" client:visible>SSR Rendered, client:visible</Counter>
<Counter start="1000" client:visible>SSR Rendered, client:visible</Counter>
</main>

View file

@ -358,7 +358,7 @@ describe('[DEV] i18n routing', () => {
const response = await fixture.fetch('/xyz');
assert.equal(response.status, 404);
const text = await response.text();
assert.equal(text.includes("Can't find the page youre looking for."), true);
assert.equal(text.includes("Can't find the page you're looking for."), true);
});
});
@ -1350,7 +1350,7 @@ describe('[SSR] i18n routing', () => {
const response = await app.render(request);
assert.equal(response.status, 404);
const text = await response.text();
assert.equal(text.includes("Can't find the page youre looking for."), true);
assert.equal(text.includes("Can't find the page you're looking for."), true);
});
});

View file

@ -23,7 +23,7 @@ function removeDoctypeLineInDev(html) {
}
describe('HTML minification', () => {
describe('in DEV enviroment', () => {
describe('in DEV environment', () => {
let fixture;
let devServer;
before(async () => {

View file

@ -176,7 +176,7 @@ describe.skip('Solid component dev', { todo: 'Check why the test hangs.', skip:
* I chose to make this a function to avoid accidentally sharing regex state
* between tests.
*
* NOTE: These scripts have ocassionally changed in the past. If the tests
* NOTE: These scripts have occasionally changed in the past. If the tests
* start failing after a Solid version change, we may need to find a different
* way to count the hydration scripts.
*/

View file

@ -122,7 +122,7 @@ describe('API routes in SSR', () => {
count++;
}
assert.equal(count, 2, 'Found two seperate set-cookie response headers');
assert.equal(count, 2, 'Found two separate set-cookie response headers');
});
it('Has valid api context', async () => {

View file

@ -581,7 +581,7 @@ describe('getLocaleRelativeUrlList', () => {
);
});
it('should retrieve the correct list of base URL with locales [format: directory, trailingSlash: never, routingStategy: pathname-prefix-always]', () => {
it('should retrieve the correct list of base URL with locales [format: directory, trailingSlash: never, routingStrategy: pathname-prefix-always]', () => {
/**
*
* @type {import("../../../dist/@types").AstroUserConfig}
@ -609,7 +609,7 @@ describe('getLocaleRelativeUrlList', () => {
);
});
it('should retrieve the correct list of base URL with locales [format: directory, trailingSlash: never, routingStategy: pathname-prefix-always-no-redirect]', () => {
it('should retrieve the correct list of base URL with locales [format: directory, trailingSlash: never, routingStrategy: pathname-prefix-always-no-redirect]', () => {
/**
*
* @type {import("../../../dist/@types").AstroUserConfig}
@ -1706,7 +1706,7 @@ describe('getLocaleAbsoluteUrlList', () => {
);
});
it('should retrieve the correct list of base URL with locales [format: directory, trailingSlash: ignore, routingStategy: pathname-prefix-always]', () => {
it('should retrieve the correct list of base URL with locales [format: directory, trailingSlash: ignore, routingStrategy: pathname-prefix-always]', () => {
/**
*
* @type {import("../../../dist/@types").AstroUserConfig}
@ -1739,7 +1739,7 @@ describe('getLocaleAbsoluteUrlList', () => {
);
});
it('should retrieve the correct list of base URL with locales [format: directory, trailingSlash: ignore, routingStategy: pathname-prefix-always-no-redirect]', () => {
it('should retrieve the correct list of base URL with locales [format: directory, trailingSlash: ignore, routingStrategy: pathname-prefix-always-no-redirect]', () => {
/**
*
* @type {import("../../../dist/@types").AstroUserConfig}

View file

@ -56,7 +56,7 @@ describe('project name', async () => {
assert.equal(context.projectName, 'foobar');
});
it('head and tail blank spaces should be trimed', async () => {
it('head and tail blank spaces should be trimmed', async () => {
const context = { projectName: '', cwd: '', prompt: () => ({ name: ' foobar ' }) };
await projectName(context);
assert.equal(context.cwd, 'foobar');

View file

@ -14,7 +14,7 @@ import { getAstroStudioUrl } from '../../../utils.js';
const isWebContainer =
// Stackblitz heuristic
process.versions?.webcontainer ??
// Github Codespaces heuristic
// GitHub Codespaces heuristic
process.env.CODESPACE_NAME;
export async function cmd({

View file

@ -25,7 +25,7 @@ globalThis.customElements = litCE;
const litCeDefine = customElements.define;
// We need to patch customElements.define to keep track of the tagName on the
// class itself so that we can transform JSX custom element class definintion to
// class itself so that we can transform JSX custom element class definition to
// a DSD string on the server, because there is no way to get the tagName from a
// CE class otherwise. Not an issue on client:only because the browser supports
// appending a class instance directly to the DOM.

View file

@ -53,7 +53,7 @@ export default (element: HTMLElement) =>
}
// If there is no deferral of hydration, then all reactive properties are
// already serialzied as reflected attributes, or no reactive props were set
// already serialized as reflected attributes, or no reactive props were set
// Alternatively, if hydration is client:only proceed to set props.
if (!component || !(component.hasAttribute('defer-hydration') || isClientOnly)) {
return;

View file

@ -210,7 +210,7 @@ function renderHTMLWithinPartialChecks(html) {
}
/**
* Asserts that the rendered HTML tags with interleaved Markdoc tags (both block and inline) rendered in the expected nested graph of elemements
* Asserts that the rendered HTML tags with interleaved Markdoc tags (both block and inline) rendered in the expected nested graph of elements
*
* @param {string} html */
function renderComponentsHTMLChecks(html) {

View file

@ -77,7 +77,7 @@ export const setup = async (app) => {
}
},
// Ensure that Vue components reference appEntrypoint directly
// This allows Astro to assosciate global styles imported in this file
// This allows Astro to associate global styles imported in this file
// with the pages they should be injected to
transform(code, id) {
if (!appEntrypoint) return;

View file

@ -14,7 +14,7 @@ const languagePattern = /\blanguage-(\S+)\b/;
* @param tree
* The hast tree in which to syntax highlight code blocks.
* @param highlighter
* A fnction which receives the code and language, and returns the HTML of a syntax
* A function which receives the code and language, and returns the HTML of a syntax
* highlighted `<pre>` element.
*/
export async function highlightCodeBlocks(tree: Root, highlighter: Highlighter) {

View file

@ -6,7 +6,7 @@ import type * as unified from 'unified';
let cwdUrlStr: string | undefined;
// In non-browser enviroments, we can try to resolve from the filesystem too
// In non-browser environments, we can try to resolve from the filesystem too
export async function importPlugin(p: string): Promise<unified.Plugin> {
// Try import from this package first
try {

View file

@ -177,7 +177,7 @@ async function resolveTargetVersion(packageInfo: PackageInfo, registry: string):
packageInfo.changelogTitle = 'CHANGELOG';
} else {
// Dependency updates should not include the specific dist-tag
// since they are just for compatability
// since they are just for compatibility
packageInfo.tag = undefined;
}
}

View file

@ -179,7 +179,7 @@ async function getWorkspacePackageVersion(packageName) {
const version = deps[packageName];
if (!version) {
throw new Error(
`Unable to resolve "${packageName}". Is it a depdendency of the workspace root?`
`Unable to resolve "${packageName}". Is it a dependency of the workspace root?`
);
}
return version.replace(/^\D+/, '');