summaryrefslogtreecommitdiff
path: root/packages/astro/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/astro/src')
-rw-r--r--packages/astro/src/assets/utils/vendor/image-size/types/jpg.ts2
-rw-r--r--packages/astro/src/cli/preferences/index.ts2
-rw-r--r--packages/astro/src/content/vite-plugin-content-virtual-mod.ts2
-rw-r--r--packages/astro/src/core/build/pipeline.ts2
-rw-r--r--packages/astro/src/core/compile/compile.ts2
-rw-r--r--packages/astro/src/core/constants.ts2
-rw-r--r--packages/astro/src/core/errors/errors-data.ts4
-rw-r--r--packages/astro/src/core/errors/overlay.ts4
-rw-r--r--packages/astro/src/core/routing/priority.ts2
-rw-r--r--packages/astro/src/prefetch/vite-plugin-prefetch.ts2
-rw-r--r--packages/astro/src/prerender/utils.ts2
-rw-r--r--packages/astro/src/runtime/server/astro-global.ts2
-rw-r--r--packages/astro/src/runtime/server/transition.ts2
-rw-r--r--packages/astro/src/transitions/router.ts4
-rw-r--r--packages/astro/src/vite-plugin-astro-server/vite.ts2
15 files changed, 18 insertions, 18 deletions
diff --git a/packages/astro/src/assets/utils/vendor/image-size/types/jpg.ts b/packages/astro/src/assets/utils/vendor/image-size/types/jpg.ts
index d80aad808..1ccf2d99f 100644
--- a/packages/astro/src/assets/utils/vendor/image-size/types/jpg.ts
+++ b/packages/astro/src/assets/utils/vendor/image-size/types/jpg.ts
@@ -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) {
diff --git a/packages/astro/src/cli/preferences/index.ts b/packages/astro/src/cli/preferences/index.ts
index dd74ee5f7..aa63690da 100644
--- a/packages/astro/src/cli/preferences/index.ts
+++ b/packages/astro/src/cli/preferences/index.ts
@@ -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();
}
diff --git a/packages/astro/src/content/vite-plugin-content-virtual-mod.ts b/packages/astro/src/content/vite-plugin-content-virtual-mod.ts
index f459a6efd..474e96235 100644
--- a/packages/astro/src/content/vite-plugin-content-virtual-mod.ts
+++ b/packages/astro/src/content/vite-plugin-content-virtual-mod.ts
@@ -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>[] = [];
diff --git a/packages/astro/src/core/build/pipeline.ts b/packages/astro/src/core/build/pipeline.ts
index 245904660..a733d4c6f 100644
--- a/packages/astro/src/core/build/pipeline.ts
+++ b/packages/astro/src/core/build/pipeline.ts
@@ -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);
}
}
diff --git a/packages/astro/src/core/compile/compile.ts b/packages/astro/src/core/compile/compile.ts
index 52e86b2b0..b6e1f927c 100644
--- a/packages/astro/src/core/compile/compile.ts
+++ b/packages/astro/src/core/compile/compile.ts
@@ -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,
diff --git a/packages/astro/src/core/constants.ts b/packages/astro/src/core/constants.ts
index f1b10a525..3347c1ec5 100644
--- a/packages/astro/src/core/constants.ts
+++ b/packages/astro/src/core/constants.ts
@@ -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');
diff --git a/packages/astro/src/core/errors/errors-data.ts b/packages/astro/src/core/errors/errors-data.ts
index e2593e6f1..180160064 100644
--- a/packages/astro/src/core/errors/errors-data.ts
+++ b/packages/astro/src/core/errors/errors-data.ts
@@ -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')
diff --git a/packages/astro/src/core/errors/overlay.ts b/packages/astro/src/core/errors/overlay.ts
index 90eff7bc7..02303409d 100644
--- a/packages/astro/src/core/errors/overlay.ts
+++ b/packages/astro/src/core/errors/overlay.ts
@@ -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;
diff --git a/packages/astro/src/core/routing/priority.ts b/packages/astro/src/core/routing/priority.ts
index c5f9892ce..408268397 100644
--- a/packages/astro/src/core/routing/priority.ts
+++ b/packages/astro/src/core/routing/priority.ts
@@ -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.
*/
diff --git a/packages/astro/src/prefetch/vite-plugin-prefetch.ts b/packages/astro/src/prefetch/vite-plugin-prefetch.ts
index 2f50f67af..9e56536d9 100644
--- a/packages/astro/src/prefetch/vite-plugin-prefetch.ts
+++ b/packages/astro/src/prefetch/vite-plugin-prefetch.ts
@@ -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))
diff --git a/packages/astro/src/prerender/utils.ts b/packages/astro/src/prerender/utils.ts
index 5cc627343..c671a68e0 100644
--- a/packages/astro/src/prerender/utils.ts
+++ b/packages/astro/src/prerender/utils.ts
@@ -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);
diff --git a/packages/astro/src/runtime/server/astro-global.ts b/packages/astro/src/runtime/server/astro-global.ts
index 3f3a2a95f..5948c8ff3 100644
--- a/packages/astro/src/runtime/server/astro-global.ts
+++ b/packages/astro/src/runtime/server/astro-global.ts
@@ -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}`,
diff --git a/packages/astro/src/runtime/server/transition.ts b/packages/astro/src/runtime/server/transition.ts
index 6514c1e91..26c5915c1 100644
--- a/packages/astro/src/runtime/server/transition.ts
+++ b/packages/astro/src/runtime/server/transition.ts
@@ -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
diff --git a/packages/astro/src/transitions/router.ts b/packages/astro/src/transitions/router.ts
index 4432c7934..9ce9d4560 100644
--- a/packages/astro/src/transitions/router.ts
+++ b/packages/astro/src/transitions/router.ts
@@ -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);
diff --git a/packages/astro/src/vite-plugin-astro-server/vite.ts b/packages/astro/src/vite-plugin-astro-server/vite.ts
index 33b3ab4ed..62bfa95d7 100644
--- a/packages/astro/src/vite-plugin-astro-server/vite.ts
+++ b/packages/astro/src/vite-plugin-astro-server/vite.ts
@@ -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).