fix: typos (#1526)
This commit is contained in:
@@ -3,7 +3,7 @@ description: |
|
|||||||
New versions of Fresh are regularly released. This page explains how to update your project.
|
New versions of Fresh are regularly released. This page explains how to update your project.
|
||||||
---
|
---
|
||||||
|
|
||||||
Fresh constists of multiple pieces which are independently versioned and
|
Fresh consists of multiple pieces which are independently versioned and
|
||||||
released.
|
released.
|
||||||
|
|
||||||
- Fresh (https://deno.land/x/fresh)
|
- Fresh (https://deno.land/x/fresh)
|
||||||
|
|||||||
@@ -491,7 +491,7 @@ try {
|
|||||||
new Uint8Array(faviconArrayBuffer),
|
new Uint8Array(faviconArrayBuffer),
|
||||||
);
|
);
|
||||||
} catch {
|
} catch {
|
||||||
// Skip this and be silent if there is a nework issue.
|
// Skip this and be silent if there is a network issue.
|
||||||
}
|
}
|
||||||
|
|
||||||
let MAIN_TS = `/// <reference no-default-lib="true" />
|
let MAIN_TS = `/// <reference no-default-lib="true" />
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ export async function updateCheck(
|
|||||||
// Update current version
|
// Update current version
|
||||||
checkFile.current_version = version;
|
checkFile.current_version = version;
|
||||||
|
|
||||||
// Only check in the specificed interval
|
// Only check in the specified interval
|
||||||
if (Date.now() >= new Date(checkFile.last_checked).getTime() + interval) {
|
if (Date.now() >= new Date(checkFile.last_checked).getTime() + interval) {
|
||||||
try {
|
try {
|
||||||
checkFile.latest_version = await getLatestVersion();
|
checkFile.latest_version = await getLatestVersion();
|
||||||
|
|||||||
@@ -1063,10 +1063,10 @@ export function pathToPattern(path: string): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Disallow neighbouring params like `/[id][bar].tsx` because
|
// Disallow neighbouring params like `/[id][bar].tsx` because
|
||||||
// it's ambigious where the `id` param ends and `bar` begins.
|
// it's ambiguous where the `id` param ends and `bar` begins.
|
||||||
if (part.includes("][")) {
|
if (part.includes("][")) {
|
||||||
throw new SyntaxError(
|
throw new SyntaxError(
|
||||||
`Invalid route pattern: "${path}". A parameter cannot be followed by another parameter without any charactes in between.`,
|
`Invalid route pattern: "${path}". A parameter cannot be followed by another parameter without any characters in between.`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
export default function StringEventIsland() {
|
export default function StringEventIsland() {
|
||||||
return (
|
return (
|
||||||
<button // @ts-ignore - we don't officialy recommend this, but lots of
|
<button // @ts-ignore - we don't officially recommend this, but lots of
|
||||||
// apps pre Fresh 1.2 use string based click handlers.
|
// apps pre Fresh 1.2 use string based click handlers.
|
||||||
onClick="document.querySelector('p').textContent = 'it works'">
|
onClick="document.querySelector('p').textContent = 'it works'">
|
||||||
click me
|
click me
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ export default function Page() {
|
|||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<p>it doesn't work</p>
|
<p>it doesn't work</p>
|
||||||
<button // @ts-ignore - we don't officialy recommend this, but lots of
|
<button // @ts-ignore - we don't officially recommend this, but lots of
|
||||||
// apps pre Fresh 1.2 use string based click handlers.
|
// apps pre Fresh 1.2 use string based click handlers.
|
||||||
onClick="document.querySelector('p').textContent = 'it works'">
|
onClick="document.querySelector('p').textContent = 'it works'">
|
||||||
click me
|
click me
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ export default function InsertCssrules() {
|
|||||||
{/* Status of insert css rules */}
|
{/* Status of insert css rules */}
|
||||||
{(() => {
|
{(() => {
|
||||||
if (insertedStyles.value === "") {
|
if (insertedStyles.value === "") {
|
||||||
return <p id="waitClickButton">Plese click button</p>;
|
return <p id="waitClickButton">Please click button</p>;
|
||||||
} else if (numDefCssRules.value === numCssRules.value) {
|
} else if (numDefCssRules.value === numCssRules.value) {
|
||||||
return (
|
return (
|
||||||
<p id="errorInsertCssrules">
|
<p id="errorInsertCssrules">
|
||||||
|
|||||||
+2
-2
@@ -359,7 +359,7 @@ Deno.test("static file - by 'hashed' path", async () => {
|
|||||||
assert(imgFilePath);
|
assert(imgFilePath);
|
||||||
assert(imgFilePath.includes(`?__frsh_c=${BUILD_ID}`));
|
assert(imgFilePath.includes(`?__frsh_c=${BUILD_ID}`));
|
||||||
|
|
||||||
// check the static file is served corectly under its cacheable route
|
// check the static file is served correctly under its cacheable route
|
||||||
const resp2 = await handler(
|
const resp2 = await handler(
|
||||||
new Request(`https://fresh.deno.dev${imgFilePath}`),
|
new Request(`https://fresh.deno.dev${imgFilePath}`),
|
||||||
);
|
);
|
||||||
@@ -564,7 +564,7 @@ Deno.test({
|
|||||||
assertEquals(resp.headers.get("layer3"), "fresh test server layer3");
|
assertEquals(resp.headers.get("layer3"), "fresh test server layer3");
|
||||||
// the below ensure that the middlewware are applied in the correct order.
|
// the below ensure that the middlewware are applied in the correct order.
|
||||||
// i.e response header set from layer3 middleware is overwritten
|
// i.e response header set from layer3 middleware is overwritten
|
||||||
// by the reponse header in layer 0
|
// by the response header in layer 0
|
||||||
assertEquals(resp.headers.get("server"), "fresh test server");
|
assertEquals(resp.headers.get("server"), "fresh test server");
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
+1
-1
@@ -58,7 +58,7 @@ Deno.test({
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Compare the class of element of any id with the selectorText of cssrules in stylesheet.
|
* Compare the class of element of any id with the selectorText of cssrules in stylesheet.
|
||||||
* Ensure that twind compliles the class of element.
|
* Ensure that twind compiles the class of element.
|
||||||
*/
|
*/
|
||||||
async function compiledCssRulesTest(id: string, styleId: string) {
|
async function compiledCssRulesTest(id: string, styleId: string) {
|
||||||
const elemClassList = await page.evaluate((selector) => {
|
const elemClassList = await page.evaluate((selector) => {
|
||||||
|
|||||||
@@ -206,7 +206,7 @@ export function LightWeight() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function Gabage() {
|
export function Garbage() {
|
||||||
return (
|
return (
|
||||||
<svg
|
<svg
|
||||||
class="bg-blue-200 md:bg-green-200 rounded-full w-20 h-20"
|
class="bg-blue-200 md:bg-green-200 rounded-full w-20 h-20"
|
||||||
|
|||||||
@@ -134,7 +134,7 @@ function Features() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class={item}>
|
<div class={item}>
|
||||||
<FeatureIcons.Gabage />
|
<FeatureIcons.Garbage />
|
||||||
<div class={desc}>
|
<div class={desc}>
|
||||||
<b>No configuration</b> necessary.
|
<b>No configuration</b> necessary.
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user