diff --git a/packages/starlight-spell-checker/index.ts b/packages/starlight-spell-checker/index.ts index 02d59ec..5a5a56b 100644 --- a/packages/starlight-spell-checker/index.ts +++ b/packages/starlight-spell-checker/index.ts @@ -5,7 +5,12 @@ import { type StarlightSpellCheckerConfig, type StarlightSpellCheckerUserConfig, } from "./libs/config"; -import { logErrors, logWarnings, validateTexts } from "./libs/validation"; +import { + logErrors, + logUnsupportedLanguages, + logWarnings, + validateTexts, +} from "./libs/validation"; import { clearContentLayerCache } from "./libs/astro"; import { remarkStarlightSpellChecker } from "./libs/remark"; import { green } from "kleur/colors"; @@ -43,20 +48,17 @@ export default function starlightSpellChecker( }, ], ], + smartypants: false, }, }); }, - "astro:build:done": async ({ dir, pages }) => { - const { warnings, errors } = await validateTexts( - pages, - dir, - astroConfig, - starlightConfig, - config - ); + "astro:build:done": async () => { + const { warnings, errors, unsupportedLanguages } = + await validateTexts(config); logWarnings(logger, warnings); logErrors(logger, errors); + logUnsupportedLanguages(logger, unsupportedLanguages); if (warnings.size <= 0 && errors.size <= 0) { logger.info(green("✓ All words spelled correctly.\n")); diff --git a/packages/starlight-spell-checker/libs/config.ts b/packages/starlight-spell-checker/libs/config.ts index 8c1854d..1fb0b0f 100644 --- a/packages/starlight-spell-checker/libs/config.ts +++ b/packages/starlight-spell-checker/libs/config.ts @@ -80,6 +80,15 @@ const configSchema = z * @default false */ throwError: z.boolean().default(false), + + /** + * Defines a list of words that should be ignored by the case police checker. + * + * The words in this list will be ignored by the case police checker and will not be considered as misspelled. + * + * @default [] + */ + ignore: z.array(z.string()).default([]), }) .default({}), @@ -104,6 +113,23 @@ const configSchema = z * @default false */ throwError: z.boolean().default(false), + + /** + * Whether to ignore [literal words](https://github.com/syntax-tree/nlcst-is-literal). + * + * @default true + */ + ignoreLiterals: z.boolean().default(true), + + /** + * Whether to suggest straight (') or smart (’) apostrophes. + * + * @default "smart" + */ + mode: z + .enum(["smart", "straight"]) + .default("smart") + .transform((value) => value === "straight"), }) .default({}), @@ -152,6 +178,22 @@ const configSchema = z * @default false */ throwError: z.boolean().default(false), + + /** + * Defines a list of words that should be ignored by the equality checker. + * + * The words in this list will be ignored by the equality checker and will not be considered as inconsiderate. + * + * @default [] + */ + ignore: z.array(z.string()).default([]), + + /** + * Whether to allow "he or she", "garbagemen and garbagewomen", etc. + * + * @default false + */ + binary: z.boolean().default(false), }) .default({}), @@ -200,6 +242,15 @@ const configSchema = z * @default false */ throwError: z.boolean().default(false), + + /** + * Defines a list of words that should be ignored by the intensify checker. + * + * The words in this list will be ignored by the intensify checker and will not be considered as weak. + * + * @default [] + */ + ignore: z.array(z.string()).default([]), }) .default({}), @@ -248,6 +299,15 @@ const configSchema = z * @default false */ throwError: z.boolean().default(false), + + /** + * Defines a list of words that should be ignored by the passive checker. + * + * The words in this list will be ignored by the passive checker and will not be considered as passive. + * + * @default [] + */ + ignore: z.array(z.string()).default([]), }) .default({}), @@ -272,11 +332,36 @@ const configSchema = z * @default false */ throwError: z.boolean().default(false), + + /** + * Defines a list of words that should be ignored by the profanity checker. + * + * The words in this list will be ignored by the profanity checker and will not be considered as vulgar. + * + * @default [] + */ + ignore: z.array(z.string()).default([]), + + /** + * Minimum sureness to warn about, see [cuss](https://github.com/words/cuss) + * + * @default 0 + */ + sureness: z + .number() + .refine((val) => [0, 1, 2].includes(val), { + message: "Number must be 0, 1, or 2", + }) + .default(0), }) .default({}), /** * Configuration for the readability plugin. + * + * It applies [Dale—Chall](https://github.com/words/dale-chall-formula), +[Automated Readability](https://github.com/words/automated-readability), [Coleman-Liau](https://github.com/words/coleman-liau), [Flesch](https://github.com/words/flesch), +[Gunning-Fog](https://github.com/words/gunning-fog), [SMOG](https://github.com/words/smog-formula), and [Spache](https://github.com/words/spache-formula). */ readability: z .object({ @@ -296,6 +381,33 @@ const configSchema = z * @default false */ throwError: z.boolean().default(false), + + /** + * Defines the target age group. + * + * @default 22 + */ + age: z.number().default(22), + + /** + * Defines the minimum number of words. + * + * Evaluate sentences containing at least this number of words. While most algorithms assess the reading level of an entire text, this plugin analyzes each sentence individually. Short sentences, however, can be disproportionately influenced by a single long or complex word. + * + * @default 5 + */ + minWords: z.number().default(5), + + /** + * Defines how many algorithms (out of 7) need to agree that something is hard to read. + * + * The algorithms are: [Dale—Chall](https://github.com/words/dale-chall-formula), +[Automated Readability](https://github.com/words/automated-readability), [Coleman-Liau](https://github.com/words/coleman-liau), [Flesch](https://github.com/words/flesch), +[Gunning-Fog](https://github.com/words/gunning-fog), [SMOG](https://github.com/words/smog-formula), and [Spache](https://github.com/words/spache-formula) + * + * @default 4/7 + */ + threshold: z.number().default(4 / 7), }) .default({}), @@ -368,6 +480,15 @@ const configSchema = z * @default false */ throwError: z.boolean().default(false), + + /** + * Defines a list of words that should be ignored by the simplify checker. + * + * The words in this list will be ignored by the simplify checker and will not be considered as simplifiable. + * + * @default [] + */ + ignore: z.array(z.string()).default([]), }) .default({}), @@ -416,6 +537,55 @@ const configSchema = z * @default false */ throwError: z.boolean().default(false), + + /** + * Whether to suggest straight (') or smart (’) apostrophes. + * + * @default "smart" + */ + mode: z.enum(["smart", "straight"]).default("smart"), + + smart: z + .union([ + z.array( + z.string().refine((str) => str.length === 1 || str.length === 2, { + message: + "Each quote must be either one or two characters long.", + }) + ), + z.record( + z.array( + z + .string() + .refine((str) => str.length === 1 || str.length === 2, { + message: + "Each quote must be either one or two characters long.", + }) + ) + ), + ]) + .default(["“”", "‘’"]), + + straight: z + .union([ + z.array( + z.string().refine((str) => str.length === 1 || str.length === 2, { + message: + "Each quote must be either one or two characters long.", + }) + ), + z.record( + z.array( + z + .string() + .refine((str) => str.length === 1 || str.length === 2, { + message: + "Each quote must be either one or two characters long.", + }) + ) + ), + ]) + .default(['"', "'"]), }) .default({}), diff --git a/packages/starlight-spell-checker/libs/i18n.ts b/packages/starlight-spell-checker/libs/i18n.ts index 5a3ad17..1410d08 100644 --- a/packages/starlight-spell-checker/libs/i18n.ts +++ b/packages/starlight-spell-checker/libs/i18n.ts @@ -1,6 +1,7 @@ import { ensureLeadingSlash, ensureTrailingSlash } from "./path"; import type { StarlightUserConfig } from "./validation"; +import dictionaryDa from "dictionary-da"; import dictionaryDe from "dictionary-de"; import dictionaryEn, { type Dictionary } from "dictionary-en"; import dictionaryEs from "dictionary-es"; @@ -38,8 +39,9 @@ export function getLocaleConfig(config: StarlightUserConfig): LocaleConfig { }; } -const dictionaryMapper: Record = { +const dictionaryMapper: Record = { ar: undefined, + da: dictionaryDa, de: dictionaryDe, en: dictionaryEn, es: dictionaryEs, @@ -55,7 +57,7 @@ const dictionaryMapper: Record = { "zh-tw": undefined, }; -export function getLocaleDictionary(path: string): Dictionary { +export function getLocaleDictionary(path: string): Dictionary | undefined { return dictionaryMapper[path]; } diff --git a/packages/starlight-spell-checker/libs/remark.ts b/packages/starlight-spell-checker/libs/remark.ts index 0e56d76..aa6eb9c 100644 --- a/packages/starlight-spell-checker/libs/remark.ts +++ b/packages/starlight-spell-checker/libs/remark.ts @@ -3,18 +3,19 @@ import "mdast-util-mdx-jsx"; import nodePath from "node:path"; import { fileURLToPath } from "node:url"; -import { hasProperty } from "hast-util-has-property"; -import type { Nodes } from "hast"; -import { fromHtml } from "hast-util-from-html"; import { slug } from "github-slugger"; import type { Root } from "mdast"; -import { unified, type Plugin } from "unified"; +import { type Plugin } from "unified"; import { visit } from "unist-util-visit"; import { ensureTrailingSlash, stripLeadingSlash } from "./path"; import { getLocaleConfig, getLocale } from "./i18n"; import type { StarlightUserConfig } from "./validation"; +import { unified } from "unified"; +import rehypeParse from "rehype-parse"; +import { toText } from "hast-util-to-text"; + // All the text content keyed by locale, then keyed by file path. const contents: Contents = new Map(); @@ -33,6 +34,30 @@ export const remarkStarlightSpellChecker: Plugin< let fileContent: string = ""; + // Extract all string values from frontmatter (recursively, with HTML parsing) + const frontmatter = file.data.astro?.frontmatter; + if (frontmatter) { + const extractStrings = (obj: any): string[] => { + const strings: string[] = []; + for (const value of Object.values(obj)) { + if (typeof value === "string") { + // Parse HTML and extract text content + const htmlTree = unified() + .use(rehypeParse, { fragment: true }) + .parse(value); + const textContent = toText(htmlTree); + strings.push(textContent); + } else if (typeof value === "object" && value !== null) { + strings.push(...extractStrings(value)); + } + } + return strings; + }; + + fileContent += extractStrings(frontmatter).join("\n"); + fileContent += "\n"; // Separate frontmatter from the Markdown content + } + // https://github.com/syntax-tree/mdast#nodes // https://github.com/syntax-tree/mdast-util-mdx-jsx#nodes visit( diff --git a/packages/starlight-spell-checker/libs/validation.ts b/packages/starlight-spell-checker/libs/validation.ts index 3c73a54..a32458e 100644 --- a/packages/starlight-spell-checker/libs/validation.ts +++ b/packages/starlight-spell-checker/libs/validation.ts @@ -1,35 +1,36 @@ -import { fileURLToPath } from "node:url"; -import { statSync } from "node:fs"; - import type { StarlightUserConfig as StarlightUserConfigWithPlugins } from "@astrojs/starlight/types"; -import type { AstroConfig, AstroIntegrationLogger } from "astro"; +import type { AstroIntegrationLogger } from "astro"; import { $, bgGreen, black, blue, dim, green, red, yellow } from "kleur/colors"; import type { StarlightSpellCheckerConfig } from "../libs/config"; import { retext } from "retext"; import { getLocaleDictionary } from "./i18n"; -import { stripLeadingSlash } from "./path"; import { getValidationData } from "./remark"; import picomatch from "picomatch"; -import retextAssuming from "retext-assuming"; -// import retextCasePolice from "retext-case-police"; +import retextAssuming from "@trueberryless-org/retext-assuming"; +import retextCasePolice from "@trueberryless-org/retext-case-police"; // import retextCliches from "retext-cliches"; import retextContractions from "retext-contractions"; import retextDiacritics from "retext-diacritics"; import retextEquality from "retext-equality"; -import retextIndefiniteArticle from "retext-indefinite-article"; +import retextIndefiniteArticle from "@trueberryless-org/retext-indefinite-article"; import retextIntensify from "retext-intensify"; -import retextOveruse from "retext-overuse"; +// import retextOveruse from "retext-overuse"; import retextPassive from "retext-passive"; -import retextProfanities from "retext-profanities"; +import retextProfanitiesAr from "retext-profanities/ar-latn"; +import retextProfanitiesEn from "retext-profanities/en"; +import retextProfanitiesEs from "retext-profanities/es"; +import retextProfanitiesFr from "retext-profanities/fr"; +import retextProfanitiesIt from "retext-profanities/it"; +import retextProfanitiesPt from "retext-profanities/pt"; import retextReadability from "retext-readability"; import retextRedundantAcronyms from "retext-redundant-acronyms"; import retextRepeatedWords from "retext-repeated-words"; import retextSimplify from "retext-simplify"; import retextSpell from "retext-spell"; -import retextUsage from "retext-usage"; +import retextUsage from "@trueberryless-org/retext-usage"; import retextQuotes from "retext-quotes"; export const ValidationErrorType = { @@ -54,25 +55,25 @@ export const ValidationErrorType = { Other: "other", } as const; -export async function validateTexts( - pages: PageData[], - outputDir: URL, - astroConfig: AstroConfig, - starlightConfig: StarlightUserConfig, - options: StarlightSpellCheckerConfig -) { +export async function validateTexts(options: StarlightSpellCheckerConfig) { process.stdout.write(`\n${bgGreen(black(` validating spelling `))}\n`); const { contents } = getValidationData(); const errors: ValidationErrors = new Map(); const warnings: ValidationErrors = new Map(); + const unsupportedLanguages: UnsupportedLanguageErrors = new Set(); for (const [locale, files] of contents) { let dictionary = getLocaleDictionary(locale); + if (!dictionary) { + unsupportedLanguages.add({ locale }); + continue; + } + let retextProcessor = createProcessor(retext()) - .use(retextAssuming, options.assuming.enabled, { + .use(retextAssuming, options.assuming.enabled && locale === "en", { ...(options.assuming.phrases !== undefined && { phrases: options.assuming.phrases, }), @@ -80,18 +81,52 @@ export async function validateTexts( verbose: options.assuming.verbose, }) // .use(retextCliches) - .use(retextContractions, options.contractions.enabled) + .use( + retextContractions, + options.contractions.enabled && locale === "en", + { + allowLiterals: !options.contractions.ignoreLiterals, + straight: options.contractions.mode, + } + ) .use(retextDiacritics, options.diacritics.enabled) - .use(retextEquality, options.equality.enabled) - .use(retextIndefiniteArticle, options.indefiniteArticle.enabled) - .use(retextIntensify, options.intensify.enabled) + .use(retextEquality, options.equality.enabled && locale === "en", { + ignore: options.equality.ignore, + binary: options.equality.binary, + }) + .use( + retextIndefiniteArticle, + options.indefiniteArticle.enabled && locale === "en" + ) + .use(retextIntensify, options.intensify.enabled && locale === "en", { + ignore: options.intensify.ignore, + }) // .use(retextOveruse, options.overuse.enabled) - .use(retextPassive, options.passive.enabled) - .use(retextProfanities, options.profanities.enabled) - .use(retextReadability, options.readability.enabled) - .use(retextRedundantAcronyms, options.redundantAcronyms.enabled) + .use(retextPassive, options.passive.enabled && locale === "en", { + ignore: options.passive.ignore, + }) + .use( + profanityMapper[locale], + options.profanities.enabled && + Object.keys(profanityMapper).includes(locale), + { + ignore: options.profanities.ignore, + sureness: options.profanities.sureness, + } + ) + .use(retextReadability, options.readability.enabled && locale === "en", { + age: options.readability.age, + minWords: options.readability.minWords, + threshold: options.readability.threshold, + }) + .use( + retextRedundantAcronyms, + options.redundantAcronyms.enabled && locale === "en" + ) .use(retextRepeatedWords, options.repeatedWords.enabled) - .use(retextSimplify, options.simplify.enabled) + .use(retextSimplify, options.simplify.enabled && locale === "en", { + ignore: options.simplify.ignore, + }) .use(retextSpell, options.spell.enabled, { dictionary, ignore: options.spell.ignore, @@ -99,8 +134,19 @@ export async function validateTexts( ignoreDigits: options.spell.ignoreDigits, max: options.spell.max, }) - .use(retextUsage, options.usage.enabled) - .use(retextQuotes, options.quotes.enabled) + .use(retextUsage, options.usage.enabled && locale === "en") + .use(retextQuotes, options.quotes.enabled, { + preferred: options.quotes.mode, + smart: Array.isArray(options.quotes.smart) + ? options.quotes.smart + : options.quotes.smart[locale], + straight: Array.isArray(options.quotes.straight) + ? options.quotes.straight + : options.quotes.straight[locale], + }) + .use(retextCasePolice, options.casePolice.enabled, { + ignore: options.casePolice.ignore, + }) .build(); for (const [filePath, content] of files) { if (isExcludedPage(filePath, options.exclude)) { @@ -123,12 +169,14 @@ export async function validateTexts( fileErrors.push({ word: error.actual ?? "", type: validationErrorTypeMapper[error.source ?? "other"], + rule: error.ruleId ?? "", suggestions: error.expected ?? [], }); } else { fileWarnings.push({ word: error.actual ?? "", type: validationErrorTypeMapper[error.source ?? "other"], + rule: error.ruleId ?? "", suggestions: error.expected ?? [], }); } @@ -146,7 +194,7 @@ export async function validateTexts( } } - return { warnings, errors }; + return { warnings, errors, unsupportedLanguages }; } export function logWarnings( @@ -179,7 +227,7 @@ export function logWarnings( logger.info( ` ${blue(`${index < validationWarnings.length - 1 ? "├" : "└"}─`)} ${ validationWarning.word - }${dim(` - ${validationWarning.type}`)}${ + }${dim(` - ${validationWarning.type} - ${validationWarning.rule}`)}${ validationWarning.suggestions ? validationWarning.suggestions.length > 0 ? ` (${validationWarning.suggestions.join(", ")})` @@ -223,7 +271,7 @@ export function logErrors( logger.info( ` ${blue(`${index < validationErrors.length - 1 ? "├" : "└"}─`)} ${ validationError.word - }${dim(` - ${validationError.type}`)}${ + }${dim(` - ${validationError.type} - ${validationError.rule}`)}${ validationError.suggestions ? validationError.suggestions.length > 0 ? ` (${validationError.suggestions.join(", ")})` @@ -237,6 +285,32 @@ export function logErrors( process.stdout.write("\n"); } +export function logUnsupportedLanguages( + pluginLogger: AstroIntegrationLogger, + unsupportedLanguages: UnsupportedLanguageErrors +) { + const logger = pluginLogger.fork(""); + + if (unsupportedLanguages.size == 0) { + logger.info(green("✓ All languages supported.\n")); + } else { + logger.info( + yellow( + `✗ Unsupported ${pluralize( + unsupportedLanguages.size, + "language" + )}: ${red( + [...unsupportedLanguages] + .map((error) => error.locale) + .join(yellow(", ")) + )} (No ${ + unsupportedLanguages.size == 1 ? "dictionary" : "dictionaries" + } available.)` + ) + ); + } +} + /** * A wrapper around a retext processor to allow conditional plugin chaining. * @@ -316,6 +390,15 @@ function getThrowErrorForType( return options[optionKey]?.throwError ?? undefined; } +const profanityMapper: Record = { + ar: retextProfanitiesAr, + en: retextProfanitiesEn, + es: retextProfanitiesEs, + fr: retextProfanitiesFr, + it: retextProfanitiesIt, + "pt-BR": retextProfanitiesPt, +}; + type ValidationErrors = Map; export type ValidationErrorType = @@ -324,9 +407,16 @@ export type ValidationErrorType = interface ValidationError { word: string; type: ValidationErrorType; + rule: string; suggestions?: string[]; } +type UnsupportedLanguageErrors = Set; + +interface UnsupportedLanguageError { + locale: string; +} + const validationErrorTypeMapper: Record = { "retext-assuming": ValidationErrorType.Assuming, "retext-case-police": ValidationErrorType.CasePolice, @@ -339,6 +429,14 @@ const validationErrorTypeMapper: Record = { "retext-overuse": ValidationErrorType.Overuse, "retext-passive": ValidationErrorType.Passive, "retext-profanities": ValidationErrorType.Profanities, + "retext-profanities-ar-latn": ValidationErrorType.Profanities, + "retext-profanities-ar": ValidationErrorType.Profanities, + "retext-profanities-fr": ValidationErrorType.Profanities, + "retext-profanities-en": ValidationErrorType.Profanities, + "retext-profanities-es": ValidationErrorType.Profanities, + "retext-profanities-it": ValidationErrorType.Profanities, + "retext-profanities-pt": ValidationErrorType.Profanities, + "retext-profanities-pt-pt": ValidationErrorType.Profanities, "retext-readability": ValidationErrorType.Readability, "retext-redundant-acronyms": ValidationErrorType.RedundantAcronyms, "retext-repeated-words": ValidationErrorType.RepeatedWords, diff --git a/packages/starlight-spell-checker/package.json b/packages/starlight-spell-checker/package.json index 6448ffc..c64dd0a 100644 --- a/packages/starlight-spell-checker/package.json +++ b/packages/starlight-spell-checker/package.json @@ -10,6 +10,8 @@ }, "devDependencies": { "@astrojs/starlight": "^0.30.3", + "@vitest/coverage-v8": "^2.1.8", + "@vitest/ui": "^2.1.8", "astro": "^5.1.2", "vitest": "^2.1.8" }, @@ -30,6 +32,10 @@ }, "bugs": "https://github.com/trueberryless-org/starlight-spell-checker/issues", "dependencies": { + "@trueberryless-org/retext-assuming": "^0.1.1", + "@trueberryless-org/retext-case-police": "^0.1.1", + "@trueberryless-org/retext-indefinite-article": "^0.1.0", + "@trueberryless-org/retext-usage": "^0.1.3", "dictionary-da": "^6.0.0", "dictionary-de": "^3.0.0", "dictionary-en": "^4.0.0", @@ -41,44 +47,34 @@ "dictionary-pt": "^4.0.0", "dictionary-ru": "^3.0.0", "github-slugger": "^2.0.0", - "hast": "^1.0.0", - "hast-util-from-html": "^2.0.3", - "hast-util-has-property": "^3.0.0", + "gray-matter": "^4.0.3", + "hast-util-to-text": "^4.0.2", "kleur": "^4.1.5", "mdast": "^3.0.0", "mdast-util-mdx-jsx": "^3.1.3", - "mdast-util-to-string": "^4.0.0", "no-cliches": "^0.3.6", "picomatch": "^4.0.2", - "rehype-stringify": "^10.0.1", - "remark-parse": "^11.0.0", - "remark-rehype": "^11.1.1", - "remark-retext": "^6.0.0", + "rehype-parse": "^9.0.1", "retext": "^9.0.0", - "retext-assuming": "^1.0.0", - "retext-case-police": "^1.1.7", "retext-cliches": "^1.0.0", "retext-contractions": "^6.0.0", "retext-diacritics": "^5.0.0", "retext-equality": "^7.1.0", - "retext-indefinite-article": "^5.0.0", "retext-intensify": "^7.0.0", "retext-overuse": "^1.1.1", "retext-passive": "^5.0.0", "retext-profanities": "^8.0.0", - "retext-quotes": "^6.0.0", + "retext-quotes": "^6.0.2", "retext-readability": "^8.0.0", "retext-redundant-acronyms": "^5.0.0", "retext-repeated-words": "^5.0.0", "retext-simplify": "^8.0.0", "retext-spell": "^6.1.0", - "retext-stringify": "^4.0.0", - "retext-usage": "^0.5.0", "unified": "^11.0.5", - "unist-util-visit": "^5.0.0", - "vfile-reporter": "^8.1.1" + "unist-util-visit": "^5.0.0" }, "scripts": { - "test": "vitest" + "test": "vitest", + "coverage": "vitest run --coverage" } } diff --git a/packages/starlight-spell-checker/tests/assuming.throwError.test.ts b/packages/starlight-spell-checker/tests/assuming.throwError.test.ts new file mode 100644 index 0000000..f0b1299 --- /dev/null +++ b/packages/starlight-spell-checker/tests/assuming.throwError.test.ts @@ -0,0 +1,28 @@ +import { expect, test } from 'vitest' + +import { ValidationErrorType } from '../libs/validation' + +import { buildFixture, expectValidationErrorCount, expectValidationErrors, expectValidationSuccess } from './utils' + +test('builds with assuming throw error valid English content', async () => { + const { output, status } = await buildFixture('assuming-throw-error-valid-content') + + expect(status).toBe('success') + expectValidationSuccess(output) +}) + +test('does not build with assuming throw error invalid English content', async () => { + const { output, status } = await buildFixture('assuming-throw-error-invalid-content') + + expect(status).toBe('error') + + expectValidationErrorCount(output, 5, 1) + + expectValidationErrors(output, '/', [ + ['just', ValidationErrorType.Assuming, "no-just", []], + ['simply', ValidationErrorType.Assuming, "no-simply", []], + ['obviously', ValidationErrorType.Assuming, "no-obviously", []], + ['actually', ValidationErrorType.Assuming, "no-actually", []], + ['easy', ValidationErrorType.Assuming, "no-easy", []], + ]) +}) diff --git a/packages/starlight-spell-checker/tests/basics.test.ts b/packages/starlight-spell-checker/tests/basics.test.ts index 4c4c205..f8297ca 100644 --- a/packages/starlight-spell-checker/tests/basics.test.ts +++ b/packages/starlight-spell-checker/tests/basics.test.ts @@ -2,7 +2,7 @@ import { expect, test } from 'vitest' import { ValidationErrorType } from '../libs/validation' -import { buildFixture, expectValidationErrorCount, expectValidationErrors, expectValidationSuccess, expectValidationWarningCount, expectValidationWarnings } from './utils' +import { buildFixture, expectValidationSuccess, expectValidationWarningCount, expectValidationWarnings } from './utils' test('builds with valid English content', async () => { const { output, status } = await buildFixture('valid-content') @@ -40,12 +40,12 @@ test('builds with invalid English content, but warnings', async () => { expectValidationWarningCount(output, 6, 1) expectValidationWarnings(output, 'test/', [ - ['diped', ValidationErrorType.Spell, ["dipped", "doped", "duped", "biped", "diced", "died", "diked", "dined", "dived", "piped", "wiped"]], - ['horison', ValidationErrorType.Spell, ["orison", "horizon", "Morison"]], - ['heus', ValidationErrorType.Spell, ["hers", "hews", "he's", "hems", "hens", "hes", "hues", "Hess", "Hus", "Zeus"]], - ['evaning', ValidationErrorType.Spell, ["evading", "evening"]], - ['breze', ValidationErrorType.Spell, ["breeze", "braze", "breve"]], - ['thrugh', ValidationErrorType.Spell, ["though", "through", "thrush"]], + ['diped', ValidationErrorType.Spell, "diped", ["dipped", "doped", "duped", "biped", "diced", "died", "diked", "dined", "dived", "piped", "wiped"]], + ['horison', ValidationErrorType.Spell, "horison", ["orison", "horizon", "Morison"]], + ['heus', ValidationErrorType.Spell, "heus", ["hers", "hews", "he's", "hems", "hens", "hes", "hues", "Hess", "Hus", "Zeus"]], + ['evaning', ValidationErrorType.Spell, "evaning", ["evading", "evening"]], + ['breze', ValidationErrorType.Spell, "breze", ["breeze", "braze", "breve"]], + ['thrugh', ValidationErrorType.Spell, "thrugh", ["though", "through", "thrush"]], ]) }) @@ -57,12 +57,12 @@ test('builds with invalid German content, but warnings', async () => { expectValidationWarningCount(output, 6, 1) expectValidationWarnings(output, 'test/', [ - ['tachte', ValidationErrorType.Spell, ["dachte", "fachte", "pachte", "wachte", "takte", "-achte", "achte", "lachte", "machte", "sachte", "tauchte", "trachte"]], - ['Horisont', ValidationErrorType.Spell, ["Horizont"]], - ['Tönnen', ValidationErrorType.Spell, ["Tönen", "Gönnen", "Können", "Tannen", "Tennen", "Tonnen", "Tönten"]], - ['Briese', ValidationErrorType.Spell, ["Brise", "Briefe", "Friese", "Priese", "Riese", "-riese"]], - ['Abbends', ValidationErrorType.Spell, ["Abends"]], - ['durh', ValidationErrorType.Spell, ["durch", "Dur"]], + ['tachte', ValidationErrorType.Spell, "tachte", ["dachte", "fachte", "pachte", "wachte", "takte", "-achte", "achte", "lachte", "machte", "sachte", "tauchte", "trachte"]], + ['Horisont', ValidationErrorType.Spell, "horisont", ["Horizont"]], + ['Tönnen', ValidationErrorType.Spell, "t-nnen", ["Tönen", "Gönnen", "Können", "Tannen", "Tennen", "Tonnen", "Tönten"]], + ['Briese', ValidationErrorType.Spell, "briese", ["Brise", "Briefe", "Friese", "Priese", "Riese", "-riese"]], + ['Abbends', ValidationErrorType.Spell, "abbends", ["Abends"]], + ['durh', ValidationErrorType.Spell, "durh", ["durch", "Dur"]], ]) }) @@ -74,12 +74,12 @@ test('builds with invalid French content, but warnings', async () => { expectValidationWarningCount(output, 6, 1) expectValidationWarnings(output, 'test/', [ - ['ploungé', ValidationErrorType.Spell, ["plongé"]], - ['l\'horison', ValidationErrorType.Spell, ["l’horizon", "l’horion"]], - ['tientes', ValidationErrorType.Spell, ["fientes", "teintes", "tentes", "tiennes", "tintes"]], - ['briese', ValidationErrorType.Spell, ["briefe", "bries", "brise"]], - ['sior', ValidationErrorType.Spell, ["sir", "soir", "Dior", "Sion"]], - ['tràvers', ValidationErrorType.Spell, ["travers"]], + ['ploungé', ValidationErrorType.Spell, "ploung-", ["plongé"]], + ['l\'horison', ValidationErrorType.Spell, "l-horison", ["l’horizon", "l’horion"]], + ['tientes', ValidationErrorType.Spell, "tientes", ["fientes", "teintes", "tentes", "tiennes", "tintes"]], + ['briese', ValidationErrorType.Spell, "briese", ["briefe", "bries", "brise"]], + ['sior', ValidationErrorType.Spell, "sior", ["sir", "soir", "Dior", "Sion"]], + ['tràvers', ValidationErrorType.Spell, "tr-vers", ["travers"]], ]) }) @@ -91,29 +91,29 @@ test('builds with invalid Multilingual content, but warnings', async () => { expectValidationWarningCount(output, 18, 3) expectValidationWarnings(output, 'test/', [ - ['diped', ValidationErrorType.Spell, ["dipped", "doped", "duped", "biped", "diced", "died", "diked", "dined", "dived", "piped", "wiped"]], - ['horison', ValidationErrorType.Spell, ["orison", "horizon", "Morison"]], - ['heus', ValidationErrorType.Spell, ["hers", "hews", "he's", "hems", "hens", "hes", "hues", "Hess", "Hus", "Zeus"]], - ['evaning', ValidationErrorType.Spell, ["evading", "evening"]], - ['breze', ValidationErrorType.Spell, ["breeze", "braze", "breve"]], - ['thrugh', ValidationErrorType.Spell, ["though", "through", "thrush"]], + ['diped', ValidationErrorType.Spell, "diped", ["dipped", "doped", "duped", "biped", "diced", "died", "diked", "dined", "dived", "piped", "wiped"]], + ['horison', ValidationErrorType.Spell, "horison", ["orison", "horizon", "Morison"]], + ['heus', ValidationErrorType.Spell, "heus", ["hers", "hews", "he's", "hems", "hens", "hes", "hues", "Hess", "Hus", "Zeus"]], + ['evaning', ValidationErrorType.Spell, "evaning", ["evading", "evening"]], + ['breze', ValidationErrorType.Spell, "breze", ["breeze", "braze", "breve"]], + ['thrugh', ValidationErrorType.Spell, "thrugh", ["though", "through", "thrush"]], ]) expectValidationWarnings(output, 'de/test/', [ - ['tachte', ValidationErrorType.Spell, ["dachte", "fachte", "pachte", "wachte", "takte", "-achte", "achte", "lachte", "machte", "sachte", "tauchte", "trachte"]], - ['Horisont', ValidationErrorType.Spell, ["Horizont"]], - ['Tönnen', ValidationErrorType.Spell, ["Tönen", "Gönnen", "Können", "Tannen", "Tennen", "Tonnen", "Tönten"]], - ['Briese', ValidationErrorType.Spell, ["Brise", "Briefe", "Friese", "Priese", "Riese", "-riese"]], - ['Abbends', ValidationErrorType.Spell, ["Abends"]], - ['durh', ValidationErrorType.Spell, ["durch", "Dur"]], + ['tachte', ValidationErrorType.Spell, "tachte", ["dachte", "fachte", "pachte", "wachte", "takte", "-achte", "achte", "lachte", "machte", "sachte", "tauchte", "trachte"]], + ['Horisont', ValidationErrorType.Spell, "horisont", ["Horizont"]], + ['Tönnen', ValidationErrorType.Spell, "t-nnen", ["Tönen", "Gönnen", "Können", "Tannen", "Tennen", "Tonnen", "Tönten"]], + ['Briese', ValidationErrorType.Spell, "briese", ["Brise", "Briefe", "Friese", "Priese", "Riese", "-riese"]], + ['Abbends', ValidationErrorType.Spell, "abbends", ["Abends"]], + ['durh', ValidationErrorType.Spell, "durh", ["durch", "Dur"]], ]) expectValidationWarnings(output, 'fr/test/', [ - ['ploungé', ValidationErrorType.Spell, ["plongé"]], - ['l\'horison', ValidationErrorType.Spell, ["l’horizon", "l’horion"]], - ['tientes', ValidationErrorType.Spell, ["fientes", "teintes", "tentes", "tiennes", "tintes"]], - ['briese', ValidationErrorType.Spell, ["briefe", "bries", "brise"]], - ['sior', ValidationErrorType.Spell, ["sir", "soir", "Dior", "Sion"]], - ['tràvers', ValidationErrorType.Spell, ["travers"]], + ['ploungé', ValidationErrorType.Spell, "ploung-", ["plongé"]], + ['l\'horison', ValidationErrorType.Spell, "l-horison", ["l’horizon", "l’horion"]], + ['tientes', ValidationErrorType.Spell, "tientes", ["fientes", "teintes", "tentes", "tiennes", "tintes"]], + ['briese', ValidationErrorType.Spell, "briese", ["briefe", "bries", "brise"]], + ['sior', ValidationErrorType.Spell, "sior", ["sir", "soir", "Dior", "Sion"]], + ['tràvers', ValidationErrorType.Spell, "tr-vers", ["travers"]], ]) }) \ No newline at end of file diff --git a/packages/starlight-spell-checker/tests/casePolice.throwError.test.ts b/packages/starlight-spell-checker/tests/casePolice.throwError.test.ts new file mode 100644 index 0000000..c021274 --- /dev/null +++ b/packages/starlight-spell-checker/tests/casePolice.throwError.test.ts @@ -0,0 +1,74 @@ +import { expect, test } from 'vitest' + +import { ValidationErrorType } from '../libs/validation' + +import { buildFixture, expectValidationErrorCount, expectValidationErrors, expectValidationSuccess } from './utils' + +test('builds with case police throw error valid Multilingual content', async () => { + const { output, status } = await buildFixture('case-police-throw-error-valid-content-multilingual') + + expect(status).toBe('success') + expectValidationSuccess(output) +}) + +test('does not build with case police throw error invalid Multilingual content', async () => { + const { output, status } = await buildFixture('case-police-throw-error-invalid-content-multilingual') + + expect(status).toBe('error') + + expectValidationErrorCount(output, 45, 3) + + expectValidationErrors(output, '/', [ + ['Github', ValidationErrorType.CasePolice, "retext-case-police", ["GitHub"]], + ['kfc', ValidationErrorType.CasePolice, "retext-case-police", ["KFC"]], + ['nvidia', ValidationErrorType.CasePolice, "retext-case-police", ["NVIDIA"]], + ['dos', ValidationErrorType.CasePolice, "retext-case-police", ["DOS"]], + ['Gcp', ValidationErrorType.CasePolice, "retext-case-police", ["GCP"]], + ['posix', ValidationErrorType.CasePolice, "retext-case-police", ["POSIX"]], + ['Iaas', ValidationErrorType.CasePolice, "retext-case-police", ["IaaS"]], + ['wifi', ValidationErrorType.CasePolice, "retext-case-police", ["Wi-Fi"]], + ['eSim', ValidationErrorType.CasePolice, "retext-case-police", ["eSIM"]], + ['Airpods', ValidationErrorType.CasePolice, "retext-case-police", ["AirPods"]], + ['1password', ValidationErrorType.CasePolice, "retext-case-police", ["1Password"]], + ['Angularjs', ValidationErrorType.CasePolice, "retext-case-police", ["AngularJS"]], + ['Commonjs', ValidationErrorType.CasePolice, "retext-case-police", ["CommonJS"]], + ['ms-dos', ValidationErrorType.CasePolice, "retext-case-police", ["MS-DOS"]], + ['sqlserver', ValidationErrorType.CasePolice, "retext-case-police", ["SQLServer"]], + ]) + + expectValidationErrors(output, 'de/', [ + ['Github', ValidationErrorType.CasePolice, "retext-case-police", ["GitHub"]], + ['kfc', ValidationErrorType.CasePolice, "retext-case-police", ["KFC"]], + ['nvidia', ValidationErrorType.CasePolice, "retext-case-police", ["NVIDIA"]], + ['dos', ValidationErrorType.CasePolice, "retext-case-police", ["DOS"]], + ['Gcp', ValidationErrorType.CasePolice, "retext-case-police", ["GCP"]], + ['posix', ValidationErrorType.CasePolice, "retext-case-police", ["POSIX"]], + ['Iaas', ValidationErrorType.CasePolice, "retext-case-police", ["IaaS"]], + ['wifi', ValidationErrorType.CasePolice, "retext-case-police", ["Wi-Fi"]], + ['eSim', ValidationErrorType.CasePolice, "retext-case-police", ["eSIM"]], + ['Airpods', ValidationErrorType.CasePolice, "retext-case-police", ["AirPods"]], + ['1password', ValidationErrorType.CasePolice, "retext-case-police", ["1Password"]], + ['Angularjs', ValidationErrorType.CasePolice, "retext-case-police", ["AngularJS"]], + ['Commonjs', ValidationErrorType.CasePolice, "retext-case-police", ["CommonJS"]], + ['ms-dos', ValidationErrorType.CasePolice, "retext-case-police", ["MS-DOS"]], + ['sqlserver', ValidationErrorType.CasePolice, "retext-case-police", ["SQLServer"]], + ]) + + expectValidationErrors(output, 'fr/', [ + ['Github', ValidationErrorType.CasePolice, "retext-case-police", ["GitHub"]], + ['kfc', ValidationErrorType.CasePolice, "retext-case-police", ["KFC"]], + ['nvidia', ValidationErrorType.CasePolice, "retext-case-police", ["NVIDIA"]], + ['dos', ValidationErrorType.CasePolice, "retext-case-police", ["DOS"]], + ['Gcp', ValidationErrorType.CasePolice, "retext-case-police", ["GCP"]], + ['posix', ValidationErrorType.CasePolice, "retext-case-police", ["POSIX"]], + ['Iaas', ValidationErrorType.CasePolice, "retext-case-police", ["IaaS"]], + ['wifi', ValidationErrorType.CasePolice, "retext-case-police", ["Wi-Fi"]], + ['eSim', ValidationErrorType.CasePolice, "retext-case-police", ["eSIM"]], + ['Airpods', ValidationErrorType.CasePolice, "retext-case-police", ["AirPods"]], + ['1password', ValidationErrorType.CasePolice, "retext-case-police", ["1Password"]], + ['Angularjs', ValidationErrorType.CasePolice, "retext-case-police", ["AngularJS"]], + ['Commonjs', ValidationErrorType.CasePolice, "retext-case-police", ["CommonJS"]], + ['ms-dos', ValidationErrorType.CasePolice, "retext-case-police", ["MS-DOS"]], + ['sqlserver', ValidationErrorType.CasePolice, "retext-case-police", ["SQLServer"]], + ]) +}) diff --git a/packages/starlight-spell-checker/tests/contractions.throwError.ignoreLiteralsFalse.test.ts b/packages/starlight-spell-checker/tests/contractions.throwError.ignoreLiteralsFalse.test.ts new file mode 100644 index 0000000..74db7e1 --- /dev/null +++ b/packages/starlight-spell-checker/tests/contractions.throwError.ignoreLiteralsFalse.test.ts @@ -0,0 +1,27 @@ +import { expect, test } from 'vitest' + +import { ValidationErrorType } from '../libs/validation' + +import { buildFixture, expectValidationErrorCount, expectValidationErrors, expectValidationSuccess } from './utils' + +test('builds with contractions throw error valid English content', async () => { + const { output, status } = await buildFixture('contractions-throw-error-ignore-literals-false-valid-content') + + expect(status).toBe('success') + expectValidationSuccess(output) +}) + +test('does not build with contractions throw error invalid English content', async () => { + const { output, status } = await buildFixture('contractions-throw-error-ignore-literals-false-invalid-content') + + expect(status).toBe('error') + + expectValidationErrorCount(output, 4, 1) + + expectValidationErrors(output, '/', [ + ['does’nt', ValidationErrorType.Contractions, "missing-smart-apostrophe", ["doesn’t"]], + ['yall', ValidationErrorType.Contractions, "missing-smart-apostrophe", ["y’all"]], + ['isnt', ValidationErrorType.Contractions, "missing-smart-apostrophe", ["isn’t"]], + ['oc\'lock', ValidationErrorType.Contractions, "missing-smart-apostrophe", ["o’clock"]], + ]) +}) diff --git a/packages/starlight-spell-checker/tests/contractions.throwError.modeStraight.test.ts b/packages/starlight-spell-checker/tests/contractions.throwError.modeStraight.test.ts new file mode 100644 index 0000000..d74bef1 --- /dev/null +++ b/packages/starlight-spell-checker/tests/contractions.throwError.modeStraight.test.ts @@ -0,0 +1,25 @@ +import { expect, test } from 'vitest' + +import { ValidationErrorType } from '../libs/validation' + +import { buildFixture, expectValidationErrorCount, expectValidationErrors, expectValidationSuccess } from './utils' + +test('builds with contractions throw error valid English content', async () => { + const { output, status } = await buildFixture('contractions-throw-error-mode-straight-valid-content') + + expect(status).toBe('success') + expectValidationSuccess(output) +}) + +test('does not build with contractions throw error invalid English content', async () => { + const { output, status } = await buildFixture('contractions-throw-error-mode-straight-invalid-content') + + expect(status).toBe('error') + + expectValidationErrorCount(output, 2, 1) + + expectValidationErrors(output, '/', [ + ['isnt', ValidationErrorType.Contractions, "missing-straight-apostrophe", ["isn't"]], + ['oc\'lock', ValidationErrorType.Contractions, "missing-straight-apostrophe", ["o'clock"]], + ]) +}) diff --git a/packages/starlight-spell-checker/tests/contractions.throwError.test.ts b/packages/starlight-spell-checker/tests/contractions.throwError.test.ts new file mode 100644 index 0000000..fa96355 --- /dev/null +++ b/packages/starlight-spell-checker/tests/contractions.throwError.test.ts @@ -0,0 +1,25 @@ +import { expect, test } from 'vitest' + +import { ValidationErrorType } from '../libs/validation' + +import { buildFixture, expectValidationErrorCount, expectValidationErrors, expectValidationSuccess } from './utils' + +test('builds with contractions throw error valid English content', async () => { + const { output, status } = await buildFixture('contractions-throw-error-valid-content') + + expect(status).toBe('success') + expectValidationSuccess(output) +}) + +test('does not build with contractions throw error invalid English content', async () => { + const { output, status } = await buildFixture('contractions-throw-error-invalid-content') + + expect(status).toBe('error') + + expectValidationErrorCount(output, 2, 1) + + expectValidationErrors(output, '/', [ + ['isnt', ValidationErrorType.Contractions, "missing-smart-apostrophe", ["isn’t"]], + ['oc\'lock', ValidationErrorType.Contractions, "missing-smart-apostrophe", ["o’clock"]], + ]) +}) diff --git a/packages/starlight-spell-checker/tests/diacritics.throwError.test.ts b/packages/starlight-spell-checker/tests/diacritics.throwError.test.ts new file mode 100644 index 0000000..c607455 --- /dev/null +++ b/packages/starlight-spell-checker/tests/diacritics.throwError.test.ts @@ -0,0 +1,26 @@ +import { expect, test } from 'vitest' + +import { ValidationErrorType } from '../libs/validation' + +import { buildFixture, expectValidationErrorCount, expectValidationErrors, expectValidationSuccess } from './utils' + +test('builds with diacritics throw error valid English content', async () => { + const { output, status } = await buildFixture('diacritics-throw-error-valid-content') + + expect(status).toBe('success') + expectValidationSuccess(output) +}) + +test('does not build with diacritics throw error invalid English content', async () => { + const { output, status } = await buildFixture('diacritics-throw-error-invalid-content') + + expect(status).toBe('error') + + expectValidationErrorCount(output, 3, 1) + + expectValidationErrors(output, '/', [ + ['Beyonce', ValidationErrorType.Diacritics, "beyonce", ["Beyoncé"]], + ['creme fresh', ValidationErrorType.Diacritics, "creme-fresh", ["crème fraîche"]], + ['his resume', ValidationErrorType.Diacritics, "his-resume", ["his résumé"]], + ]) +}) diff --git a/packages/starlight-spell-checker/tests/equality.throwError.binaryTrue.test.ts b/packages/starlight-spell-checker/tests/equality.throwError.binaryTrue.test.ts new file mode 100644 index 0000000..8a64514 --- /dev/null +++ b/packages/starlight-spell-checker/tests/equality.throwError.binaryTrue.test.ts @@ -0,0 +1,24 @@ +import { expect, test } from 'vitest' + +import { ValidationErrorType } from '../libs/validation' + +import { buildFixture, expectValidationErrorCount, expectValidationErrors, expectValidationSuccess } from './utils' + +test('builds with equality throw error binary true valid English content', async () => { + const { output, status } = await buildFixture('equality-throw-error-binary-true-valid-content') + + expect(status).toBe('success') + expectValidationSuccess(output) +}) + +test('does not build with equality throw error binary true invalid English content', async () => { + const { output, status } = await buildFixture('equality-throw-error-binary-true-invalid-content') + + expect(status).toBe('error') + + expectValidationErrorCount(output, 1, 1) + + expectValidationErrors(output, '/', [ + ['obviously', ValidationErrorType.Equality, "obvious", []], + ]) +}) diff --git a/packages/starlight-spell-checker/tests/equality.throwError.test.ts b/packages/starlight-spell-checker/tests/equality.throwError.test.ts new file mode 100644 index 0000000..4224183 --- /dev/null +++ b/packages/starlight-spell-checker/tests/equality.throwError.test.ts @@ -0,0 +1,26 @@ +import { expect, test } from 'vitest' + +import { ValidationErrorType } from '../libs/validation' + +import { buildFixture, expectValidationErrorCount, expectValidationErrors, expectValidationSuccess } from './utils' + +test('builds with equality throw error valid English content', async () => { + const { output, status } = await buildFixture('equality-throw-error-valid-content') + + expect(status).toBe('success') + expectValidationSuccess(output) +}) + +test('does not build with equality throw error invalid English content', async () => { + const { output, status } = await buildFixture('equality-throw-error-invalid-content') + + expect(status).toBe('error') + + expectValidationErrorCount(output, 3, 1) + + expectValidationErrors(output, '/', [ + ['obviously', ValidationErrorType.Equality, "obvious", []], + ['Brother', ValidationErrorType.Equality, "brother-sister", ["Sibling"]], + ['sister', ValidationErrorType.Equality, "brother-sister", ["sibling"]], + ]) +}) diff --git a/packages/starlight-spell-checker/tests/fixtures/assuming-throw-error-invalid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/assuming-throw-error-invalid-content/astro.config.ts new file mode 100644 index 0000000..fc7275f --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/assuming-throw-error-invalid-content/astro.config.ts @@ -0,0 +1,24 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + assuming: { + enabled: true, + throwError: true, + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - assuming throw error invalid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/assuming-throw-error-invalid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/assuming-throw-error-invalid-content/package.json new file mode 100644 index 0000000..20eab5c --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/assuming-throw-error-invalid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/assuming-throw-error-invalid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/assuming-throw-error-invalid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/assuming-throw-error-invalid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/assuming-throw-error-invalid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/assuming-throw-error-invalid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/assuming-throw-error-invalid-content/src/content/docs/index.md new file mode 100644 index 0000000..5248a42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/assuming-throw-error-invalid-content/src/content/docs/index.md @@ -0,0 +1,8 @@ +--- +title: Index +--- + +You can just import an ES6 module. +Everything is simply Javascript. +Obviously you would need NodeJS > 8. +Actually, it's quite easy to use. diff --git a/packages/starlight-spell-checker/tests/fixtures/assuming-throw-error-valid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/assuming-throw-error-valid-content/astro.config.ts new file mode 100644 index 0000000..659f205 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/assuming-throw-error-valid-content/astro.config.ts @@ -0,0 +1,24 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + assuming: { + enabled: true, + throwError: true, + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - assuming throw error valid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/assuming-throw-error-valid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/assuming-throw-error-valid-content/package.json new file mode 100644 index 0000000..430eeeb --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/assuming-throw-error-valid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/assuming-throw-error-valid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/assuming-throw-error-valid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/assuming-throw-error-valid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/assuming-throw-error-valid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/assuming-throw-error-valid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/assuming-throw-error-valid-content/src/content/docs/index.md new file mode 100644 index 0000000..723565f --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/assuming-throw-error-valid-content/src/content/docs/index.md @@ -0,0 +1,8 @@ +--- +title: Index +--- + +You can import an ES6 module. +Everything is Javascript. +You would need NodeJS > 8. +It's quite usable. diff --git a/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-invalid-content-multilingual/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-invalid-content-multilingual/astro.config.ts new file mode 100644 index 0000000..98585b7 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-invalid-content-multilingual/astro.config.ts @@ -0,0 +1,38 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + casePolice: { + enabled: true, + throwError: true, + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - case police throw error invalid content multilingual", + locales: { + root: { + lang: "en", + label: "English", + }, + de: { + lang: "de", + label: "Deutsch", + }, + fr: { + lang: "fr", + label: "Français", + }, + }, + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-invalid-content-multilingual/package.json b/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-invalid-content-multilingual/package.json new file mode 100644 index 0000000..df32f00 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-invalid-content-multilingual/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/case-police-throw-error-invalid-content-multilingual", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-invalid-content-multilingual/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-invalid-content-multilingual/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-invalid-content-multilingual/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-invalid-content-multilingual/src/content/docs/de/index.md b/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-invalid-content-multilingual/src/content/docs/de/index.md new file mode 100644 index 0000000..5c7aeda --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-invalid-content-multilingual/src/content/docs/de/index.md @@ -0,0 +1,37 @@ +--- +title: Verzeichnis +--- + +# Marken + +- Github +- Airbnb +- kfc +- nvidia + +# Abkürzungen + +- dos +- Gcp +- posix + +# Allgemein + +- Iaas +- wifi +- eSim + +# Produkte + +- Yubikey +- imax +- Airpods + +# Software + +- 1password +- Angularjs +- Bluesky +- Commonjs +- ms-dos +- sqlserver diff --git a/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-invalid-content-multilingual/src/content/docs/fr/index.md b/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-invalid-content-multilingual/src/content/docs/fr/index.md new file mode 100644 index 0000000..56834ca --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-invalid-content-multilingual/src/content/docs/fr/index.md @@ -0,0 +1,37 @@ +--- +title: Indice +--- + +# Marque + +- Github +- Airbnb +- kfc +- nvidia + +# Abréger + +- dos +- Gcp +- posix + +# Génériques + +- Iaas +- wifi +- eSim + +# Produit + +- Yubikey +- imax +- Airpods + +# Logiciel + +- 1password +- Angularjs +- Bluesky +- Commonjs +- ms-dos +- sqlserver diff --git a/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-invalid-content-multilingual/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-invalid-content-multilingual/src/content/docs/index.md new file mode 100644 index 0000000..f6662b3 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-invalid-content-multilingual/src/content/docs/index.md @@ -0,0 +1,37 @@ +--- +title: Index +--- + +# Brands + +- Github +- Airbnb +- kfc +- nvidia + +# Abbreviates + +- dos +- Gcp +- posix + +# General + +- Iaas +- wifi +- eSim + +# Products + +- Yubikey +- imax +- Airpods + +# Softwares + +- 1password +- Angularjs +- Bluesky +- Commonjs +- ms-dos +- sqlserver diff --git a/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-valid-content-multilingual/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-valid-content-multilingual/astro.config.ts new file mode 100644 index 0000000..8f8a176 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-valid-content-multilingual/astro.config.ts @@ -0,0 +1,38 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + casePolice: { + enabled: true, + throwError: true, + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - case police throw error valid content multilingual", + locales: { + root: { + lang: "en", + label: "English", + }, + de: { + lang: "de", + label: "Deutsch", + }, + fr: { + lang: "fr", + label: "Français", + }, + }, + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-valid-content-multilingual/package.json b/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-valid-content-multilingual/package.json new file mode 100644 index 0000000..db61b8e --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-valid-content-multilingual/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/case-police-throw-error-valid-content-multilingual", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-valid-content-multilingual/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-valid-content-multilingual/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-valid-content-multilingual/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-valid-content-multilingual/src/content/docs/de/index.md b/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-valid-content-multilingual/src/content/docs/de/index.md new file mode 100644 index 0000000..66167cd --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-valid-content-multilingual/src/content/docs/de/index.md @@ -0,0 +1,37 @@ +--- +title: Verzeichnis +--- + +# Marken + +- GitHub +- Airbnb +- KFC +- NVIDIA + +# Abkürzungen + +- DOS +- GCP +- POSIX + +# Allgemein + +- IaaS +- Wi-Fi +- eSIM + +# Produkte + +- YubiKey +- iMac +- AirPods + +# Software + +- 1Password +- AngularJS +- Bluesky +- CommonJS +- MS-DOS +- SQLServer diff --git a/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-valid-content-multilingual/src/content/docs/fr/index.md b/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-valid-content-multilingual/src/content/docs/fr/index.md new file mode 100644 index 0000000..3732666 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-valid-content-multilingual/src/content/docs/fr/index.md @@ -0,0 +1,37 @@ +--- +title: Indice +--- + +# Marque + +- GitHub +- Airbnb +- KFC +- NVIDIA + +# Abréger + +- DOS +- GCP +- POSIX + +# Génériques + +- IaaS +- Wi-Fi +- eSIM + +# Produit + +- YubiKey +- iMac +- AirPods + +# Logiciel + +- 1Password +- AngularJS +- Bluesky +- CommonJS +- MS-DOS +- SQLServer diff --git a/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-valid-content-multilingual/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-valid-content-multilingual/src/content/docs/index.md new file mode 100644 index 0000000..fdf32dc --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-valid-content-multilingual/src/content/docs/index.md @@ -0,0 +1,37 @@ +--- +title: Index +--- + +# Brands + +- GitHub +- Airbnb +- KFC +- NVIDIA + +# Abbreviates + +- DOS +- GCP +- POSIX + +# General + +- IaaS +- Wi-Fi +- eSIM + +# Products + +- YubiKey +- iMac +- AirPods + +# Softwares + +- 1Password +- AngularJS +- Bluesky +- CommonJS +- MS-DOS +- SQLServer diff --git a/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-ignore-literals-false-invalid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-ignore-literals-false-invalid-content/astro.config.ts new file mode 100644 index 0000000..da5acef --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-ignore-literals-false-invalid-content/astro.config.ts @@ -0,0 +1,25 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + contractions: { + enabled: true, + throwError: true, + ignoreLiterals: false, + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - contractions throw error ignore literals false invalid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-ignore-literals-false-invalid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-ignore-literals-false-invalid-content/package.json new file mode 100644 index 0000000..8f7f07f --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-ignore-literals-false-invalid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/contractions-throw-error-ignore-literals-false-invalid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-ignore-literals-false-invalid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-ignore-literals-false-invalid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-ignore-literals-false-invalid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-ignore-literals-false-invalid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-ignore-literals-false-invalid-content/src/content/docs/index.md new file mode 100644 index 0000000..3a70cf5 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-ignore-literals-false-invalid-content/src/content/docs/index.md @@ -0,0 +1,5 @@ +--- +title: Index +--- + +Well, it «does’nt» have to be so bad — yall —, it isnt nine oc'lock. diff --git a/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-ignore-literals-false-valid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-ignore-literals-false-valid-content/astro.config.ts new file mode 100644 index 0000000..1eede47 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-ignore-literals-false-valid-content/astro.config.ts @@ -0,0 +1,25 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + contractions: { + enabled: true, + throwError: true, + ignoreLiterals: false, + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - contractions throw error ignore literals false valid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-ignore-literals-false-valid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-ignore-literals-false-valid-content/package.json new file mode 100644 index 0000000..085cceb --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-ignore-literals-false-valid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/contractions-throw-error-ignore-literals-false-valid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-ignore-literals-false-valid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-ignore-literals-false-valid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-ignore-literals-false-valid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-ignore-literals-false-valid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-ignore-literals-false-valid-content/src/content/docs/index.md new file mode 100644 index 0000000..e83c302 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-ignore-literals-false-valid-content/src/content/docs/index.md @@ -0,0 +1,5 @@ +--- +title: Index +--- + +Well, it «doesn’t» have to be so bad — y’all —, it isn’t nine o’clock. diff --git a/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-invalid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-invalid-content/astro.config.ts new file mode 100644 index 0000000..4fa211a --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-invalid-content/astro.config.ts @@ -0,0 +1,24 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + contractions: { + enabled: true, + throwError: true, + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - contractions throw error invalid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-invalid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-invalid-content/package.json new file mode 100644 index 0000000..e9b0c5f --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-invalid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/contractions-throw-error-invalid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-invalid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-invalid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-invalid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-invalid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-invalid-content/src/content/docs/index.md new file mode 100644 index 0000000..3a70cf5 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-invalid-content/src/content/docs/index.md @@ -0,0 +1,5 @@ +--- +title: Index +--- + +Well, it «does’nt» have to be so bad — yall —, it isnt nine oc'lock. diff --git a/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-mode-straight-invalid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-mode-straight-invalid-content/astro.config.ts new file mode 100644 index 0000000..566a417 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-mode-straight-invalid-content/astro.config.ts @@ -0,0 +1,25 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + contractions: { + enabled: true, + throwError: true, + mode: "straight", + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - contractions throw error mode straight invalid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-mode-straight-invalid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-mode-straight-invalid-content/package.json new file mode 100644 index 0000000..a6ee84f --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-mode-straight-invalid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/contractions-throw-error-mode-straight-invalid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-mode-straight-invalid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-mode-straight-invalid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-mode-straight-invalid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-mode-straight-invalid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-mode-straight-invalid-content/src/content/docs/index.md new file mode 100644 index 0000000..3a70cf5 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-mode-straight-invalid-content/src/content/docs/index.md @@ -0,0 +1,5 @@ +--- +title: Index +--- + +Well, it «does’nt» have to be so bad — yall —, it isnt nine oc'lock. diff --git a/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-mode-straight-valid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-mode-straight-valid-content/astro.config.ts new file mode 100644 index 0000000..675bc9a --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-mode-straight-valid-content/astro.config.ts @@ -0,0 +1,25 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + contractions: { + enabled: true, + throwError: true, + mode: "straight", + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - contractions throw error mode straight valid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-mode-straight-valid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-mode-straight-valid-content/package.json new file mode 100644 index 0000000..2970eb8 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-mode-straight-valid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/contractions-throw-error-mode-straight-valid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-mode-straight-valid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-mode-straight-valid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-mode-straight-valid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-mode-straight-valid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-mode-straight-valid-content/src/content/docs/index.md new file mode 100644 index 0000000..75e5229 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-mode-straight-valid-content/src/content/docs/index.md @@ -0,0 +1,5 @@ +--- +title: Index +--- + +Well, it «doesn’t» have to be so bad — y'all —, it isn't nine o'clock. diff --git a/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-valid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-valid-content/astro.config.ts new file mode 100644 index 0000000..3394d0e --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-valid-content/astro.config.ts @@ -0,0 +1,24 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + contractions: { + enabled: true, + throwError: true, + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - contractions throw error valid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-valid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-valid-content/package.json new file mode 100644 index 0000000..07577c2 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-valid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/contractions-throw-error-valid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-valid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-valid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-valid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-valid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-valid-content/src/content/docs/index.md new file mode 100644 index 0000000..ec43097 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-valid-content/src/content/docs/index.md @@ -0,0 +1,5 @@ +--- +title: Index +--- + +Well, it «doesn’t» have to be so bad — y'all —, it isn’t nine o’clock. diff --git a/packages/starlight-spell-checker/tests/fixtures/diacritics-throw-error-invalid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/diacritics-throw-error-invalid-content/astro.config.ts new file mode 100644 index 0000000..92ecbfc --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/diacritics-throw-error-invalid-content/astro.config.ts @@ -0,0 +1,24 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + diacritics: { + enabled: true, + throwError: true, + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - diacritics throw error invalid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/diacritics-throw-error-invalid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/diacritics-throw-error-invalid-content/package.json new file mode 100644 index 0000000..4088b9b --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/diacritics-throw-error-invalid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/diacritics-throw-error-invalid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/diacritics-throw-error-invalid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/diacritics-throw-error-invalid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/diacritics-throw-error-invalid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/diacritics-throw-error-invalid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/diacritics-throw-error-invalid-content/src/content/docs/index.md new file mode 100644 index 0000000..d6404ba --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/diacritics-throw-error-invalid-content/src/content/docs/index.md @@ -0,0 +1,5 @@ +--- +title: Index +--- + +Beyonce is the creme fresh on his resume. diff --git a/packages/starlight-spell-checker/tests/fixtures/diacritics-throw-error-valid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/diacritics-throw-error-valid-content/astro.config.ts new file mode 100644 index 0000000..54ba3c7 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/diacritics-throw-error-valid-content/astro.config.ts @@ -0,0 +1,24 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + diacritics: { + enabled: true, + throwError: true, + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - diacritics throw error valid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/diacritics-throw-error-valid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/diacritics-throw-error-valid-content/package.json new file mode 100644 index 0000000..5f428b4 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/diacritics-throw-error-valid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/diacritics-throw-error-valid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/diacritics-throw-error-valid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/diacritics-throw-error-valid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/diacritics-throw-error-valid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/diacritics-throw-error-valid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/diacritics-throw-error-valid-content/src/content/docs/index.md new file mode 100644 index 0000000..0989f8d --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/diacritics-throw-error-valid-content/src/content/docs/index.md @@ -0,0 +1,5 @@ +--- +title: Index +--- + +Beyoncé is the crème fraîche on his résumé. diff --git a/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-binary-true-invalid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-binary-true-invalid-content/astro.config.ts new file mode 100644 index 0000000..dfb8e78 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-binary-true-invalid-content/astro.config.ts @@ -0,0 +1,25 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + equality: { + enabled: true, + throwError: true, + binary: true, + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - equality throw error binary true invalid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-binary-true-invalid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-binary-true-invalid-content/package.json new file mode 100644 index 0000000..03c3f97 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-binary-true-invalid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/equality-throw-error-binary-true-invalid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-binary-true-invalid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-binary-true-invalid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-binary-true-invalid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-binary-true-invalid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-binary-true-invalid-content/src/content/docs/index.md new file mode 100644 index 0000000..d6516f4 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-binary-true-invalid-content/src/content/docs/index.md @@ -0,0 +1,6 @@ +--- +title: Index +--- + +Now that the child elements are floated, obviously the parent element will collapse. +Brother and sister grew up together. diff --git a/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-binary-true-valid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-binary-true-valid-content/astro.config.ts new file mode 100644 index 0000000..e9d02bd --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-binary-true-valid-content/astro.config.ts @@ -0,0 +1,25 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + equality: { + enabled: true, + throwError: true, + binary: true, + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - equality throw error binary true valid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-binary-true-valid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-binary-true-valid-content/package.json new file mode 100644 index 0000000..38c8719 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-binary-true-valid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/equality-throw-error-binary-true-valid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-binary-true-valid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-binary-true-valid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-binary-true-valid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-binary-true-valid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-binary-true-valid-content/src/content/docs/index.md new file mode 100644 index 0000000..c85369d --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-binary-true-valid-content/src/content/docs/index.md @@ -0,0 +1,6 @@ +--- +title: Index +--- + +Now that the child elements are floated, the parent element will collapse. +The siblings grew up together. diff --git a/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-invalid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-invalid-content/astro.config.ts new file mode 100644 index 0000000..94289d0 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-invalid-content/astro.config.ts @@ -0,0 +1,24 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + equality: { + enabled: true, + throwError: true, + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - equality throw error invalid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-invalid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-invalid-content/package.json new file mode 100644 index 0000000..44a5a08 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-invalid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/equality-throw-error-invalid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-invalid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-invalid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-invalid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-invalid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-invalid-content/src/content/docs/index.md new file mode 100644 index 0000000..d6516f4 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-invalid-content/src/content/docs/index.md @@ -0,0 +1,6 @@ +--- +title: Index +--- + +Now that the child elements are floated, obviously the parent element will collapse. +Brother and sister grew up together. diff --git a/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-valid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-valid-content/astro.config.ts new file mode 100644 index 0000000..31ad4ba --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-valid-content/astro.config.ts @@ -0,0 +1,24 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + equality: { + enabled: true, + throwError: true, + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - equality throw error valid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-valid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-valid-content/package.json new file mode 100644 index 0000000..90eebf8 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-valid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/equality-throw-error-valid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-valid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-valid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-valid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-valid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-valid-content/src/content/docs/index.md new file mode 100644 index 0000000..c85369d --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/equality-throw-error-valid-content/src/content/docs/index.md @@ -0,0 +1,6 @@ +--- +title: Index +--- + +Now that the child elements are floated, the parent element will collapse. +The siblings grew up together. diff --git a/packages/starlight-spell-checker/tests/fixtures/indefinite-article-throw-error-invalid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/indefinite-article-throw-error-invalid-content/astro.config.ts new file mode 100644 index 0000000..2c2f97c --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/indefinite-article-throw-error-invalid-content/astro.config.ts @@ -0,0 +1,24 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + indefiniteArticle: { + enabled: true, + throwError: true, + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - indefinite article throw error invalid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/indefinite-article-throw-error-invalid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/indefinite-article-throw-error-invalid-content/package.json new file mode 100644 index 0000000..937e3e1 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/indefinite-article-throw-error-invalid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/indefinite-article-throw-error-invalid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/indefinite-article-throw-error-invalid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/indefinite-article-throw-error-invalid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/indefinite-article-throw-error-invalid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/indefinite-article-throw-error-invalid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/indefinite-article-throw-error-invalid-content/src/content/docs/index.md new file mode 100644 index 0000000..fa31e71 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/indefinite-article-throw-error-invalid-content/src/content/docs/index.md @@ -0,0 +1,6 @@ +--- +title: Index +--- + +He should, a 8-year old boy, should have arrived a hour ago on an European flight. +An historic event, or a historic event? Both are fine. diff --git a/packages/starlight-spell-checker/tests/fixtures/indefinite-article-throw-error-valid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/indefinite-article-throw-error-valid-content/astro.config.ts new file mode 100644 index 0000000..a5055c1 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/indefinite-article-throw-error-valid-content/astro.config.ts @@ -0,0 +1,24 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + indefiniteArticle: { + enabled: true, + throwError: true, + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - indefinite article throw error valid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/indefinite-article-throw-error-valid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/indefinite-article-throw-error-valid-content/package.json new file mode 100644 index 0000000..c906670 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/indefinite-article-throw-error-valid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/indefinite-article-throw-error-valid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/indefinite-article-throw-error-valid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/indefinite-article-throw-error-valid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/indefinite-article-throw-error-valid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/indefinite-article-throw-error-valid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/indefinite-article-throw-error-valid-content/src/content/docs/index.md new file mode 100644 index 0000000..2582328 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/indefinite-article-throw-error-valid-content/src/content/docs/index.md @@ -0,0 +1,6 @@ +--- +title: Index +--- + +He should, an 8-year old boy, should have arrived an hour ago on a European flight. +An historic event, or a historic event? Both are fine. diff --git a/packages/starlight-spell-checker/tests/fixtures/intensify-throw-error-invalid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/intensify-throw-error-invalid-content/astro.config.ts new file mode 100644 index 0000000..326fe31 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/intensify-throw-error-invalid-content/astro.config.ts @@ -0,0 +1,24 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + intensify: { + enabled: true, + throwError: true, + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - intensify throw error invalid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/intensify-throw-error-invalid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/intensify-throw-error-invalid-content/package.json new file mode 100644 index 0000000..ea01de5 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/intensify-throw-error-invalid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/intensify-throw-error-invalid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/intensify-throw-error-invalid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/intensify-throw-error-invalid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/intensify-throw-error-invalid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/intensify-throw-error-invalid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/intensify-throw-error-invalid-content/src/content/docs/index.md new file mode 100644 index 0000000..969c416 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/intensify-throw-error-invalid-content/src/content/docs/index.md @@ -0,0 +1,5 @@ +--- +title: Index +--- + +Some people say there are quite some problems, apparently. diff --git a/packages/starlight-spell-checker/tests/fixtures/intensify-throw-error-valid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/intensify-throw-error-valid-content/astro.config.ts new file mode 100644 index 0000000..818a013 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/intensify-throw-error-valid-content/astro.config.ts @@ -0,0 +1,24 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + intensify: { + enabled: true, + throwError: true, + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - intensify throw error valid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/intensify-throw-error-valid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/intensify-throw-error-valid-content/package.json new file mode 100644 index 0000000..eccae72 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/intensify-throw-error-valid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/intensify-throw-error-valid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/intensify-throw-error-valid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/intensify-throw-error-valid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/intensify-throw-error-valid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/intensify-throw-error-valid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/intensify-throw-error-valid-content/src/content/docs/index.md new file mode 100644 index 0000000..65f1664 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/intensify-throw-error-valid-content/src/content/docs/index.md @@ -0,0 +1,5 @@ +--- +title: Index +--- + +There are problems. diff --git a/packages/starlight-spell-checker/tests/fixtures/invalid-content-frontmatter/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/invalid-content-frontmatter/astro.config.ts new file mode 100644 index 0000000..788e013 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/invalid-content-frontmatter/astro.config.ts @@ -0,0 +1,13 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [starlightSpellChecker()], + title: "Starlight Spell Checker Tests - invalid content frontmatter", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/invalid-content-frontmatter/package.json b/packages/starlight-spell-checker/tests/fixtures/invalid-content-frontmatter/package.json new file mode 100644 index 0000000..dc0b326 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/invalid-content-frontmatter/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/invalid-content-frontmatter", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/invalid-content-frontmatter/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/invalid-content-frontmatter/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/invalid-content-frontmatter/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/invalid-content-frontmatter/src/content/docs/draft.md b/packages/starlight-spell-checker/tests/fixtures/invalid-content-frontmatter/src/content/docs/draft.md new file mode 100644 index 0000000..f192b70 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/invalid-content-frontmatter/src/content/docs/draft.md @@ -0,0 +1,16 @@ +--- +title: Frontmater +description: Painting in the sky in heus of orange and pink +tableOfContents: + minHeadingLevel: 2 + maxHeadingLevel: 3 +banner: + content: | + We just launched someting cool! + Check it out, evaning! +lastUpdated: 2022-08-09 +prev: Continue the toturial +draft: true +--- + +Draft diff --git a/packages/starlight-spell-checker/tests/fixtures/invalid-content-frontmatter/src/content/docs/test.md b/packages/starlight-spell-checker/tests/fixtures/invalid-content-frontmatter/src/content/docs/test.md new file mode 100644 index 0000000..f57477f --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/invalid-content-frontmatter/src/content/docs/test.md @@ -0,0 +1,15 @@ +--- +title: Frontmater +description: Painting in the sky in heus of orange and pink +tableOfContents: + minHeadingLevel: 2 + maxHeadingLevel: 3 +banner: + content: | + We just launched someting cool! + Check it out, evaning! +lastUpdated: 2022-08-09 +prev: Continue the toturial +--- + +Test diff --git a/packages/starlight-spell-checker/tests/fixtures/passive-throw-error-invalid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/passive-throw-error-invalid-content/astro.config.ts new file mode 100644 index 0000000..fa3b206 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/passive-throw-error-invalid-content/astro.config.ts @@ -0,0 +1,24 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + passive: { + enabled: true, + throwError: true, + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - passive throw error invalid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/passive-throw-error-invalid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/passive-throw-error-invalid-content/package.json new file mode 100644 index 0000000..41df40e --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/passive-throw-error-invalid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/passive-throw-error-invalid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/passive-throw-error-invalid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/passive-throw-error-invalid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/passive-throw-error-invalid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/passive-throw-error-invalid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/passive-throw-error-invalid-content/src/content/docs/index.md new file mode 100644 index 0000000..0417c51 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/passive-throw-error-invalid-content/src/content/docs/index.md @@ -0,0 +1,5 @@ +--- +title: Index +--- + +He was withheld while we were being fed. diff --git a/packages/starlight-spell-checker/tests/fixtures/passive-throw-error-valid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/passive-throw-error-valid-content/astro.config.ts new file mode 100644 index 0000000..657f81e --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/passive-throw-error-valid-content/astro.config.ts @@ -0,0 +1,24 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + passive: { + enabled: true, + throwError: true, + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - passive throw error valid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/passive-throw-error-valid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/passive-throw-error-valid-content/package.json new file mode 100644 index 0000000..f39c27a --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/passive-throw-error-valid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/passive-throw-error-valid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/passive-throw-error-valid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/passive-throw-error-valid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/passive-throw-error-valid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/passive-throw-error-valid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/passive-throw-error-valid-content/src/content/docs/index.md new file mode 100644 index 0000000..b6f17fd --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/passive-throw-error-valid-content/src/content/docs/index.md @@ -0,0 +1,5 @@ +--- +title: Index +--- + +They withheld him while they fed us. diff --git a/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-invalid-content-multilingual/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-invalid-content-multilingual/astro.config.ts new file mode 100644 index 0000000..9605896 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-invalid-content-multilingual/astro.config.ts @@ -0,0 +1,38 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + profanities: { + enabled: true, + throwError: true, + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - profanities throw error invalid content multilingual", + locales: { + root: { + lang: "en", + label: "English", + }, + de: { + lang: "de", + label: "Deutsch", + }, + fr: { + lang: "fr", + label: "Français", + }, + }, + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-invalid-content-multilingual/package.json b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-invalid-content-multilingual/package.json new file mode 100644 index 0000000..a834811 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-invalid-content-multilingual/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/profanities-throw-error-invalid-content-multilingual", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-invalid-content-multilingual/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-invalid-content-multilingual/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-invalid-content-multilingual/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-invalid-content-multilingual/src/content/docs/de/index.md b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-invalid-content-multilingual/src/content/docs/de/index.md new file mode 100644 index 0000000..c95ed1d --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-invalid-content-multilingual/src/content/docs/de/index.md @@ -0,0 +1,5 @@ +--- +title: Verzeichnis +--- + +Er ist fest entschlossen, dir den Arsch zu versohlen, um Sheriff zu werden, und das macht ihn geil. diff --git a/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-invalid-content-multilingual/src/content/docs/fr/index.md b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-invalid-content-multilingual/src/content/docs/fr/index.md new file mode 100644 index 0000000..324998c --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-invalid-content-multilingual/src/content/docs/fr/index.md @@ -0,0 +1,6 @@ +--- +title: Indice +--- + +Il est bien décidé à te botter le cul pour devenir shérif. +Il a appris à bander les voiles sur le bateau. diff --git a/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-invalid-content-multilingual/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-invalid-content-multilingual/src/content/docs/index.md new file mode 100644 index 0000000..39fc718 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-invalid-content-multilingual/src/content/docs/index.md @@ -0,0 +1,5 @@ +--- +title: Index +--- + +He’s pretty set on beating your butt for sheriff and it makes him horny. diff --git a/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-invalid-content-multilingual/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-invalid-content-multilingual/astro.config.ts new file mode 100644 index 0000000..42cef67 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-invalid-content-multilingual/astro.config.ts @@ -0,0 +1,39 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + profanities: { + enabled: true, + throwError: true, + sureness: 2, + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - profanities throw error sureness 2 invalid content multilingual", + locales: { + root: { + lang: "en", + label: "English", + }, + de: { + lang: "de", + label: "Deutsch", + }, + fr: { + lang: "fr", + label: "Français", + }, + }, + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-invalid-content-multilingual/package.json b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-invalid-content-multilingual/package.json new file mode 100644 index 0000000..da8b6e0 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-invalid-content-multilingual/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/profanities-throw-error-sureness-2-invalid-content-multilingual", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-invalid-content-multilingual/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-invalid-content-multilingual/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-invalid-content-multilingual/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-invalid-content-multilingual/src/content/docs/de/index.md b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-invalid-content-multilingual/src/content/docs/de/index.md new file mode 100644 index 0000000..c95ed1d --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-invalid-content-multilingual/src/content/docs/de/index.md @@ -0,0 +1,5 @@ +--- +title: Verzeichnis +--- + +Er ist fest entschlossen, dir den Arsch zu versohlen, um Sheriff zu werden, und das macht ihn geil. diff --git a/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-invalid-content-multilingual/src/content/docs/fr/index.md b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-invalid-content-multilingual/src/content/docs/fr/index.md new file mode 100644 index 0000000..324998c --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-invalid-content-multilingual/src/content/docs/fr/index.md @@ -0,0 +1,6 @@ +--- +title: Indice +--- + +Il est bien décidé à te botter le cul pour devenir shérif. +Il a appris à bander les voiles sur le bateau. diff --git a/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-invalid-content-multilingual/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-invalid-content-multilingual/src/content/docs/index.md new file mode 100644 index 0000000..39fc718 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-invalid-content-multilingual/src/content/docs/index.md @@ -0,0 +1,5 @@ +--- +title: Index +--- + +He’s pretty set on beating your butt for sheriff and it makes him horny. diff --git a/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-valid-content-multilingual/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-valid-content-multilingual/astro.config.ts new file mode 100644 index 0000000..d9f18c9 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-valid-content-multilingual/astro.config.ts @@ -0,0 +1,39 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + profanities: { + enabled: true, + throwError: true, + sureness: 2, + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - profanities throw error sureness 2 valid content multilingual", + locales: { + root: { + lang: "en", + label: "English", + }, + de: { + lang: "de", + label: "Deutsch", + }, + fr: { + lang: "fr", + label: "Français", + }, + }, + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-valid-content-multilingual/package.json b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-valid-content-multilingual/package.json new file mode 100644 index 0000000..7109cc9 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-valid-content-multilingual/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/profanities-throw-error-sureness-2-valid-content-multilingual", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-valid-content-multilingual/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-valid-content-multilingual/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-valid-content-multilingual/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-valid-content-multilingual/src/content/docs/de/index.md b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-valid-content-multilingual/src/content/docs/de/index.md new file mode 100644 index 0000000..e9a4ddd --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-valid-content-multilingual/src/content/docs/de/index.md @@ -0,0 +1,5 @@ +--- +title: Verzeichnis +--- + +Er ist fest entschlossen, deinen Arsch als Sheriff zu schlagen. diff --git a/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-valid-content-multilingual/src/content/docs/fr/index.md b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-valid-content-multilingual/src/content/docs/fr/index.md new file mode 100644 index 0000000..94818d1 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-valid-content-multilingual/src/content/docs/fr/index.md @@ -0,0 +1,6 @@ +--- +title: Indice +--- + +Il est bien décidé à te battre pour le poste de shérif. +Je n'ai aucun intérêt à cela. diff --git a/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-valid-content-multilingual/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-valid-content-multilingual/src/content/docs/index.md new file mode 100644 index 0000000..c0b3e2a --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-valid-content-multilingual/src/content/docs/index.md @@ -0,0 +1,5 @@ +--- +title: Index +--- + +He's determined to beat you for sheriff. \ No newline at end of file diff --git a/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-valid-content-multilingual/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-valid-content-multilingual/astro.config.ts new file mode 100644 index 0000000..9c14264 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-valid-content-multilingual/astro.config.ts @@ -0,0 +1,38 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + profanities: { + enabled: true, + throwError: true, + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - profanities throw error valid content multilingual", + locales: { + root: { + lang: "en", + label: "English", + }, + de: { + lang: "de", + label: "Deutsch", + }, + fr: { + lang: "fr", + label: "Français", + }, + }, + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-valid-content-multilingual/package.json b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-valid-content-multilingual/package.json new file mode 100644 index 0000000..65939cf --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-valid-content-multilingual/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/profanities-throw-error-valid-content-multilingual", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-valid-content-multilingual/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-valid-content-multilingual/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-valid-content-multilingual/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-valid-content-multilingual/src/content/docs/de/index.md b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-valid-content-multilingual/src/content/docs/de/index.md new file mode 100644 index 0000000..e9a4ddd --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-valid-content-multilingual/src/content/docs/de/index.md @@ -0,0 +1,5 @@ +--- +title: Verzeichnis +--- + +Er ist fest entschlossen, deinen Arsch als Sheriff zu schlagen. diff --git a/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-valid-content-multilingual/src/content/docs/fr/index.md b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-valid-content-multilingual/src/content/docs/fr/index.md new file mode 100644 index 0000000..94818d1 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-valid-content-multilingual/src/content/docs/fr/index.md @@ -0,0 +1,6 @@ +--- +title: Indice +--- + +Il est bien décidé à te battre pour le poste de shérif. +Je n'ai aucun intérêt à cela. diff --git a/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-valid-content-multilingual/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-valid-content-multilingual/src/content/docs/index.md new file mode 100644 index 0000000..c0b3e2a --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-valid-content-multilingual/src/content/docs/index.md @@ -0,0 +1,5 @@ +--- +title: Index +--- + +He's determined to beat you for sheriff. \ No newline at end of file diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-invalid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-invalid-content/astro.config.ts new file mode 100644 index 0000000..873d6c5 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-invalid-content/astro.config.ts @@ -0,0 +1,24 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + quotes: { + enabled: true, + throwError: true, + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - quotes throw error invalid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-invalid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-invalid-content/package.json new file mode 100644 index 0000000..fda3114 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-invalid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/quotes-throw-error-invalid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-invalid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-invalid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-invalid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-invalid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-invalid-content/src/content/docs/index.md new file mode 100644 index 0000000..54cd1ae --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-invalid-content/src/content/docs/index.md @@ -0,0 +1,23 @@ +--- +title: Index +--- + +A sentence "with quotes, 'nested' quotes, and '80s apostrophes." +A sentence 'with quotes, "nested" quotes, and "80s apostrophes.' + +A sentence “with quotes, ‘nested’ quotes, and ’80s apostrophes.” +A sentence ‘with quotes, “nested” quotes, and ”80s apostrophes.’ +A sentence ”with quotes, ’nested‘ quotes, and ‘80s apostrophes.“ + +A sentence «with quotes, ‹nested› quotes, and ’80s apostrophes.» +A sentence ‹with quotes, «nested» quotes, and ’80s apostrophes.› +A sentence »with quotes, ›nested‹ quotes, and ’80s apostrophes.« + +A sentence "with 'nested "quotes"'". +A sentence 'with "nested 'quotes'"'. + +A sentence “with ‘nested “quotes”’”. +A sentence ‘with “nested ‘quotes’”’. + +A sentence «with ‹nested «quotes»›». +A sentence ‹with «nested ‹quotes›»›. diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-mode-straight-invalid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-mode-straight-invalid-content/astro.config.ts new file mode 100644 index 0000000..0854dba --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-mode-straight-invalid-content/astro.config.ts @@ -0,0 +1,25 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + quotes: { + enabled: true, + throwError: true, + mode: "straight", + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - quotes throw error mode straight invalid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-mode-straight-invalid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-mode-straight-invalid-content/package.json new file mode 100644 index 0000000..aeaa7e2 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-mode-straight-invalid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/quotes-throw-error-mode-straight-invalid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-mode-straight-invalid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-mode-straight-invalid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-mode-straight-invalid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-mode-straight-invalid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-mode-straight-invalid-content/src/content/docs/index.md new file mode 100644 index 0000000..8b36815 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-mode-straight-invalid-content/src/content/docs/index.md @@ -0,0 +1,23 @@ +--- +title: Index +--- + +A sentence "with quotes, 'nested' quotes, and '80s apostrophes." +A sentence 'with quotes, "nested" quotes, and "80s apostrophes.' + +A sentence “with quotes, ‘nested’ quotes, and ’80s apostrophes.” +A sentence ‘with quotes, “nested” quotes, and ”80s apostrophes.’ +A sentence ”with quotes, ’nested‘ quotes, and ‘80s apostrophes.“ + +A sentence «with quotes, ‹nested› quotes, and '80s apostrophes.» +A sentence ‹with quotes, «nested» quotes, and '80s apostrophes.› +A sentence »with quotes, ›nested‹ quotes, and '80s apostrophes.« + +A sentence "with 'nested "quotes"'". +A sentence 'with "nested 'quotes'"'. + +A sentence “with ‘nested “quotes”’”. +A sentence ‘with “nested ‘quotes’”’. + +A sentence «with ‹nested «quotes»›». +A sentence ‹with «nested ‹quotes›»›. diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-mode-straight-valid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-mode-straight-valid-content/astro.config.ts new file mode 100644 index 0000000..0854dba --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-mode-straight-valid-content/astro.config.ts @@ -0,0 +1,25 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + quotes: { + enabled: true, + throwError: true, + mode: "straight", + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - quotes throw error mode straight invalid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-mode-straight-valid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-mode-straight-valid-content/package.json new file mode 100644 index 0000000..9e3f9ed --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-mode-straight-valid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/quotes-throw-error-mode-straight-valid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-mode-straight-valid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-mode-straight-valid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-mode-straight-valid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-mode-straight-valid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-mode-straight-valid-content/src/content/docs/index.md new file mode 100644 index 0000000..96f979e --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-mode-straight-valid-content/src/content/docs/index.md @@ -0,0 +1,23 @@ +--- +title: Index +--- + +A sentence "with quotes, 'nested' quotes, and '80s apostrophes." +A sentence "with quotes, 'nested' quotes, and '80s apostrophes." + +A sentence "with quotes, 'nested' quotes, and '80s apostrophes." +A sentence "with quotes, 'nested' quotes, and '80s apostrophes." +A sentence "with quotes, 'nested' quotes, and '80s apostrophes." + +A sentence «with quotes, ‹nested› quotes, and '80s apostrophes.» +A sentence ‹with quotes, «nested» quotes, and '80s apostrophes.› +A sentence »with quotes, ›nested‹ quotes, and '80s apostrophes.« + +A sentence "with 'nested "quotes"'". +A sentence "with 'nested "quotes"'". + +A sentence "with 'nested "quotes"'". +A sentence "with 'nested "quotes"'". + +A sentence «with ‹nested «quotes»›». +A sentence ‹with «nested ‹quotes›»›. diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-multi-nested-valid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-multi-nested-valid-content/astro.config.ts new file mode 100644 index 0000000..136391c --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-multi-nested-valid-content/astro.config.ts @@ -0,0 +1,25 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + quotes: { + enabled: true, + throwError: true, + smart: ["“”", "‘’", "«»", "‹›"], + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - quotes throw error multi multi nested invalid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-multi-nested-valid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-multi-nested-valid-content/package.json new file mode 100644 index 0000000..455d055 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-multi-nested-valid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/quotes-throw-error-multi-multi-nested-valid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-multi-nested-valid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-multi-nested-valid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-multi-nested-valid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-multi-nested-valid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-multi-nested-valid-content/src/content/docs/index.md new file mode 100644 index 0000000..0c8b8bc --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-multi-nested-valid-content/src/content/docs/index.md @@ -0,0 +1,12 @@ +--- +title: Index +--- + +A sentence “with ‘multi «mutli ‹nested “quotes”›»’”. +A sentence “with ‘multi «mutli ‹nested “quotes”›»’”. + +A sentence “with ‘multi «mutli ‹nested “quotes”›»’”. +A sentence “with ‘multi «mutli ‹nested “quotes”›»’”. + +A sentence “with ‘multi «mutli ‹nested “quotes”›»’”. +A sentence “with ‘multi «mutli ‹nested “quotes”›»’”. diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-nested-invalid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-nested-invalid-content/astro.config.ts new file mode 100644 index 0000000..658aa10 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-nested-invalid-content/astro.config.ts @@ -0,0 +1,25 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + quotes: { + enabled: true, + throwError: true, + smart: ["“”", "‘’", "«»", "‹›"], + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - quotes throw error multi nested invalid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-nested-invalid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-nested-invalid-content/package.json new file mode 100644 index 0000000..5dd4b90 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-nested-invalid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/quotes-throw-error-multi-nested-invalid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-nested-invalid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-nested-invalid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-nested-invalid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-nested-invalid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-nested-invalid-content/src/content/docs/index.md new file mode 100644 index 0000000..3046294 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-nested-invalid-content/src/content/docs/index.md @@ -0,0 +1,12 @@ +--- +title: Index +--- + +A sentence “with ‘multi «mutli ‹nested “quotes”›»’”. +A sentence “with ‘multi «mutli “nested ‘quotes’”»’”. + +A sentence ‘with “multi «mutli ‹nested “quotes”›»”’. +A sentence ‘with “multi «mutli ‘nested “quotes”’»”’. + +A sentence «with ‹multi “mutli ‘nested «quotes»’”›». +A sentence «with “multi ‘mutli «nested “quotes”»’”». diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-nested-valid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-nested-valid-content/astro.config.ts new file mode 100644 index 0000000..d8dad64 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-nested-valid-content/astro.config.ts @@ -0,0 +1,25 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + quotes: { + enabled: true, + throwError: true, + smart: ["“”", "‘’", "«»"], + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - quotes throw error multi nested invalid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-nested-valid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-nested-valid-content/package.json new file mode 100644 index 0000000..160f77a --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-nested-valid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/quotes-throw-error-multi-nested-valid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-nested-valid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-nested-valid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-nested-valid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-nested-valid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-nested-valid-content/src/content/docs/index.md new file mode 100644 index 0000000..4649024 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-nested-valid-content/src/content/docs/index.md @@ -0,0 +1,12 @@ +--- +title: Index +--- + +A sentence “with ‘multi «mutli “nested ‘quotes’”»’”. +A sentence “with ‘multi «mutli “nested ‘quotes’”»’”. + +A sentence “with ‘multi «mutli “nested ‘quotes’”»’”. +A sentence “with ‘multi «mutli “nested ‘quotes’”»’”. + +A sentence “with ‘multi «mutli “nested ‘quotes’”»’”. +A sentence “with ‘multi «mutli “nested ‘quotes’”»’”. diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-invalid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-invalid-content/astro.config.ts new file mode 100644 index 0000000..8047a0f --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-invalid-content/astro.config.ts @@ -0,0 +1,25 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + quotes: { + enabled: true, + throwError: true, + smart: ["«»", "‹›"], + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - quotes throw error smart config invalid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-invalid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-invalid-content/package.json new file mode 100644 index 0000000..cfaad27 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-invalid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/quotes-throw-error-smart-config-invalid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-invalid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-invalid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-invalid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-invalid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-invalid-content/src/content/docs/index.md new file mode 100644 index 0000000..54cd1ae --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-invalid-content/src/content/docs/index.md @@ -0,0 +1,23 @@ +--- +title: Index +--- + +A sentence "with quotes, 'nested' quotes, and '80s apostrophes." +A sentence 'with quotes, "nested" quotes, and "80s apostrophes.' + +A sentence “with quotes, ‘nested’ quotes, and ’80s apostrophes.” +A sentence ‘with quotes, “nested” quotes, and ”80s apostrophes.’ +A sentence ”with quotes, ’nested‘ quotes, and ‘80s apostrophes.“ + +A sentence «with quotes, ‹nested› quotes, and ’80s apostrophes.» +A sentence ‹with quotes, «nested» quotes, and ’80s apostrophes.› +A sentence »with quotes, ›nested‹ quotes, and ’80s apostrophes.« + +A sentence "with 'nested "quotes"'". +A sentence 'with "nested 'quotes'"'. + +A sentence “with ‘nested “quotes”’”. +A sentence ‘with “nested ‘quotes’”’. + +A sentence «with ‹nested «quotes»›». +A sentence ‹with «nested ‹quotes›»›. diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-mode-straight-invalid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-mode-straight-invalid-content/astro.config.ts new file mode 100644 index 0000000..7cc54df --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-mode-straight-invalid-content/astro.config.ts @@ -0,0 +1,26 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + quotes: { + enabled: true, + throwError: true, + mode: "straight", + smart: ["«»", "‹›"], + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - quotes throw error smart config mode straight invalid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-mode-straight-invalid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-mode-straight-invalid-content/package.json new file mode 100644 index 0000000..23643b4 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-mode-straight-invalid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/quotes-throw-error-smart-config-mode-straight-invalid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-mode-straight-invalid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-mode-straight-invalid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-mode-straight-invalid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-mode-straight-invalid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-mode-straight-invalid-content/src/content/docs/index.md new file mode 100644 index 0000000..8b36815 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-mode-straight-invalid-content/src/content/docs/index.md @@ -0,0 +1,23 @@ +--- +title: Index +--- + +A sentence "with quotes, 'nested' quotes, and '80s apostrophes." +A sentence 'with quotes, "nested" quotes, and "80s apostrophes.' + +A sentence “with quotes, ‘nested’ quotes, and ’80s apostrophes.” +A sentence ‘with quotes, “nested” quotes, and ”80s apostrophes.’ +A sentence ”with quotes, ’nested‘ quotes, and ‘80s apostrophes.“ + +A sentence «with quotes, ‹nested› quotes, and '80s apostrophes.» +A sentence ‹with quotes, «nested» quotes, and '80s apostrophes.› +A sentence »with quotes, ›nested‹ quotes, and '80s apostrophes.« + +A sentence "with 'nested "quotes"'". +A sentence 'with "nested 'quotes'"'. + +A sentence “with ‘nested “quotes”’”. +A sentence ‘with “nested ‘quotes’”’. + +A sentence «with ‹nested «quotes»›». +A sentence ‹with «nested ‹quotes›»›. diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-mode-straight-valid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-mode-straight-valid-content/astro.config.ts new file mode 100644 index 0000000..7cc54df --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-mode-straight-valid-content/astro.config.ts @@ -0,0 +1,26 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + quotes: { + enabled: true, + throwError: true, + mode: "straight", + smart: ["«»", "‹›"], + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - quotes throw error smart config mode straight invalid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-mode-straight-valid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-mode-straight-valid-content/package.json new file mode 100644 index 0000000..500611b --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-mode-straight-valid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/quotes-throw-error-smart-config-mode-straight-valid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-mode-straight-valid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-mode-straight-valid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-mode-straight-valid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-mode-straight-valid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-mode-straight-valid-content/src/content/docs/index.md new file mode 100644 index 0000000..66ebba4 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-mode-straight-valid-content/src/content/docs/index.md @@ -0,0 +1,23 @@ +--- +title: Index +--- + +A sentence "with quotes, 'nested' quotes, and '80s apostrophes." +A sentence "with quotes, 'nested' quotes, and '80s apostrophes." + +A sentence "with quotes, 'nested' quotes, and '80s apostrophes." +A sentence "with quotes, 'nested' quotes, and '80s apostrophes." +A sentence "with quotes, 'nested' quotes, and '80s apostrophes." + +A sentence "with quotes, 'nested' quotes, and '80s apostrophes." +A sentence "with quotes, 'nested' quotes, and '80s apostrophes." +A sentence "with quotes, 'nested' quotes, and '80s apostrophes." + +A sentence "with 'nested "quotes"'". +A sentence "with 'nested "quotes"'". + +A sentence "with 'nested "quotes"'". +A sentence "with 'nested "quotes"'". + +A sentence "with 'nested "quotes"'". +A sentence "with 'nested "quotes"'". diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-valid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-valid-content/astro.config.ts new file mode 100644 index 0000000..8047a0f --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-valid-content/astro.config.ts @@ -0,0 +1,25 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + quotes: { + enabled: true, + throwError: true, + smart: ["«»", "‹›"], + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - quotes throw error smart config invalid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-valid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-valid-content/package.json new file mode 100644 index 0000000..0ffbe80 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-valid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/quotes-throw-error-smart-config-valid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-valid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-valid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-valid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-valid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-valid-content/src/content/docs/index.md new file mode 100644 index 0000000..abdbcc7 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-valid-content/src/content/docs/index.md @@ -0,0 +1,23 @@ +--- +title: Index +--- + +A sentence «with quotes, ‹nested› quotes, and ’80s apostrophes.» +A sentence «with quotes, ‹nested› quotes, and ’80s apostrophes.» + +A sentence «with quotes, ‹nested› quotes, and ’80s apostrophes.» +A sentence «with quotes, ‹nested› quotes, and ’80s apostrophes.» +A sentence «with quotes, ‹nested› quotes, and ’80s apostrophes.» + +A sentence «with quotes, ‹nested› quotes, and ’80s apostrophes.» +A sentence «with quotes, ‹nested› quotes, and ’80s apostrophes.» +A sentence «with quotes, ‹nested› quotes, and ’80s apostrophes.» + +A sentence «with ‹nested «quotes»›». +A sentence «with ‹nested «quotes»›». + +A sentence «with ‹nested «quotes»›». +A sentence «with ‹nested «quotes»›». + +A sentence «with ‹nested «quotes»›». +A sentence «with ‹nested «quotes»›». diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-straight-config-invalid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-straight-config-invalid-content/astro.config.ts new file mode 100644 index 0000000..8e9bf14 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-straight-config-invalid-content/astro.config.ts @@ -0,0 +1,26 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + quotes: { + enabled: true, + throwError: true, + smart: ["«»", "‹›"], + straight: ["'", '"'], + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - quotes throw error smart straight config invalid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-straight-config-invalid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-straight-config-invalid-content/package.json new file mode 100644 index 0000000..7a8b6ee --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-straight-config-invalid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/quotes-throw-error-smart-straight-config-invalid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-straight-config-invalid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-straight-config-invalid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-straight-config-invalid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-straight-config-invalid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-straight-config-invalid-content/src/content/docs/index.md new file mode 100644 index 0000000..96f979e --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-straight-config-invalid-content/src/content/docs/index.md @@ -0,0 +1,23 @@ +--- +title: Index +--- + +A sentence "with quotes, 'nested' quotes, and '80s apostrophes." +A sentence "with quotes, 'nested' quotes, and '80s apostrophes." + +A sentence "with quotes, 'nested' quotes, and '80s apostrophes." +A sentence "with quotes, 'nested' quotes, and '80s apostrophes." +A sentence "with quotes, 'nested' quotes, and '80s apostrophes." + +A sentence «with quotes, ‹nested› quotes, and '80s apostrophes.» +A sentence ‹with quotes, «nested» quotes, and '80s apostrophes.› +A sentence »with quotes, ›nested‹ quotes, and '80s apostrophes.« + +A sentence "with 'nested "quotes"'". +A sentence "with 'nested "quotes"'". + +A sentence "with 'nested "quotes"'". +A sentence "with 'nested "quotes"'". + +A sentence «with ‹nested «quotes»›». +A sentence ‹with «nested ‹quotes›»›. diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-straight-config-valid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-straight-config-valid-content/astro.config.ts new file mode 100644 index 0000000..8e9bf14 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-straight-config-valid-content/astro.config.ts @@ -0,0 +1,26 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + quotes: { + enabled: true, + throwError: true, + smart: ["«»", "‹›"], + straight: ["'", '"'], + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - quotes throw error smart straight config invalid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-straight-config-valid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-straight-config-valid-content/package.json new file mode 100644 index 0000000..1c003d4 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-straight-config-valid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/quotes-throw-error-smart-straight-config-valid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-straight-config-valid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-straight-config-valid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-straight-config-valid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-straight-config-valid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-straight-config-valid-content/src/content/docs/index.md new file mode 100644 index 0000000..58b78da --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-straight-config-valid-content/src/content/docs/index.md @@ -0,0 +1,23 @@ +--- +title: Index +--- + +A sentence «with quotes, ‹nested› quotes, and ’80s apostrophes.» +A sentence «with quotes, ‹nested› quotes, and ’80s apostrophes.» + +A sentence «with quotes, ‹nested› quotes, and ’80s apostrophes.» +A sentence «with quotes, ‹nested› quotes, and ’80s apostrophes.» +A sentence «with quotes, ‹nested› quotes, and ’80s apostrophes.» + +A sentence «with quotes, ‹nested› quotes, and ’80s apostrophes.» +A sentence «with quotes, ‹nested› quotes, and ’80s apostrophes.» +A sentence «with quotes, ‹nested› quotes, and ’80s apostrophes.» + +A sentence «with ‹nested «quotes»›». +A sentence «with ‹nested «quotes»›». + +A sentence «with ‹nested «quotes»›». +A sentence «with ‹nested «quotes»›». + +A sentence «with ‹nested «quotes»›». +A sentence «with ‹nested «quotes»›». diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-invalid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-invalid-content/astro.config.ts new file mode 100644 index 0000000..0a5e5ad --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-invalid-content/astro.config.ts @@ -0,0 +1,25 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + quotes: { + enabled: true, + throwError: true, + straight: ["'", '"'], + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - quotes throw error straight config invalid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-invalid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-invalid-content/package.json new file mode 100644 index 0000000..323a010 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-invalid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/quotes-throw-error-straight-config-invalid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-invalid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-invalid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-invalid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-invalid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-invalid-content/src/content/docs/index.md new file mode 100644 index 0000000..54cd1ae --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-invalid-content/src/content/docs/index.md @@ -0,0 +1,23 @@ +--- +title: Index +--- + +A sentence "with quotes, 'nested' quotes, and '80s apostrophes." +A sentence 'with quotes, "nested" quotes, and "80s apostrophes.' + +A sentence “with quotes, ‘nested’ quotes, and ’80s apostrophes.” +A sentence ‘with quotes, “nested” quotes, and ”80s apostrophes.’ +A sentence ”with quotes, ’nested‘ quotes, and ‘80s apostrophes.“ + +A sentence «with quotes, ‹nested› quotes, and ’80s apostrophes.» +A sentence ‹with quotes, «nested» quotes, and ’80s apostrophes.› +A sentence »with quotes, ›nested‹ quotes, and ’80s apostrophes.« + +A sentence "with 'nested "quotes"'". +A sentence 'with "nested 'quotes'"'. + +A sentence “with ‘nested “quotes”’”. +A sentence ‘with “nested ‘quotes’”’. + +A sentence «with ‹nested «quotes»›». +A sentence ‹with «nested ‹quotes›»›. diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-mode-straight-invalid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-mode-straight-invalid-content/astro.config.ts new file mode 100644 index 0000000..6ac5875 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-mode-straight-invalid-content/astro.config.ts @@ -0,0 +1,26 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + quotes: { + enabled: true, + throwError: true, + mode: "straight", + straight: ["'", '"'], + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - quotes throw error straight config mode straight invalid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-mode-straight-invalid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-mode-straight-invalid-content/package.json new file mode 100644 index 0000000..acb10f9 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-mode-straight-invalid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/quotes-throw-error-straight-config-mode-straight-invalid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-mode-straight-invalid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-mode-straight-invalid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-mode-straight-invalid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-mode-straight-invalid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-mode-straight-invalid-content/src/content/docs/index.md new file mode 100644 index 0000000..8b36815 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-mode-straight-invalid-content/src/content/docs/index.md @@ -0,0 +1,23 @@ +--- +title: Index +--- + +A sentence "with quotes, 'nested' quotes, and '80s apostrophes." +A sentence 'with quotes, "nested" quotes, and "80s apostrophes.' + +A sentence “with quotes, ‘nested’ quotes, and ’80s apostrophes.” +A sentence ‘with quotes, “nested” quotes, and ”80s apostrophes.’ +A sentence ”with quotes, ’nested‘ quotes, and ‘80s apostrophes.“ + +A sentence «with quotes, ‹nested› quotes, and '80s apostrophes.» +A sentence ‹with quotes, «nested» quotes, and '80s apostrophes.› +A sentence »with quotes, ›nested‹ quotes, and '80s apostrophes.« + +A sentence "with 'nested "quotes"'". +A sentence 'with "nested 'quotes'"'. + +A sentence “with ‘nested “quotes”’”. +A sentence ‘with “nested ‘quotes’”’. + +A sentence «with ‹nested «quotes»›». +A sentence ‹with «nested ‹quotes›»›. diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-mode-straight-valid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-mode-straight-valid-content/astro.config.ts new file mode 100644 index 0000000..6ac5875 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-mode-straight-valid-content/astro.config.ts @@ -0,0 +1,26 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + quotes: { + enabled: true, + throwError: true, + mode: "straight", + straight: ["'", '"'], + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - quotes throw error straight config mode straight invalid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-mode-straight-valid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-mode-straight-valid-content/package.json new file mode 100644 index 0000000..16ffd68 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-mode-straight-valid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/quotes-throw-error-straight-config-mode-straight-valid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-mode-straight-valid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-mode-straight-valid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-mode-straight-valid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-mode-straight-valid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-mode-straight-valid-content/src/content/docs/index.md new file mode 100644 index 0000000..2237a0c --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-mode-straight-valid-content/src/content/docs/index.md @@ -0,0 +1,23 @@ +--- +title: Index +--- + +A sentence 'with quotes, "nested" quotes, and "80s apostrophes.' +A sentence 'with quotes, "nested" quotes, and "80s apostrophes.' + +A sentence 'with quotes, "nested" quotes, and "80s apostrophes.' +A sentence 'with quotes, "nested" quotes, and "80s apostrophes.' +A sentence 'with quotes, "nested" quotes, and "80s apostrophes.' + +A sentence «with quotes, ‹nested› quotes, and '80s apostrophes.» +A sentence ‹with quotes, «nested» quotes, and '80s apostrophes.› +A sentence »with quotes, ›nested‹ quotes, and '80s apostrophes.« + +A sentence 'with "nested 'quotes'"'. +A sentence 'with "nested 'quotes'"'. + +A sentence 'with "nested 'quotes'"'. +A sentence 'with "nested 'quotes'"'. + +A sentence «with ‹nested «quotes»›». +A sentence ‹with «nested ‹quotes›»›. diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-valid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-valid-content/astro.config.ts new file mode 100644 index 0000000..0a5e5ad --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-valid-content/astro.config.ts @@ -0,0 +1,25 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + quotes: { + enabled: true, + throwError: true, + straight: ["'", '"'], + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - quotes throw error straight config invalid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-valid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-valid-content/package.json new file mode 100644 index 0000000..bbd9009 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-valid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/quotes-throw-error-straight-config-valid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-valid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-valid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-valid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-valid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-valid-content/src/content/docs/index.md new file mode 100644 index 0000000..ecdd243 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-valid-content/src/content/docs/index.md @@ -0,0 +1,23 @@ +--- +title: Index +--- + +A sentence “with quotes, ‘nested’ quotes, and ’80s apostrophes.” +A sentence “with quotes, ‘nested’ quotes, and ’80s apostrophes.” + +A sentence “with quotes, ‘nested’ quotes, and ’80s apostrophes.” +A sentence “with quotes, ‘nested’ quotes, and ’80s apostrophes.” +A sentence “with quotes, ‘nested’ quotes, and ’80s apostrophes.” + +A sentence «with quotes, ‹nested› quotes, and ’80s apostrophes.» +A sentence ‹with quotes, «nested» quotes, and ’80s apostrophes.› +A sentence »with quotes, ›nested‹ quotes, and ’80s apostrophes.« + +A sentence “with ‘nested “quotes”’”. +A sentence “with ‘nested “quotes”’”. + +A sentence “with ‘nested “quotes”’”. +A sentence “with ‘nested “quotes”’”. + +A sentence «with ‹nested «quotes»›». +A sentence ‹with «nested ‹quotes›»›. diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-valid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-valid-content/astro.config.ts new file mode 100644 index 0000000..c4663f7 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-valid-content/astro.config.ts @@ -0,0 +1,23 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + quotes: { + enabled: true, + throwError: true, + }, + spell: { + enabled: false, + }, + }), + ], + title: "Starlight Spell Checker Tests - quotes throw error valid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-valid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-valid-content/package.json new file mode 100644 index 0000000..a26942b --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-valid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/quotes-throw-error-valid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-valid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-valid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-valid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-valid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-valid-content/src/content/docs/index.md new file mode 100644 index 0000000..ecdd243 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-valid-content/src/content/docs/index.md @@ -0,0 +1,23 @@ +--- +title: Index +--- + +A sentence “with quotes, ‘nested’ quotes, and ’80s apostrophes.” +A sentence “with quotes, ‘nested’ quotes, and ’80s apostrophes.” + +A sentence “with quotes, ‘nested’ quotes, and ’80s apostrophes.” +A sentence “with quotes, ‘nested’ quotes, and ’80s apostrophes.” +A sentence “with quotes, ‘nested’ quotes, and ’80s apostrophes.” + +A sentence «with quotes, ‹nested› quotes, and ’80s apostrophes.» +A sentence ‹with quotes, «nested» quotes, and ’80s apostrophes.› +A sentence »with quotes, ›nested‹ quotes, and ’80s apostrophes.« + +A sentence “with ‘nested “quotes”’”. +A sentence “with ‘nested “quotes”’”. + +A sentence “with ‘nested “quotes”’”. +A sentence “with ‘nested “quotes”’”. + +A sentence «with ‹nested «quotes»›». +A sentence ‹with «nested ‹quotes›»›. diff --git a/packages/starlight-spell-checker/tests/fixtures/redundant-acronyms-throw-error-invalid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/redundant-acronyms-throw-error-invalid-content/astro.config.ts new file mode 100644 index 0000000..3e32427 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/redundant-acronyms-throw-error-invalid-content/astro.config.ts @@ -0,0 +1,24 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + redundantAcronyms: { + enabled: true, + throwError: true, + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - redundant acronyms throw error invalid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/redundant-acronyms-throw-error-invalid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/redundant-acronyms-throw-error-invalid-content/package.json new file mode 100644 index 0000000..5888fc1 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/redundant-acronyms-throw-error-invalid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/redundant-acronyms-throw-error-invalid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/redundant-acronyms-throw-error-invalid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/redundant-acronyms-throw-error-invalid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/redundant-acronyms-throw-error-invalid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/redundant-acronyms-throw-error-invalid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/redundant-acronyms-throw-error-invalid-content/src/content/docs/index.md new file mode 100644 index 0000000..5b5df52 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/redundant-acronyms-throw-error-invalid-content/src/content/docs/index.md @@ -0,0 +1,5 @@ +--- +title: Index +--- + +Where can I find an ATM machine? diff --git a/packages/starlight-spell-checker/tests/fixtures/redundant-acronyms-throw-error-valid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/redundant-acronyms-throw-error-valid-content/astro.config.ts new file mode 100644 index 0000000..abe19c8 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/redundant-acronyms-throw-error-valid-content/astro.config.ts @@ -0,0 +1,24 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + redundantAcronyms: { + enabled: true, + throwError: true, + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - redundant acronyms throw error valid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/redundant-acronyms-throw-error-valid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/redundant-acronyms-throw-error-valid-content/package.json new file mode 100644 index 0000000..f6836c5 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/redundant-acronyms-throw-error-valid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/redundant-acronyms-throw-error-valid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/redundant-acronyms-throw-error-valid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/redundant-acronyms-throw-error-valid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/redundant-acronyms-throw-error-valid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/redundant-acronyms-throw-error-valid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/redundant-acronyms-throw-error-valid-content/src/content/docs/index.md new file mode 100644 index 0000000..9b3eea1 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/redundant-acronyms-throw-error-valid-content/src/content/docs/index.md @@ -0,0 +1,5 @@ +--- +title: Index +--- + +Where can I find an ATM? diff --git a/packages/starlight-spell-checker/tests/fixtures/repeated-words-throw-error-invalid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/repeated-words-throw-error-invalid-content/astro.config.ts new file mode 100644 index 0000000..73f2b94 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/repeated-words-throw-error-invalid-content/astro.config.ts @@ -0,0 +1,24 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + repeatedWords: { + enabled: true, + throwError: true, + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - repeated words throw error invalid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/repeated-words-throw-error-invalid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/repeated-words-throw-error-invalid-content/package.json new file mode 100644 index 0000000..43d8606 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/repeated-words-throw-error-invalid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/repeated-words-throw-error-invalid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/repeated-words-throw-error-invalid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/repeated-words-throw-error-invalid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/repeated-words-throw-error-invalid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/repeated-words-throw-error-invalid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/repeated-words-throw-error-invalid-content/src/content/docs/index.md new file mode 100644 index 0000000..3fe611e --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/repeated-words-throw-error-invalid-content/src/content/docs/index.md @@ -0,0 +1,5 @@ +--- +title: Index +--- + +Well, it it doesn’t have to to be. Like a fish in the the sea. diff --git a/packages/starlight-spell-checker/tests/fixtures/repeated-words-throw-error-valid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/repeated-words-throw-error-valid-content/astro.config.ts new file mode 100644 index 0000000..ff94df9 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/repeated-words-throw-error-valid-content/astro.config.ts @@ -0,0 +1,24 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + repeatedWords: { + enabled: true, + throwError: true, + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - repeated words throw error valid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/repeated-words-throw-error-valid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/repeated-words-throw-error-valid-content/package.json new file mode 100644 index 0000000..56cc78b --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/repeated-words-throw-error-valid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/repeated-words-throw-error-valid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/repeated-words-throw-error-valid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/repeated-words-throw-error-valid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/repeated-words-throw-error-valid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/repeated-words-throw-error-valid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/repeated-words-throw-error-valid-content/src/content/docs/index.md new file mode 100644 index 0000000..787fe6e --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/repeated-words-throw-error-valid-content/src/content/docs/index.md @@ -0,0 +1,5 @@ +--- +title: Index +--- + +Well, it doesn’t have to be. Like a fish in the sea. diff --git a/packages/starlight-spell-checker/tests/fixtures/simplify-throw-error-invalid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/simplify-throw-error-invalid-content/astro.config.ts new file mode 100644 index 0000000..9f00630 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/simplify-throw-error-invalid-content/astro.config.ts @@ -0,0 +1,24 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + simplify: { + enabled: true, + throwError: true, + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - simplify throw error invalid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/simplify-throw-error-invalid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/simplify-throw-error-invalid-content/package.json new file mode 100644 index 0000000..9f2a69a --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/simplify-throw-error-invalid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/simplify-throw-error-invalid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/simplify-throw-error-invalid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/simplify-throw-error-invalid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/simplify-throw-error-invalid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/simplify-throw-error-invalid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/simplify-throw-error-invalid-content/src/content/docs/index.md new file mode 100644 index 0000000..8f02799 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/simplify-throw-error-invalid-content/src/content/docs/index.md @@ -0,0 +1,7 @@ +--- +title: Index +--- + +You can utilize a shorter word. +Be advised, don’t do this. +That’s the appropriate thing to do. diff --git a/packages/starlight-spell-checker/tests/fixtures/simplify-throw-error-valid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/simplify-throw-error-valid-content/astro.config.ts new file mode 100644 index 0000000..9cc6567 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/simplify-throw-error-valid-content/astro.config.ts @@ -0,0 +1,24 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + simplify: { + enabled: true, + throwError: true, + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - simplify throw error valid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/simplify-throw-error-valid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/simplify-throw-error-valid-content/package.json new file mode 100644 index 0000000..081b29e --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/simplify-throw-error-valid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/simplify-throw-error-valid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/simplify-throw-error-valid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/simplify-throw-error-valid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/simplify-throw-error-valid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/simplify-throw-error-valid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/simplify-throw-error-valid-content/src/content/docs/index.md new file mode 100644 index 0000000..7d9d9c3 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/simplify-throw-error-valid-content/src/content/docs/index.md @@ -0,0 +1,7 @@ +--- +title: Index +--- + +You can use a shorter word. +Don’t do this. +That’s the right thing to do. diff --git a/packages/starlight-spell-checker/tests/fixtures/unsupported-language/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/unsupported-language/astro.config.ts new file mode 100644 index 0000000..16e3088 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/unsupported-language/astro.config.ts @@ -0,0 +1,14 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [starlightSpellChecker()], + title: "Starlight Spell Checker Tests - unsupported language", + defaultLocale: "ar", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/unsupported-language/package.json b/packages/starlight-spell-checker/tests/fixtures/unsupported-language/package.json new file mode 100644 index 0000000..7999387 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/unsupported-language/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/unsupported-language", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/unsupported-language/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/unsupported-language/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/unsupported-language/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/unsupported-language/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/unsupported-language/src/content/docs/index.md new file mode 100644 index 0000000..6e27ff3 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/unsupported-language/src/content/docs/index.md @@ -0,0 +1,5 @@ +--- +title: Index +--- + +انخفضت الشمس تحت الأفق، ورسمت السماء بألوان برتقالية وزهرية بينما كان نسيم المساء يهمس عبر الأشجار. diff --git a/packages/starlight-spell-checker/tests/fixtures/unsupported-languages/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/unsupported-languages/astro.config.ts new file mode 100644 index 0000000..692a02b --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/unsupported-languages/astro.config.ts @@ -0,0 +1,27 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [starlightSpellChecker()], + title: "Starlight Spell Checker Tests - unsupported languages", + locales: { + root: { + lang: "en", + label: "English", + }, + ar: { + lang: "ar", + label: "Arabic", + }, + ja: { + lang: "ja", + label: "Japanese", + }, + }, + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/unsupported-languages/package.json b/packages/starlight-spell-checker/tests/fixtures/unsupported-languages/package.json new file mode 100644 index 0000000..615d636 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/unsupported-languages/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/unsupported-languages", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/unsupported-languages/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/unsupported-languages/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/unsupported-languages/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/unsupported-languages/src/content/docs/ar/index.md b/packages/starlight-spell-checker/tests/fixtures/unsupported-languages/src/content/docs/ar/index.md new file mode 100644 index 0000000..1349de7 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/unsupported-languages/src/content/docs/ar/index.md @@ -0,0 +1,5 @@ +--- +title: الفهرس +--- + +انخفضت الشمس تحت الأفق، ورسمت السماء بألوان برتقالية وزهرية بينما كان نسيم المساء يهمس عبر الأشجار. diff --git a/packages/starlight-spell-checker/tests/fixtures/unsupported-languages/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/unsupported-languages/src/content/docs/index.md new file mode 100644 index 0000000..2b863d7 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/unsupported-languages/src/content/docs/index.md @@ -0,0 +1,5 @@ +--- +title: Index +--- + +The sun dipped below the horizon, painting the sky in hues of orange and pink as the evening breeze whispered through the trees. diff --git a/packages/starlight-spell-checker/tests/fixtures/unsupported-languages/src/content/docs/ja/index.md b/packages/starlight-spell-checker/tests/fixtures/unsupported-languages/src/content/docs/ja/index.md new file mode 100644 index 0000000..d39bf3d --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/unsupported-languages/src/content/docs/ja/index.md @@ -0,0 +1,5 @@ +--- +title: 索引 +--- + +太陽が地平線に沈むと、オレンジとピンクの色彩が空を染め、木々の間を夕方の風がささやいた。 diff --git a/packages/starlight-spell-checker/tests/fixtures/usage-throw-error-invalid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/usage-throw-error-invalid-content/astro.config.ts new file mode 100644 index 0000000..620b13a --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/usage-throw-error-invalid-content/astro.config.ts @@ -0,0 +1,24 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + usage: { + enabled: true, + throwError: true, + }, + spell: { + enabled: false, + }, + }), + ], + title: + "Starlight Spell Checker Tests - usage throw error invalid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/usage-throw-error-invalid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/usage-throw-error-invalid-content/package.json new file mode 100644 index 0000000..8be9b1f --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/usage-throw-error-invalid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/usage-throw-error-invalid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/usage-throw-error-invalid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/usage-throw-error-invalid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/usage-throw-error-invalid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/usage-throw-error-invalid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/usage-throw-error-invalid-content/src/content/docs/index.md new file mode 100644 index 0000000..3f27557 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/usage-throw-error-invalid-content/src/content/docs/index.md @@ -0,0 +1,7 @@ +--- +title: Index +--- + +Repeat ad nauseum. +Get some money from the ATM machine. +This is majorly inappropriate. diff --git a/packages/starlight-spell-checker/tests/fixtures/usage-throw-error-valid-content/astro.config.ts b/packages/starlight-spell-checker/tests/fixtures/usage-throw-error-valid-content/astro.config.ts new file mode 100644 index 0000000..f18ffd1 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/usage-throw-error-valid-content/astro.config.ts @@ -0,0 +1,23 @@ +import starlight from "@astrojs/starlight"; +import { defineConfig } from "astro/config"; +import starlightSpellChecker from "starlight-spell-checker"; + +export default defineConfig({ + integrations: [ + starlight({ + pagefind: false, + plugins: [ + starlightSpellChecker({ + usage: { + enabled: true, + throwError: true, + }, + spell: { + enabled: false, + }, + }), + ], + title: "Starlight Spell Checker Tests - usage throw error valid content", + }), + ], +}); diff --git a/packages/starlight-spell-checker/tests/fixtures/usage-throw-error-valid-content/package.json b/packages/starlight-spell-checker/tests/fixtures/usage-throw-error-valid-content/package.json new file mode 100644 index 0000000..6ccee58 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/usage-throw-error-valid-content/package.json @@ -0,0 +1,10 @@ +{ + "name": "@starlight-spell-checker-tests/usage-throw-error-valid-content", + "version": "0.0.0", + "dependencies": { + "@astrojs/starlight": "^0.30.2", + "astro": "^5.1.1", + "starlight-spell-checker": "workspace:*" + }, + "private": true +} diff --git a/packages/starlight-spell-checker/tests/fixtures/usage-throw-error-valid-content/src/content.config.ts b/packages/starlight-spell-checker/tests/fixtures/usage-throw-error-valid-content/src/content.config.ts new file mode 100644 index 0000000..0bead42 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/usage-throw-error-valid-content/src/content.config.ts @@ -0,0 +1,7 @@ +import { docsLoader } from "@astrojs/starlight/loaders"; +import { docsSchema } from "@astrojs/starlight/schema"; +import { defineCollection } from "astro:content"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), +}; diff --git a/packages/starlight-spell-checker/tests/fixtures/usage-throw-error-valid-content/src/content/docs/index.md b/packages/starlight-spell-checker/tests/fixtures/usage-throw-error-valid-content/src/content/docs/index.md new file mode 100644 index 0000000..3be3ba6 --- /dev/null +++ b/packages/starlight-spell-checker/tests/fixtures/usage-throw-error-valid-content/src/content/docs/index.md @@ -0,0 +1,7 @@ +--- +title: Index +--- + +Repeat ad nauseam. +Get some money from the ATM. +This is extremely inappropriate. diff --git a/packages/starlight-spell-checker/tests/frontmatter.test.ts b/packages/starlight-spell-checker/tests/frontmatter.test.ts new file mode 100644 index 0000000..daad40a --- /dev/null +++ b/packages/starlight-spell-checker/tests/frontmatter.test.ts @@ -0,0 +1,21 @@ +import { expect, test } from 'vitest' + +import { ValidationErrorType } from '../libs/validation' + +import { buildFixture, expectValidationWarningCount, expectValidationWarnings } from './utils' + +test('builds with invalid content frontmatter, but warnings', async () => { + const { output, status } = await buildFixture('invalid-content-frontmatter') + + expect(status).toBe('success') + + expectValidationWarningCount(output, 5, 1) + + expectValidationWarnings(output, 'test/', [ + ['Frontmater', ValidationErrorType.Spell, "frontmater", []], + ['heus', ValidationErrorType.Spell, "heus", ["hers", "hews", "he's", "hems", "hens", "hes", "hues", "Hess", "Hus", "Zeus"]], + ['someting', ValidationErrorType.Spell, "someting", ["something"]], + ['evaning', ValidationErrorType.Spell, "evaning", ["evading", "evening"]], + ['toturial', ValidationErrorType.Spell, "toturial", ["tutorial"]], + ]) +}) diff --git a/packages/starlight-spell-checker/tests/indefiniteArticle.throwError.test.ts b/packages/starlight-spell-checker/tests/indefiniteArticle.throwError.test.ts new file mode 100644 index 0000000..57d6ff1 --- /dev/null +++ b/packages/starlight-spell-checker/tests/indefiniteArticle.throwError.test.ts @@ -0,0 +1,26 @@ +import { expect, test } from 'vitest' + +import { ValidationErrorType } from '../libs/validation' + +import { buildFixture, expectValidationErrorCount, expectValidationErrors, expectValidationSuccess } from './utils' + +test('builds with indefinite article throw error valid English content', async () => { + const { output, status } = await buildFixture('indefinite-article-throw-error-valid-content') + + expect(status).toBe('success') + expectValidationSuccess(output) +}) + +test('does not build with indefinite article throw error invalid English content', async () => { + const { output, status } = await buildFixture('indefinite-article-throw-error-invalid-content') + + expect(status).toBe('error') + + expectValidationErrorCount(output, 3, 1) + + expectValidationErrors(output, '/', [ + ['a 8-year', ValidationErrorType.IndefiniteArticle, "retext-indefinite-article", ["an 8-year"]], + ['a hour', ValidationErrorType.IndefiniteArticle, "retext-indefinite-article", ["an hour"]], + ['an European', ValidationErrorType.IndefiniteArticle, "retext-indefinite-article", ["a European"]], + ]) +}) diff --git a/packages/starlight-spell-checker/tests/intensify.throwError.test.ts b/packages/starlight-spell-checker/tests/intensify.throwError.test.ts new file mode 100644 index 0000000..00b0c46 --- /dev/null +++ b/packages/starlight-spell-checker/tests/intensify.throwError.test.ts @@ -0,0 +1,28 @@ +import { expect, test } from 'vitest' + +import { ValidationErrorType } from '../libs/validation' + +import { buildFixture, expectValidationErrorCount, expectValidationErrors, expectValidationSuccess } from './utils' + +test('builds with intensify throw error valid English content', async () => { + const { output, status } = await buildFixture('intensify-throw-error-valid-content') + + expect(status).toBe('success') + expectValidationSuccess(output) +}) + +test('does not build with intensify throw error invalid English content', async () => { + const { output, status } = await buildFixture('intensify-throw-error-invalid-content') + + expect(status).toBe('error') + + expectValidationErrorCount(output, 5, 1) + + expectValidationErrors(output, '/', [ + ['Some', ValidationErrorType.Intensify, "weasel", []], + ['say', ValidationErrorType.Intensify, "hedge", []], + ['quite', ValidationErrorType.Intensify, "weasel", []], + ['some', ValidationErrorType.Intensify, "weasel", []], + ['apparently', ValidationErrorType.Intensify, "filler", []], + ]) +}) diff --git a/packages/starlight-spell-checker/tests/passive.throwError.test.ts b/packages/starlight-spell-checker/tests/passive.throwError.test.ts new file mode 100644 index 0000000..382a5e5 --- /dev/null +++ b/packages/starlight-spell-checker/tests/passive.throwError.test.ts @@ -0,0 +1,25 @@ +import { expect, test } from 'vitest' + +import { ValidationErrorType } from '../libs/validation' + +import { buildFixture, expectValidationErrorCount, expectValidationErrors, expectValidationSuccess } from './utils' + +test('builds with passive throw error valid English content', async () => { + const { output, status } = await buildFixture('passive-throw-error-valid-content') + + expect(status).toBe('success') + expectValidationSuccess(output) +}) + +test('does not build with passive throw error invalid English content', async () => { + const { output, status } = await buildFixture('passive-throw-error-invalid-content') + + expect(status).toBe('error') + + expectValidationErrorCount(output, 2, 1) + + expectValidationErrors(output, '/', [ + ['withheld', ValidationErrorType.Passive, "withheld", []], + ['fed', ValidationErrorType.Passive, "fed", []], + ]) +}) diff --git a/packages/starlight-spell-checker/tests/profanities.throwError.sureness2.test.ts b/packages/starlight-spell-checker/tests/profanities.throwError.sureness2.test.ts new file mode 100644 index 0000000..753655a --- /dev/null +++ b/packages/starlight-spell-checker/tests/profanities.throwError.sureness2.test.ts @@ -0,0 +1,25 @@ +import { expect, test } from 'vitest' + +import { ValidationErrorType } from '../libs/validation' + +import { buildFixture, expectValidationErrorCount, expectValidationErrors, expectValidationSuccess } from './utils' + +test('builds with profanities throw error sureness 2 valid Multilingual content', async () => { + const { output, status } = await buildFixture('profanities-throw-error-sureness-2-valid-content-multilingual') + + expect(status).toBe('success') + expectValidationSuccess(output) +}) + +test('does not build with profanities throw error sureness 2 invalid Multilingual content', async () => { + const { output, status } = await buildFixture('profanities-throw-error-sureness-2-invalid-content-multilingual') + + expect(status).toBe('error') + + expectValidationErrorCount(output, 2, 1) + + expectValidationErrors(output, 'fr/', [ + ['botter le cul', ValidationErrorType.Profanities, "botter-le-cul", []], + ['cul', ValidationErrorType.Profanities, "cul", []], + ]) +}) diff --git a/packages/starlight-spell-checker/tests/profanities.throwError.test.ts b/packages/starlight-spell-checker/tests/profanities.throwError.test.ts new file mode 100644 index 0000000..25cd36a --- /dev/null +++ b/packages/starlight-spell-checker/tests/profanities.throwError.test.ts @@ -0,0 +1,31 @@ +import { expect, test } from 'vitest' + +import { ValidationErrorType } from '../libs/validation' + +import { buildFixture, expectValidationErrorCount, expectValidationErrors, expectValidationSuccess } from './utils' + +test('builds with profanities throw error valid Multilingual content', async () => { + const { output, status } = await buildFixture('profanities-throw-error-valid-content-multilingual') + + expect(status).toBe('success') + expectValidationSuccess(output) +}) + +test('does not build with profanities throw error invalid Multilingual content', async () => { + const { output, status } = await buildFixture('profanities-throw-error-invalid-content-multilingual') + + expect(status).toBe('error') + + expectValidationErrorCount(output, 5, 2) + + expectValidationErrors(output, '/', [ + ['butt', ValidationErrorType.Profanities, "butt", []], + ['horny', ValidationErrorType.Profanities, "horny", []], + ]) + + expectValidationErrors(output, 'fr/', [ + ['botter le cul', ValidationErrorType.Profanities, "botter-le-cul", []], + ['cul', ValidationErrorType.Profanities, "cul", []], + ['bander', ValidationErrorType.Profanities, "bander", []], + ]) +}) diff --git a/packages/starlight-spell-checker/tests/quotes.throwError.modeStraight.test.ts b/packages/starlight-spell-checker/tests/quotes.throwError.modeStraight.test.ts new file mode 100644 index 0000000..50990c8 --- /dev/null +++ b/packages/starlight-spell-checker/tests/quotes.throwError.modeStraight.test.ts @@ -0,0 +1,61 @@ +import { expect, test } from 'vitest' + +import { ValidationErrorType } from '../libs/validation' + +import { buildFixture, expectValidationErrorCount, expectValidationErrors, expectValidationSuccess } from './utils' + +test('builds with quotes throw error mode straight valid English content', async () => { + const { output, status } = await buildFixture('quotes-throw-error-mode-straight-valid-content') + + expect(status).toBe('success') + expectValidationSuccess(output) +}) + +test('does not build with quotes throw error mode straight invalid English content', async () => { + const { output, status } = await buildFixture('quotes-throw-error-mode-straight-invalid-content') + + expect(status).toBe('error') + + expectValidationErrorCount(output, 38, 1) + + expectValidationErrors(output, '/', [ + ["'", ValidationErrorType.Quotes, 'quote', ['"']], + ['"', ValidationErrorType.Quotes, 'quote', ["'"]], + ['"', ValidationErrorType.Quotes, 'quote', ["'"]], + ['"', ValidationErrorType.Quotes, 'quote', ["'"]], + ["'", ValidationErrorType.Quotes, 'quote', ['"']], + ['“', ValidationErrorType.Quotes, 'quote', ['"']], + ['‘', ValidationErrorType.Quotes, 'quote', ["'"]], + ['’', ValidationErrorType.Quotes, 'quote', ["'"]], + ['’', ValidationErrorType.Quotes, 'apostrophe', ["'"]], + ['”', ValidationErrorType.Quotes, 'quote', ['"']], + ['‘', ValidationErrorType.Quotes, 'quote', ['"']], + ['“', ValidationErrorType.Quotes, 'quote', ["'"]], + ['”', ValidationErrorType.Quotes, 'quote', ["'"]], + ['”', ValidationErrorType.Quotes, 'quote', ['"']], + ['’', ValidationErrorType.Quotes, 'apostrophe', ["'"]], + ['”', ValidationErrorType.Quotes, 'quote', ['"']], + ['’', ValidationErrorType.Quotes, 'quote', ['"']], + ['‘', ValidationErrorType.Quotes, 'quote', ["'"]], + ['‘', ValidationErrorType.Quotes, 'quote', ['"']], + ['“', ValidationErrorType.Quotes, 'quote', ["'"]], + ["'", ValidationErrorType.Quotes, 'quote', ['"']], + ['"', ValidationErrorType.Quotes, 'quote', ["'"]], + ["'", ValidationErrorType.Quotes, 'quote', ['"']], + ["'", ValidationErrorType.Quotes, 'quote', ['"']], + ['"', ValidationErrorType.Quotes, 'quote', ["'"]], + ["'", ValidationErrorType.Quotes, 'quote', ['"']], + ['“', ValidationErrorType.Quotes, 'quote', ['"']], + ['‘', ValidationErrorType.Quotes, 'quote', ["'"]], + ['“', ValidationErrorType.Quotes, 'quote', ['"']], + ['”', ValidationErrorType.Quotes, 'quote', ['"']], + ['’', ValidationErrorType.Quotes, 'quote', ["'"]], + ['”', ValidationErrorType.Quotes, 'quote', ['"']], + ['‘', ValidationErrorType.Quotes, 'quote', ['"']], + ['“', ValidationErrorType.Quotes, 'quote', ["'"]], + ['‘', ValidationErrorType.Quotes, 'quote', ['"']], + ['’', ValidationErrorType.Quotes, 'quote', ['"']], + ['”', ValidationErrorType.Quotes, 'quote', ["'"]], + ['’', ValidationErrorType.Quotes, 'quote', ['"']], + ]); +}) diff --git a/packages/starlight-spell-checker/tests/quotes.throwError.multiNested.test.ts b/packages/starlight-spell-checker/tests/quotes.throwError.multiNested.test.ts new file mode 100644 index 0000000..bf7eff5 --- /dev/null +++ b/packages/starlight-spell-checker/tests/quotes.throwError.multiNested.test.ts @@ -0,0 +1,62 @@ +import { expect, test } from 'vitest' + +import { ValidationErrorType } from '../libs/validation' + +import { buildFixture, expectValidationErrorCount, expectValidationErrors, expectValidationSuccess } from './utils' + +test('builds with quotes throw error multi nested valid English content', async () => { + const { output, status } = await buildFixture('quotes-throw-error-multi-nested-valid-content') + + expect(status).toBe('success') + expectValidationSuccess(output) +}) + +test('builds with quotes throw error multi multi nested valid English content', async () => { + const { output, status } = await buildFixture('quotes-throw-error-multi-multi-nested-valid-content') + + expect(status).toBe('success') + expectValidationSuccess(output) +}) + +test('does not build with quotes throw error multi nested invalid English content', async () => { + const { output, status } = await buildFixture('quotes-throw-error-multi-nested-invalid-content') + + expect(status).toBe('error') + + expectValidationErrorCount(output, 32, 1) + + expectValidationErrors(output, '/', [ + ['“', ValidationErrorType.Quotes, 'quote', ['‹']], + ['‘', ValidationErrorType.Quotes, 'quote', ['“']], + ['’', ValidationErrorType.Quotes, 'quote', ['”']], + ['”', ValidationErrorType.Quotes, 'quote', ['›']], + ['‘', ValidationErrorType.Quotes, 'quote', ['“']], + ['“', ValidationErrorType.Quotes, 'quote', ['‘']], + ['”', ValidationErrorType.Quotes, 'quote', ['’']], + ['’', ValidationErrorType.Quotes, 'quote', ['”']], + ['‘', ValidationErrorType.Quotes, 'quote', ['“']], + ['“', ValidationErrorType.Quotes, 'quote', ['‘']], + ['‘', ValidationErrorType.Quotes, 'quote', ['‹']], + ['’', ValidationErrorType.Quotes, 'quote', ['›']], + ['”', ValidationErrorType.Quotes, 'quote', ['’']], + ['’', ValidationErrorType.Quotes, 'quote', ['”']], + ['«', ValidationErrorType.Quotes, 'quote', ['“']], + ['‹', ValidationErrorType.Quotes, 'quote', ['‘']], + ['“', ValidationErrorType.Quotes, 'quote', ['«']], + ['‘', ValidationErrorType.Quotes, 'quote', ['‹']], + ['«', ValidationErrorType.Quotes, 'quote', ['“']], + ['»', ValidationErrorType.Quotes, 'quote', ['”']], + ['’', ValidationErrorType.Quotes, 'quote', ['›']], + ['”', ValidationErrorType.Quotes, 'quote', ['»']], + ['›', ValidationErrorType.Quotes, 'quote', ['’']], + ['»', ValidationErrorType.Quotes, 'quote', ['”']], + ['«', ValidationErrorType.Quotes, 'quote', ['“']], + ['“', ValidationErrorType.Quotes, 'quote', ['‘']], + ['‘', ValidationErrorType.Quotes, 'quote', ['«']], + ['«', ValidationErrorType.Quotes, 'quote', ['‹']], + ['»', ValidationErrorType.Quotes, 'quote', ['›']], + ['’', ValidationErrorType.Quotes, 'quote', ['»']], + ['”', ValidationErrorType.Quotes, 'quote', ['’']], + ['»', ValidationErrorType.Quotes, 'quote', ['”']], + ]); +}) diff --git a/packages/starlight-spell-checker/tests/quotes.throwError.smartConfig.modeStraight.test.ts b/packages/starlight-spell-checker/tests/quotes.throwError.smartConfig.modeStraight.test.ts new file mode 100644 index 0000000..4649b87 --- /dev/null +++ b/packages/starlight-spell-checker/tests/quotes.throwError.smartConfig.modeStraight.test.ts @@ -0,0 +1,58 @@ +import { expect, test } from 'vitest' + +import { ValidationErrorType } from '../libs/validation' + +import { buildFixture, expectValidationErrorCount, expectValidationErrors, expectValidationSuccess } from './utils' + +test('builds with quotes throw error smart config mode straight valid English content', async () => { + const { output, status } = await buildFixture('quotes-throw-error-smart-config-mode-straight-valid-content') + + expect(status).toBe('success') + expectValidationSuccess(output) +}) + +test('does not build with quotes throw error smart config mode straight invalid English content', async () => { + const { output, status } = await buildFixture('quotes-throw-error-smart-config-mode-straight-invalid-content') + + expect(status).toBe('error') + + expectValidationErrorCount(output, 35, 1) + + expectValidationErrors(output, '/', [ + ["'", ValidationErrorType.Quotes, 'quote', ['"']], + ['"', ValidationErrorType.Quotes, 'quote', ["'"]], + ['"', ValidationErrorType.Quotes, 'quote', ["'"]], + ['"', ValidationErrorType.Quotes, 'quote', ["'"]], + ["'", ValidationErrorType.Quotes, 'quote', ['"']], + ['«', ValidationErrorType.Quotes, 'quote', ['"']], + ['‹', ValidationErrorType.Quotes, 'quote', ["'"]], + ['›', ValidationErrorType.Quotes, 'quote', ["'"]], + ['»', ValidationErrorType.Quotes, 'quote', ['"']], + ['‹', ValidationErrorType.Quotes, 'quote', ['"']], + ['«', ValidationErrorType.Quotes, 'quote', ["'"]], + ['»', ValidationErrorType.Quotes, 'quote', ["'"]], + ['›', ValidationErrorType.Quotes, 'quote', ['"']], + ['»', ValidationErrorType.Quotes, 'quote', ['"']], + ['›', ValidationErrorType.Quotes, 'quote', ['"']], + ['‹', ValidationErrorType.Quotes, 'quote', ['"']], + ['«', ValidationErrorType.Quotes, 'quote', ["'"]], + ["'", ValidationErrorType.Quotes, 'quote', ['"']], + ['"', ValidationErrorType.Quotes, 'quote', ["'"]], + ["'", ValidationErrorType.Quotes, 'quote', ['"']], + ["'", ValidationErrorType.Quotes, 'quote', ['"']], + ['"', ValidationErrorType.Quotes, 'quote', ["'"]], + ["'", ValidationErrorType.Quotes, 'quote', ['"']], + ['«', ValidationErrorType.Quotes, 'quote', ['"']], + ['‹', ValidationErrorType.Quotes, 'quote', ["'"]], + ['«', ValidationErrorType.Quotes, 'quote', ['"']], + ['»', ValidationErrorType.Quotes, 'quote', ['"']], + ['›', ValidationErrorType.Quotes, 'quote', ["'"]], + ['»', ValidationErrorType.Quotes, 'quote', ['"']], + ['‹', ValidationErrorType.Quotes, 'quote', ['"']], + ['«', ValidationErrorType.Quotes, 'quote', ["'"]], + ['‹', ValidationErrorType.Quotes, 'quote', ['"']], + ['›', ValidationErrorType.Quotes, 'quote', ['"']], + ['»', ValidationErrorType.Quotes, 'quote', ["'"]], + ['›', ValidationErrorType.Quotes, 'quote', ['"']], + ]); +}) diff --git a/packages/starlight-spell-checker/tests/quotes.throwError.smartConfig.test.ts b/packages/starlight-spell-checker/tests/quotes.throwError.smartConfig.test.ts new file mode 100644 index 0000000..2565014 --- /dev/null +++ b/packages/starlight-spell-checker/tests/quotes.throwError.smartConfig.test.ts @@ -0,0 +1,58 @@ +import { expect, test } from 'vitest' + +import { ValidationErrorType } from '../libs/validation' + +import { buildFixture, expectValidationErrorCount, expectValidationErrors, expectValidationSuccess } from './utils' + +test('builds with quotes throw error smart config valid English content', async () => { + const { output, status } = await buildFixture('quotes-throw-error-smart-config-valid-content') + + expect(status).toBe('success') + expectValidationSuccess(output) +}) + +test('does not build with quotes throw error smart config invalid English content', async () => { + const { output, status } = await buildFixture('quotes-throw-error-smart-config-invalid-content') + + expect(status).toBe('error') + + expectValidationErrorCount(output, 35, 1) + + expectValidationErrors(output, '/', [ + ['"', ValidationErrorType.Quotes, 'quote', ['«']], + ["'", ValidationErrorType.Quotes, 'quote', ['‹']], + ["'", ValidationErrorType.Quotes, 'quote', ['›']], + ["'", ValidationErrorType.Quotes, 'apostrophe', ['’']], + ['"', ValidationErrorType.Quotes, 'quote', ['»']], + ["'", ValidationErrorType.Quotes, 'quote', ['«']], + ['"', ValidationErrorType.Quotes, 'quote', ['‹']], + ['"', ValidationErrorType.Quotes, 'quote', ['›']], + ['"', ValidationErrorType.Quotes, 'quote', ['‹']], + ["'", ValidationErrorType.Quotes, 'quote', ['«']], + ['‹', ValidationErrorType.Quotes, 'quote', ['«']], + ['«', ValidationErrorType.Quotes, 'quote', ['‹']], + ['»', ValidationErrorType.Quotes, 'quote', ['›']], + ['›', ValidationErrorType.Quotes, 'quote', ['»']], + ['›', ValidationErrorType.Quotes, 'quote', ['»']], + ['‹', ValidationErrorType.Quotes, 'quote', ['«']], + ['«', ValidationErrorType.Quotes, 'quote', ['‹']], + ['"', ValidationErrorType.Quotes, 'quote', ['«']], + ["'", ValidationErrorType.Quotes, 'quote', ['‹']], + ['"', ValidationErrorType.Quotes, 'quote', ['«']], + ['"', ValidationErrorType.Quotes, 'quote', ['»']], + ["'", ValidationErrorType.Quotes, 'quote', ['›']], + ['"', ValidationErrorType.Quotes, 'quote', ['»']], + ["'", ValidationErrorType.Quotes, 'quote', ['«']], + ['"', ValidationErrorType.Quotes, 'quote', ['‹']], + ["'", ValidationErrorType.Quotes, 'quote', ['«']], + ["'", ValidationErrorType.Quotes, 'quote', ['»']], + ['"', ValidationErrorType.Quotes, 'quote', ['›']], + ["'", ValidationErrorType.Quotes, 'quote', ['»']], + ['‹', ValidationErrorType.Quotes, 'quote', ['«']], + ['«', ValidationErrorType.Quotes, 'quote', ['‹']], + ['‹', ValidationErrorType.Quotes, 'quote', ['«']], + ['›', ValidationErrorType.Quotes, 'quote', ['»']], + ['»', ValidationErrorType.Quotes, 'quote', ['›']], + ['›', ValidationErrorType.Quotes, 'quote', ['»']], + ]); +}) diff --git a/packages/starlight-spell-checker/tests/quotes.throwError.smartStraightConfig.test.ts b/packages/starlight-spell-checker/tests/quotes.throwError.smartStraightConfig.test.ts new file mode 100644 index 0000000..983fbfa --- /dev/null +++ b/packages/starlight-spell-checker/tests/quotes.throwError.smartStraightConfig.test.ts @@ -0,0 +1,88 @@ +import { expect, test } from 'vitest' + +import { ValidationErrorType } from '../libs/validation' + +import { buildFixture, expectValidationErrorCount, expectValidationErrors, expectValidationSuccess } from './utils' + +test('builds with quotes throw error smart straight config valid English content', async () => { + const { output, status } = await buildFixture('quotes-throw-error-smart-straight-config-valid-content') + + expect(status).toBe('success') + expectValidationSuccess(output) +}) + +test('does not build with quotes throw error smart straight config invalid English content', async () => { + const { output, status } = await buildFixture('quotes-throw-error-smart-straight-config-invalid-content') + + expect(status).toBe('error') + + expectValidationErrorCount(output, 65, 1) + + expectValidationErrors(output, '/', [ + ['"', ValidationErrorType.Quotes, 'quote', ['«']], + ["'", ValidationErrorType.Quotes, 'quote', ['‹']], + ["'", ValidationErrorType.Quotes, 'quote', ['›']], + ["'", ValidationErrorType.Quotes, 'apostrophe', ['’']], + ['"', ValidationErrorType.Quotes, 'quote', ['»']], + ['"', ValidationErrorType.Quotes, 'quote', ['«']], + ["'", ValidationErrorType.Quotes, 'quote', ['‹']], + ["'", ValidationErrorType.Quotes, 'quote', ['›']], + ["'", ValidationErrorType.Quotes, 'apostrophe', ['’']], + ['"', ValidationErrorType.Quotes, 'quote', ['»']], + ['"', ValidationErrorType.Quotes, 'quote', ['«']], + ["'", ValidationErrorType.Quotes, 'quote', ['‹']], + ["'", ValidationErrorType.Quotes, 'quote', ['›']], + ["'", ValidationErrorType.Quotes, 'apostrophe', ['’']], + ['"', ValidationErrorType.Quotes, 'quote', ['»']], + ['"', ValidationErrorType.Quotes, 'quote', ['«']], + ["'", ValidationErrorType.Quotes, 'quote', ['‹']], + ["'", ValidationErrorType.Quotes, 'quote', ['›']], + ["'", ValidationErrorType.Quotes, 'apostrophe', ['’']], + ['"', ValidationErrorType.Quotes, 'quote', ['»']], + ['"', ValidationErrorType.Quotes, 'quote', ['«']], + ["'", ValidationErrorType.Quotes, 'quote', ['‹']], + ["'", ValidationErrorType.Quotes, 'quote', ['›']], + ["'", ValidationErrorType.Quotes, 'apostrophe', ['’']], + ['"', ValidationErrorType.Quotes, 'quote', ['»']], + ["'", ValidationErrorType.Quotes, 'apostrophe', ['’']], + ['‹', ValidationErrorType.Quotes, 'quote', ['«']], + ['«', ValidationErrorType.Quotes, 'quote', ['‹']], + ['»', ValidationErrorType.Quotes, 'quote', ['›']], + ["'", ValidationErrorType.Quotes, 'apostrophe', ['’']], + ['›', ValidationErrorType.Quotes, 'quote', ['»']], + ['›', ValidationErrorType.Quotes, 'quote', ['»']], + ['‹', ValidationErrorType.Quotes, 'quote', ['«']], + ["'", ValidationErrorType.Quotes, 'apostrophe', ['’']], + ['«', ValidationErrorType.Quotes, 'quote', ['‹']], + ['"', ValidationErrorType.Quotes, 'quote', ['«']], + ["'", ValidationErrorType.Quotes, 'quote', ['‹']], + ['"', ValidationErrorType.Quotes, 'quote', ['«']], + ['"', ValidationErrorType.Quotes, 'quote', ['»']], + ["'", ValidationErrorType.Quotes, 'quote', ['›']], + ['"', ValidationErrorType.Quotes, 'quote', ['»']], + ['"', ValidationErrorType.Quotes, 'quote', ['«']], + ["'", ValidationErrorType.Quotes, 'quote', ['‹']], + ['"', ValidationErrorType.Quotes, 'quote', ['«']], + ['"', ValidationErrorType.Quotes, 'quote', ['»']], + ["'", ValidationErrorType.Quotes, 'quote', ['›']], + ['"', ValidationErrorType.Quotes, 'quote', ['»']], + ['"', ValidationErrorType.Quotes, 'quote', ['«']], + ["'", ValidationErrorType.Quotes, 'quote', ['‹']], + ['"', ValidationErrorType.Quotes, 'quote', ['«']], + ['"', ValidationErrorType.Quotes, 'quote', ['»']], + ["'", ValidationErrorType.Quotes, 'quote', ['›']], + ['"', ValidationErrorType.Quotes, 'quote', ['»']], + ['"', ValidationErrorType.Quotes, 'quote', ['«']], + ["'", ValidationErrorType.Quotes, 'quote', ['‹']], + ['"', ValidationErrorType.Quotes, 'quote', ['«']], + ['"', ValidationErrorType.Quotes, 'quote', ['»']], + ["'", ValidationErrorType.Quotes, 'quote', ['›']], + ['"', ValidationErrorType.Quotes, 'quote', ['»']], + ['‹', ValidationErrorType.Quotes, 'quote', ['«']], + ['«', ValidationErrorType.Quotes, 'quote', ['‹']], + ['‹', ValidationErrorType.Quotes, 'quote', ['«']], + ['›', ValidationErrorType.Quotes, 'quote', ['»']], + ['»', ValidationErrorType.Quotes, 'quote', ['›']], + ['›', ValidationErrorType.Quotes, 'quote', ['»']], + ]); +}) diff --git a/packages/starlight-spell-checker/tests/quotes.throwError.straightConfig.modeStraight.test.ts b/packages/starlight-spell-checker/tests/quotes.throwError.straightConfig.modeStraight.test.ts new file mode 100644 index 0000000..f8f2045 --- /dev/null +++ b/packages/starlight-spell-checker/tests/quotes.throwError.straightConfig.modeStraight.test.ts @@ -0,0 +1,60 @@ +import { expect, test } from 'vitest' + +import { ValidationErrorType } from '../libs/validation' + +import { buildFixture, expectValidationErrorCount, expectValidationErrors, expectValidationSuccess } from './utils' + +test('builds with quotes throw error straight config mode straight valid English content', async () => { + const { output, status } = await buildFixture('quotes-throw-error-straight-config-mode-straight-valid-content') + + expect(status).toBe('success') + expectValidationSuccess(output) +}) + +test('does not build with quotes throw error straight config mode straight invalid English content', async () => { + const { output, status } = await buildFixture('quotes-throw-error-straight-config-mode-straight-invalid-content') + + expect(status).toBe('error') + + expectValidationErrorCount(output, 37, 1) + + expectValidationErrors(output, '/', [ + ['"', ValidationErrorType.Quotes, 'quote', ["'"]], + ["'", ValidationErrorType.Quotes, 'quote', ['"']], + ["'", ValidationErrorType.Quotes, 'quote', ['"']], + ['"', ValidationErrorType.Quotes, 'quote', ["'"]], + ['“', ValidationErrorType.Quotes, 'quote', ["'"]], + ['‘', ValidationErrorType.Quotes, 'quote', ['"']], + ['’', ValidationErrorType.Quotes, 'quote', ['"']], + ['’', ValidationErrorType.Quotes, 'apostrophe', ["'"]], + ['”', ValidationErrorType.Quotes, 'quote', ["'"]], + ['‘', ValidationErrorType.Quotes, 'quote', ["'"]], + ['“', ValidationErrorType.Quotes, 'quote', ['"']], + ['”', ValidationErrorType.Quotes, 'quote', ['"']], + ['”', ValidationErrorType.Quotes, 'quote', ["'"]], + ['’', ValidationErrorType.Quotes, 'apostrophe', ["'"]], + ['”', ValidationErrorType.Quotes, 'quote', ["'"]], + ['’', ValidationErrorType.Quotes, 'quote', ["'"]], + ['‘', ValidationErrorType.Quotes, 'quote', ['"']], + ['‘', ValidationErrorType.Quotes, 'quote', ["'"]], + ['“', ValidationErrorType.Quotes, 'quote', ['"']], + ['"', ValidationErrorType.Quotes, 'quote', ["'"]], + ["'", ValidationErrorType.Quotes, 'quote', ['"']], + ['"', ValidationErrorType.Quotes, 'quote', ["'"]], + ['"', ValidationErrorType.Quotes, 'quote', ["'"]], + ["'", ValidationErrorType.Quotes, 'quote', ['"']], + ['"', ValidationErrorType.Quotes, 'quote', ["'"]], + ['“', ValidationErrorType.Quotes, 'quote', ["'"]], + ['‘', ValidationErrorType.Quotes, 'quote', ['"']], + ['“', ValidationErrorType.Quotes, 'quote', ["'"]], + ['”', ValidationErrorType.Quotes, 'quote', ["'"]], + ['’', ValidationErrorType.Quotes, 'quote', ['"']], + ['”', ValidationErrorType.Quotes, 'quote', ["'"]], + ['‘', ValidationErrorType.Quotes, 'quote', ["'"]], + ['“', ValidationErrorType.Quotes, 'quote', ['"']], + ['‘', ValidationErrorType.Quotes, 'quote', ["'"]], + ['’', ValidationErrorType.Quotes, 'quote', ["'"]], + ['”', ValidationErrorType.Quotes, 'quote', ['"']], + ['’', ValidationErrorType.Quotes, 'quote', ["'"]], + ]); +}) diff --git a/packages/starlight-spell-checker/tests/quotes.throwError.straightConfig.test.ts b/packages/starlight-spell-checker/tests/quotes.throwError.straightConfig.test.ts new file mode 100644 index 0000000..21ec5b3 --- /dev/null +++ b/packages/starlight-spell-checker/tests/quotes.throwError.straightConfig.test.ts @@ -0,0 +1,57 @@ +import { expect, test } from 'vitest' + +import { ValidationErrorType } from '../libs/validation' + +import { buildFixture, expectValidationErrorCount, expectValidationErrors, expectValidationSuccess } from './utils' + +test('builds with quotes throw error straight config valid English content', async () => { + const { output, status } = await buildFixture('quotes-throw-error-straight-config-valid-content') + + expect(status).toBe('success') + expectValidationSuccess(output) +}) + +test('does not build with quotes throw error straight config invalid English content', async () => { + const { output, status } = await buildFixture('quotes-throw-error-straight-config-invalid-content') + + expect(status).toBe('error') + + expectValidationErrorCount(output, 34, 1) + + expectValidationErrors(output, '/', [ + ['"', ValidationErrorType.Quotes, 'quote', ['“']], + ["'", ValidationErrorType.Quotes, 'quote', ['‘']], + ["'", ValidationErrorType.Quotes, 'quote', ['’']], + ["'", ValidationErrorType.Quotes, 'apostrophe', ['’']], + ['"', ValidationErrorType.Quotes, 'quote', ['”']], + ["'", ValidationErrorType.Quotes, 'quote', ['“']], + ['"', ValidationErrorType.Quotes, 'quote', ['‘']], + ['"', ValidationErrorType.Quotes, 'quote', ['’']], + ['"', ValidationErrorType.Quotes, 'quote', ['‘']], + ["'", ValidationErrorType.Quotes, 'quote', ['“']], + ['‘', ValidationErrorType.Quotes, 'quote', ['“']], + ['“', ValidationErrorType.Quotes, 'quote', ['‘']], + ['”', ValidationErrorType.Quotes, 'quote', ['’']], + ['’', ValidationErrorType.Quotes, 'quote', ['“']], + ['‘', ValidationErrorType.Quotes, 'quote', ['“']], + ['“', ValidationErrorType.Quotes, 'quote', ['‘']], + ['"', ValidationErrorType.Quotes, 'quote', ['“']], + ["'", ValidationErrorType.Quotes, 'quote', ['‘']], + ['"', ValidationErrorType.Quotes, 'quote', ['“']], + ['"', ValidationErrorType.Quotes, 'quote', ['”']], + ["'", ValidationErrorType.Quotes, 'quote', ['’']], + ['"', ValidationErrorType.Quotes, 'quote', ['”']], + ["'", ValidationErrorType.Quotes, 'quote', ['“']], + ['"', ValidationErrorType.Quotes, 'quote', ['‘']], + ["'", ValidationErrorType.Quotes, 'quote', ['“']], + ["'", ValidationErrorType.Quotes, 'quote', ['”']], + ['"', ValidationErrorType.Quotes, 'quote', ['’']], + ["'", ValidationErrorType.Quotes, 'quote', ['”']], + ['‘', ValidationErrorType.Quotes, 'quote', ['“']], + ['“', ValidationErrorType.Quotes, 'quote', ['‘']], + ['‘', ValidationErrorType.Quotes, 'quote', ['“']], + ['’', ValidationErrorType.Quotes, 'quote', ['”']], + ['”', ValidationErrorType.Quotes, 'quote', ['’']], + ['’', ValidationErrorType.Quotes, 'quote', ['”']], + ]); +}) diff --git a/packages/starlight-spell-checker/tests/quotes.throwError.test.ts b/packages/starlight-spell-checker/tests/quotes.throwError.test.ts new file mode 100644 index 0000000..de287a9 --- /dev/null +++ b/packages/starlight-spell-checker/tests/quotes.throwError.test.ts @@ -0,0 +1,57 @@ +import { expect, test } from 'vitest' + +import { ValidationErrorType } from '../libs/validation' + +import { buildFixture, expectValidationErrorCount, expectValidationErrors, expectValidationSuccess } from './utils' + +test('builds with quotes throw error valid English content', async () => { + const { output, status } = await buildFixture('quotes-throw-error-valid-content') + + expect(status).toBe('success') + expectValidationSuccess(output) +}) + +test('does not build with quotes throw error invalid English content', async () => { + const { output, status } = await buildFixture('quotes-throw-error-invalid-content') + + expect(status).toBe('error') + + expectValidationErrorCount(output, 34, 1) + + expectValidationErrors(output, '/', [ + ['"', ValidationErrorType.Quotes, 'quote', ['“']], + ['\'', ValidationErrorType.Quotes, 'quote', ['‘']], + ['\'', ValidationErrorType.Quotes, 'quote', ['’']], + ['\'', ValidationErrorType.Quotes, 'apostrophe', ['’']], + ['"', ValidationErrorType.Quotes, 'quote', ['”']], + ['\'', ValidationErrorType.Quotes, 'quote', ['“']], + ['"', ValidationErrorType.Quotes, 'quote', ['‘']], + ['"', ValidationErrorType.Quotes, 'quote', ['’']], + ['"', ValidationErrorType.Quotes, 'quote', ['‘']], + ['\'', ValidationErrorType.Quotes, 'quote', ['“']], + ['‘', ValidationErrorType.Quotes, 'quote', ['“']], + ['“', ValidationErrorType.Quotes, 'quote', ['‘']], + ['”', ValidationErrorType.Quotes, 'quote', ['’']], + ['’', ValidationErrorType.Quotes, 'quote', ['“']], + ['‘', ValidationErrorType.Quotes, 'quote', ['“']], + ['“', ValidationErrorType.Quotes, 'quote', ['‘']], + ['"', ValidationErrorType.Quotes, 'quote', ['“']], + ['\'', ValidationErrorType.Quotes, 'quote', ['‘']], + ['"', ValidationErrorType.Quotes, 'quote', ['“']], + ['"', ValidationErrorType.Quotes, 'quote', ['”']], + ['\'', ValidationErrorType.Quotes, 'quote', ['’']], + ['"', ValidationErrorType.Quotes, 'quote', ['”']], + ['\'', ValidationErrorType.Quotes, 'quote', ['“']], + ['"', ValidationErrorType.Quotes, 'quote', ['‘']], + ['\'', ValidationErrorType.Quotes, 'quote', ['“']], + ['\'', ValidationErrorType.Quotes, 'quote', ['”']], + ['"', ValidationErrorType.Quotes, 'quote', ['’']], + ['\'', ValidationErrorType.Quotes, 'quote', ['”']], + ['‘', ValidationErrorType.Quotes, 'quote', ['“']], + ['“', ValidationErrorType.Quotes, 'quote', ['‘']], + ['‘', ValidationErrorType.Quotes, 'quote', ['“']], + ['’', ValidationErrorType.Quotes, 'quote', ['”']], + ['”', ValidationErrorType.Quotes, 'quote', ['’']], + ['’', ValidationErrorType.Quotes, 'quote', ['”']], + ]) +}) diff --git a/packages/starlight-spell-checker/tests/redundantAcronyms.throwError.test.ts b/packages/starlight-spell-checker/tests/redundantAcronyms.throwError.test.ts new file mode 100644 index 0000000..c1e4234 --- /dev/null +++ b/packages/starlight-spell-checker/tests/redundantAcronyms.throwError.test.ts @@ -0,0 +1,24 @@ +import { expect, test } from 'vitest' + +import { ValidationErrorType } from '../libs/validation' + +import { buildFixture, expectValidationErrorCount, expectValidationErrors, expectValidationSuccess } from './utils' + +test('builds with redundant acronyms throw error valid English content', async () => { + const { output, status } = await buildFixture('redundant-acronyms-throw-error-valid-content') + + expect(status).toBe('success') + expectValidationSuccess(output) +}) + +test('does not build with redundant acronyms throw error invalid English content', async () => { + const { output, status } = await buildFixture('redundant-acronyms-throw-error-invalid-content') + + expect(status).toBe('error') + + expectValidationErrorCount(output, 1, 1) + + expectValidationErrors(output, '/', [ + ['ATM machine', ValidationErrorType.RedundantAcronyms, "atm", ["ATM"]], + ]) +}) diff --git a/packages/starlight-spell-checker/tests/repeatedWords.throwError.test.ts b/packages/starlight-spell-checker/tests/repeatedWords.throwError.test.ts new file mode 100644 index 0000000..1d2a23e --- /dev/null +++ b/packages/starlight-spell-checker/tests/repeatedWords.throwError.test.ts @@ -0,0 +1,26 @@ +import { expect, test } from 'vitest' + +import { ValidationErrorType } from '../libs/validation' + +import { buildFixture, expectValidationErrorCount, expectValidationErrors, expectValidationSuccess } from './utils' + +test('builds with repeated words throw error valid English content', async () => { + const { output, status } = await buildFixture('repeated-words-throw-error-valid-content') + + expect(status).toBe('success') + expectValidationSuccess(output) +}) + +test('does not build with repeated words throw error invalid English content', async () => { + const { output, status } = await buildFixture('repeated-words-throw-error-invalid-content') + + expect(status).toBe('error') + + expectValidationErrorCount(output, 3, 1) + + expectValidationErrors(output, '/', [ + ['it it', ValidationErrorType.RepeatedWords, "it", ["it"]], + ['to to', ValidationErrorType.RepeatedWords, "to", ["to"]], + ['the the', ValidationErrorType.RepeatedWords, "the", ["the"]], + ]) +}) diff --git a/packages/starlight-spell-checker/tests/simplify.throwError.test.ts b/packages/starlight-spell-checker/tests/simplify.throwError.test.ts new file mode 100644 index 0000000..7d64792 --- /dev/null +++ b/packages/starlight-spell-checker/tests/simplify.throwError.test.ts @@ -0,0 +1,26 @@ +import { expect, test } from 'vitest' + +import { ValidationErrorType } from '../libs/validation' + +import { buildFixture, expectValidationErrorCount, expectValidationErrors, expectValidationSuccess } from './utils' + +test('builds with simplify throw error valid English content', async () => { + const { output, status } = await buildFixture('simplify-throw-error-valid-content') + + expect(status).toBe('success') + expectValidationSuccess(output) +}) + +test('does not build with simplify throw error invalid English content', async () => { + const { output, status } = await buildFixture('simplify-throw-error-invalid-content') + + expect(status).toBe('error') + + expectValidationErrorCount(output, 3, 1) + + expectValidationErrors(output, '/', [ + ['utilize', ValidationErrorType.Simplify, "utilize", ["use"]], + ['Be advised', ValidationErrorType.Simplify, "be-advised", []], + ['appropriate', ValidationErrorType.Simplify, "appropriate", ["proper", "right"]], + ]) +}) diff --git a/packages/starlight-spell-checker/tests/spell.throwError.test.ts b/packages/starlight-spell-checker/tests/spell.throwError.test.ts index 227f0f9..e41fb8a 100644 --- a/packages/starlight-spell-checker/tests/spell.throwError.test.ts +++ b/packages/starlight-spell-checker/tests/spell.throwError.test.ts @@ -40,12 +40,12 @@ test('does not build with spell throw error invalid English content', async () = expectValidationErrorCount(output, 6, 1) expectValidationErrors(output, 'test/', [ - ['diped', ValidationErrorType.Spell, ["dipped", "doped", "duped", "biped", "diced", "died", "diked", "dined", "dived", "piped", "wiped"]], - ['horison', ValidationErrorType.Spell, ["orison", "horizon", "Morison"]], - ['heus', ValidationErrorType.Spell, ["hers", "hews", "he's", "hems", "hens", "hes", "hues", "Hess", "Hus", "Zeus"]], - ['evaning', ValidationErrorType.Spell, ["evading", "evening"]], - ['breze', ValidationErrorType.Spell, ["breeze", "braze", "breve"]], - ['thrugh', ValidationErrorType.Spell, ["though", "through", "thrush"]], + ['diped', ValidationErrorType.Spell, "diped", ["dipped", "doped", "duped", "biped", "diced", "died", "diked", "dined", "dived", "piped", "wiped"]], + ['horison', ValidationErrorType.Spell, "horison", ["orison", "horizon", "Morison"]], + ['heus', ValidationErrorType.Spell, "heus", ["hers", "hews", "he's", "hems", "hens", "hes", "hues", "Hess", "Hus", "Zeus"]], + ['evaning', ValidationErrorType.Spell, "evaning", ["evading", "evening"]], + ['breze', ValidationErrorType.Spell, "breze", ["breeze", "braze", "breve"]], + ['thrugh', ValidationErrorType.Spell, "thrugh", ["though", "through", "thrush"]], ]) }) @@ -57,12 +57,12 @@ test('does not build with spell throw error invalid German content', async () => expectValidationErrorCount(output, 6, 1) expectValidationErrors(output, 'test/', [ - ['tachte', ValidationErrorType.Spell, ["dachte", "fachte", "pachte", "wachte", "takte", "-achte", "achte", "lachte", "machte", "sachte", "tauchte", "trachte"]], - ['Horisont', ValidationErrorType.Spell, ["Horizont"]], - ['Tönnen', ValidationErrorType.Spell, ["Tönen", "Gönnen", "Können", "Tannen", "Tennen", "Tonnen", "Tönten"]], - ['Briese', ValidationErrorType.Spell, ["Brise", "Briefe", "Friese", "Priese", "Riese", "-riese"]], - ['Abbends', ValidationErrorType.Spell, ["Abends"]], - ['durh', ValidationErrorType.Spell, ["durch", "Dur"]], + ['tachte', ValidationErrorType.Spell, "tachte", ["dachte", "fachte", "pachte", "wachte", "takte", "-achte", "achte", "lachte", "machte", "sachte", "tauchte", "trachte"]], + ['Horisont', ValidationErrorType.Spell, "horisont", ["Horizont"]], + ['Tönnen', ValidationErrorType.Spell, "t-nnen", ["Tönen", "Gönnen", "Können", "Tannen", "Tennen", "Tonnen", "Tönten"]], + ['Briese', ValidationErrorType.Spell, "briese", ["Brise", "Briefe", "Friese", "Priese", "Riese", "-riese"]], + ['Abbends', ValidationErrorType.Spell, "abbends", ["Abends"]], + ['durh', ValidationErrorType.Spell, "durh", ["durch", "Dur"]], ]) }) @@ -74,12 +74,12 @@ test('does not build with spell throw error invalid French content', async () => expectValidationErrorCount(output, 6, 1) expectValidationErrors(output, 'test/', [ - ['ploungé', ValidationErrorType.Spell, ["plongé"]], - ['l\'horison', ValidationErrorType.Spell, ["l’horizon", "l’horion"]], - ['tientes', ValidationErrorType.Spell, ["fientes", "teintes", "tentes", "tiennes", "tintes"]], - ['briese', ValidationErrorType.Spell, ["briefe", "bries", "brise"]], - ['sior', ValidationErrorType.Spell, ["sir", "soir", "Dior", "Sion"]], - ['tràvers', ValidationErrorType.Spell, ["travers"]], + ['ploungé', ValidationErrorType.Spell, "ploung-", ["plongé"]], + ['l\'horison', ValidationErrorType.Spell, "l-horison", ["l’horizon", "l’horion"]], + ['tientes', ValidationErrorType.Spell, "tientes", ["fientes", "teintes", "tentes", "tiennes", "tintes"]], + ['briese', ValidationErrorType.Spell, "briese", ["briefe", "bries", "brise"]], + ['sior', ValidationErrorType.Spell, "sior", ["sir", "soir", "Dior", "Sion"]], + ['tràvers', ValidationErrorType.Spell, "tr-vers", ["travers"]], ]) }) @@ -91,29 +91,29 @@ test('does not build with spell throw error invalid Multilingual content', async expectValidationErrorCount(output, 18, 3) expectValidationErrors(output, 'test/', [ - ['diped', ValidationErrorType.Spell, ["dipped", "doped", "duped", "biped", "diced", "died", "diked", "dined", "dived", "piped", "wiped"]], - ['horison', ValidationErrorType.Spell, ["orison", "horizon", "Morison"]], - ['heus', ValidationErrorType.Spell, ["hers", "hews", "he's", "hems", "hens", "hes", "hues", "Hess", "Hus", "Zeus"]], - ['evaning', ValidationErrorType.Spell, ["evading", "evening"]], - ['breze', ValidationErrorType.Spell, ["breeze", "braze", "breve"]], - ['thrugh', ValidationErrorType.Spell, ["though", "through", "thrush"]], + ['diped', ValidationErrorType.Spell, "diped", ["dipped", "doped", "duped", "biped", "diced", "died", "diked", "dined", "dived", "piped", "wiped"]], + ['horison', ValidationErrorType.Spell, "horison", ["orison", "horizon", "Morison"]], + ['heus', ValidationErrorType.Spell, "heus", ["hers", "hews", "he's", "hems", "hens", "hes", "hues", "Hess", "Hus", "Zeus"]], + ['evaning', ValidationErrorType.Spell, "evaning", ["evading", "evening"]], + ['breze', ValidationErrorType.Spell, "breze", ["breeze", "braze", "breve"]], + ['thrugh', ValidationErrorType.Spell, "thrugh", ["though", "through", "thrush"]], ]) expectValidationErrors(output, 'de/test/', [ - ['tachte', ValidationErrorType.Spell, ["dachte", "fachte", "pachte", "wachte", "takte", "-achte", "achte", "lachte", "machte", "sachte", "tauchte", "trachte"]], - ['Horisont', ValidationErrorType.Spell, ["Horizont"]], - ['Tönnen', ValidationErrorType.Spell, ["Tönen", "Gönnen", "Können", "Tannen", "Tennen", "Tonnen", "Tönten"]], - ['Briese', ValidationErrorType.Spell, ["Brise", "Briefe", "Friese", "Priese", "Riese", "-riese"]], - ['Abbends', ValidationErrorType.Spell, ["Abends"]], - ['durh', ValidationErrorType.Spell, ["durch", "Dur"]], + ['tachte', ValidationErrorType.Spell, "tachte", ["dachte", "fachte", "pachte", "wachte", "takte", "-achte", "achte", "lachte", "machte", "sachte", "tauchte", "trachte"]], + ['Horisont', ValidationErrorType.Spell, "horisont", ["Horizont"]], + ['Tönnen', ValidationErrorType.Spell, "t-nnen", ["Tönen", "Gönnen", "Können", "Tannen", "Tennen", "Tonnen", "Tönten"]], + ['Briese', ValidationErrorType.Spell, "briese", ["Brise", "Briefe", "Friese", "Priese", "Riese", "-riese"]], + ['Abbends', ValidationErrorType.Spell, "abbends", ["Abends"]], + ['durh', ValidationErrorType.Spell, "durh", ["durch", "Dur"]], ]) expectValidationErrors(output, 'fr/test/', [ - ['ploungé', ValidationErrorType.Spell, ["plongé"]], - ['l\'horison', ValidationErrorType.Spell, ["l’horizon", "l’horion"]], - ['tientes', ValidationErrorType.Spell, ["fientes", "teintes", "tentes", "tiennes", "tintes"]], - ['briese', ValidationErrorType.Spell, ["briefe", "bries", "brise"]], - ['sior', ValidationErrorType.Spell, ["sir", "soir", "Dior", "Sion"]], - ['tràvers', ValidationErrorType.Spell, ["travers"]], + ['ploungé', ValidationErrorType.Spell, "ploung-", ["plongé"]], + ['l\'horison', ValidationErrorType.Spell, "l-horison", ["l’horizon", "l’horion"]], + ['tientes', ValidationErrorType.Spell, "tientes", ["fientes", "teintes", "tentes", "tiennes", "tintes"]], + ['briese', ValidationErrorType.Spell, "briese", ["briefe", "bries", "brise"]], + ['sior', ValidationErrorType.Spell, "sior", ["sir", "soir", "Dior", "Sion"]], + ['tràvers', ValidationErrorType.Spell, "tr-vers", ["travers"]], ]) }) \ No newline at end of file diff --git a/packages/starlight-spell-checker/tests/unsupportedLanguage.test.ts b/packages/starlight-spell-checker/tests/unsupportedLanguage.test.ts new file mode 100644 index 0000000..c7c3e0b --- /dev/null +++ b/packages/starlight-spell-checker/tests/unsupportedLanguage.test.ts @@ -0,0 +1,20 @@ +import { expect, test } from 'vitest' + +import { buildFixture, expectValidationUnsupportedLanguage } from './utils' + +test('builds with unsupported language, but warnings', async () => { + const { output, status } = await buildFixture('unsupported-language') + + expect(status).toBe('success') + + expectValidationUnsupportedLanguage(output, ['ar']) +}) + +test('builds with unsupported languages, but warnings', async () => { + const { output, status } = await buildFixture('unsupported-languages') + + expect(status).toBe('success') + + expectValidationUnsupportedLanguage(output, ["ar", "ja"]) +}) + diff --git a/packages/starlight-spell-checker/tests/usage.throwError.test.ts b/packages/starlight-spell-checker/tests/usage.throwError.test.ts new file mode 100644 index 0000000..3908e23 --- /dev/null +++ b/packages/starlight-spell-checker/tests/usage.throwError.test.ts @@ -0,0 +1,26 @@ +import { expect, test } from 'vitest' + +import { ValidationErrorType } from '../libs/validation' + +import { buildFixture, expectValidationErrorCount, expectValidationErrors, expectValidationSuccess } from './utils' + +test('builds with usage throw error valid English content', async () => { + const { output, status } = await buildFixture('usage-throw-error-valid-content') + + expect(status).toBe('success') + expectValidationSuccess(output) +}) + +test('does not build with usage throw error invalid English content', async () => { + const { output, status } = await buildFixture('usage-throw-error-invalid-content') + + expect(status).toBe('error') + + expectValidationErrorCount(output, 3, 1) + + expectValidationErrors(output, '/', [ + ['ad nauseum', ValidationErrorType.Usage, "ad-nauseum", ["ad nauseam"]], + ['ATM machine', ValidationErrorType.Usage, "atm-machine", ["ATM"]], + ['majorly', ValidationErrorType.Usage, "majorly", ["extremely"]], + ]) +}) diff --git a/packages/starlight-spell-checker/tests/utils.ts b/packages/starlight-spell-checker/tests/utils.ts index e608056..92213e3 100644 --- a/packages/starlight-spell-checker/tests/utils.ts +++ b/packages/starlight-spell-checker/tests/utils.ts @@ -42,6 +42,24 @@ export function expectValidationSuccess(output: string) { expect(output).toMatch(new RegExp(`All words spelled correctly.`)); } +export function expectValidationUnsupportedLanguage( + output: string, + locales: string[] +) { + const per = getPermutations(locales); + const localePattern = `(${per.map((pair) => pair.join(", ")).join("|")})`; + + expect(output).toMatch( + new RegExp( + `Unsupported ${ + locales.length === 1 ? "language" : "languages" + }: ${localePattern} \\\(No ${ + locales.length === 1 ? "dictionary" : "dictionaries" + } available.\\\)` + ) + ); +} + export function expectValidationWarningCount( output: string, count: number, @@ -62,6 +80,7 @@ export function expectValidationWarnings( validationWarnings: [ word: string, type: ValidationErrorType, + rule: string, suggestions?: string[] ][] ) { @@ -70,10 +89,10 @@ export function expectValidationWarnings( `▶ ${path} ${validationWarnings .map( - ([word, type, suggestions], index) => + ([word, type, rule, suggestions], index) => `.* ${ index < validationWarnings.length - 1 ? "├" : "└" - }─ ${word} - ${type}${ + }─ ${word} - ${type} - ${rule}${ suggestions ? suggestions.length > 0 ? ` \\\(${suggestions.join(", ")}\\\)` @@ -106,6 +125,7 @@ export function expectValidationErrors( validationErrors: [ word: string, type: ValidationErrorType, + rule: string, suggestions?: string[] ][] ) { @@ -114,10 +134,10 @@ export function expectValidationErrors( `▶ ${path} ${validationErrors .map( - ([word, type, suggestions], index) => + ([word, type, rule, suggestions], index) => `.* ${ index < validationErrors.length - 1 ? "├" : "└" - }─ ${word} - ${type}${ + }─ ${word} - ${type} - ${rule}${ suggestions ? suggestions.length > 0 ? ` \\\(${suggestions.join(", ")}\\\)` @@ -129,3 +149,17 @@ ${validationErrors ) ); } + +function getPermutations(arr: any[]): any[][] { + if (arr.length === 0) return [[]]; + const permutations = []; + for (let i = 0; i < arr.length; i++) { + const currentElement = arr[i]; + const remainingElements = arr.slice(0, i).concat(arr.slice(i + 1)); + const remainingPermutations = getPermutations(remainingElements); + for (const permutation of remainingPermutations) { + permutations.push([currentElement, ...permutation]); + } + } + return permutations; +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 73df3d2..913ccf3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -19,10 +19,10 @@ importers: dependencies: '@astrojs/starlight': specifier: ^0.30.3 - version: 0.30.3(astro@5.1.2(rollup@4.29.2)(typescript@5.7.2)) + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) astro: specifier: ^5.1.2 - version: 5.1.2(rollup@4.29.2)(typescript@5.7.2) + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) sharp: specifier: ^0.33.5 version: 0.33.5 @@ -32,6 +32,18 @@ importers: packages/starlight-spell-checker: dependencies: + '@trueberryless-org/retext-assuming': + specifier: ^0.1.1 + version: 0.1.1 + '@trueberryless-org/retext-case-police': + specifier: ^0.1.1 + version: 0.1.1 + '@trueberryless-org/retext-indefinite-article': + specifier: ^0.1.0 + version: 0.1.0 + '@trueberryless-org/retext-usage': + specifier: ^0.1.3 + version: 0.1.3 dictionary-da: specifier: ^6.0.0 version: 6.0.0 @@ -65,15 +77,12 @@ importers: github-slugger: specifier: ^2.0.0 version: 2.0.0 - hast: - specifier: ^1.0.0 - version: 1.0.0 - hast-util-from-html: - specifier: ^2.0.3 - version: 2.0.3 - hast-util-has-property: - specifier: ^3.0.0 - version: 3.0.0 + gray-matter: + specifier: ^4.0.3 + version: 4.0.3 + hast-util-to-text: + specifier: ^4.0.2 + version: 4.0.2 kleur: specifier: ^4.1.5 version: 4.1.5 @@ -82,37 +91,19 @@ importers: version: 3.0.0 mdast-util-mdx-jsx: specifier: ^3.1.3 - version: 3.1.3 - mdast-util-to-string: - specifier: ^4.0.0 - version: 4.0.0 + version: 3.2.0 no-cliches: specifier: ^0.3.6 version: 0.3.6 picomatch: specifier: ^4.0.2 version: 4.0.2 - rehype-stringify: - specifier: ^10.0.1 - version: 10.0.1 - remark-parse: - specifier: ^11.0.0 - version: 11.0.0 - remark-rehype: - specifier: ^11.1.1 - version: 11.1.1 - remark-retext: - specifier: ^6.0.0 - version: 6.0.0 + rehype-parse: + specifier: ^9.0.1 + version: 9.0.1 retext: specifier: ^9.0.0 version: 9.0.0 - retext-assuming: - specifier: ^1.0.0 - version: 1.0.0 - retext-case-police: - specifier: ^1.1.7 - version: 1.1.7 retext-cliches: specifier: ^1.0.0 version: 1.0.0 @@ -125,9 +116,6 @@ importers: retext-equality: specifier: ^7.1.0 version: 7.1.0 - retext-indefinite-article: - specifier: ^5.0.0 - version: 5.0.0 retext-intensify: specifier: ^7.0.0 version: 7.0.0 @@ -141,8 +129,8 @@ importers: specifier: ^8.0.0 version: 8.0.0 retext-quotes: - specifier: ^6.0.0 - version: 6.0.0 + specifier: ^6.0.2 + version: 6.0.2 retext-readability: specifier: ^8.0.0 version: 8.0.0 @@ -158,76 +146,673 @@ importers: retext-spell: specifier: ^6.1.0 version: 6.1.0 - retext-stringify: - specifier: ^4.0.0 - version: 4.0.0 - retext-usage: - specifier: ^0.5.0 - version: 0.5.0 unified: specifier: ^11.0.5 version: 11.0.5 unist-util-visit: specifier: ^5.0.0 version: 5.0.0 - vfile-reporter: - specifier: ^8.1.1 - version: 8.1.1 devDependencies: '@astrojs/starlight': - specifier: ^0.30.3 - version: 0.30.3(astro@5.1.2(rollup@4.29.2)(typescript@5.7.2)) + specifier: ^0.30.3 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + '@vitest/coverage-v8': + specifier: ^2.1.8 + version: 2.1.8(vitest@2.1.8) + '@vitest/ui': + specifier: ^2.1.8 + version: 2.1.8(vitest@2.1.8) + astro: + specifier: ^5.1.2 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + vitest: + specifier: ^2.1.8 + version: 2.1.8(@vitest/ui@2.1.8) + + packages/starlight-spell-checker/tests/fixtures/assuming-throw-error-invalid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/assuming-throw-error-valid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-invalid-content-multilingual: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/case-police-throw-error-valid-content-multilingual: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-ignore-literals-false-invalid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-ignore-literals-false-valid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-invalid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-mode-straight-invalid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-mode-straight-valid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/contractions-throw-error-valid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/diacritics-throw-error-invalid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/diacritics-throw-error-valid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/equality-throw-error-binary-true-invalid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/equality-throw-error-binary-true-valid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/equality-throw-error-invalid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/equality-throw-error-valid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/indefinite-article-throw-error-invalid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/indefinite-article-throw-error-valid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/intensify-throw-error-invalid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/intensify-throw-error-valid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/invalid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/invalid-content-de: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/invalid-content-fr: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/invalid-content-frontmatter: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/invalid-content-multilingual: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/passive-throw-error-invalid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/passive-throw-error-valid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-invalid-content-multilingual: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-invalid-content-multilingual: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-sureness-2-valid-content-multilingual: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/profanities-throw-error-valid-content-multilingual: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-invalid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-mode-straight-invalid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-mode-straight-valid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-multi-nested-valid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-nested-invalid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-multi-nested-valid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) astro: - specifier: ^5.1.2 - version: 5.1.2(rollup@4.29.2)(typescript@5.7.2) - vitest: - specifier: ^2.1.8 - version: 2.1.8 + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. - packages/starlight-spell-checker/tests/fixtures/invalid-content: + packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-invalid-content: dependencies: '@astrojs/starlight': specifier: ^0.30.2 - version: 0.30.3(astro@5.1.2(rollup@4.29.2)(typescript@5.7.2)) + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) astro: specifier: ^5.1.1 - version: 5.1.2(rollup@4.29.2)(typescript@5.7.2) + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) starlight-spell-checker: specifier: workspace:* version: link:../../.. - packages/starlight-spell-checker/tests/fixtures/invalid-content-de: + packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-mode-straight-invalid-content: dependencies: '@astrojs/starlight': specifier: ^0.30.2 - version: 0.30.3(astro@5.1.2(rollup@4.29.2)(typescript@5.7.2)) + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) astro: specifier: ^5.1.1 - version: 5.1.2(rollup@4.29.2)(typescript@5.7.2) + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) starlight-spell-checker: specifier: workspace:* version: link:../../.. - packages/starlight-spell-checker/tests/fixtures/invalid-content-fr: + packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-mode-straight-valid-content: dependencies: '@astrojs/starlight': specifier: ^0.30.2 - version: 0.30.3(astro@5.1.2(rollup@4.29.2)(typescript@5.7.2)) + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) astro: specifier: ^5.1.1 - version: 5.1.2(rollup@4.29.2)(typescript@5.7.2) + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) starlight-spell-checker: specifier: workspace:* version: link:../../.. - packages/starlight-spell-checker/tests/fixtures/invalid-content-multilingual: + packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-config-valid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-straight-config-invalid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-smart-straight-config-valid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-invalid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-mode-straight-invalid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-mode-straight-valid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-straight-config-valid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/quotes-throw-error-valid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/redundant-acronyms-throw-error-invalid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/redundant-acronyms-throw-error-valid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/repeated-words-throw-error-invalid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/repeated-words-throw-error-valid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/simplify-throw-error-invalid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/simplify-throw-error-valid-content: dependencies: '@astrojs/starlight': specifier: ^0.30.2 - version: 0.30.3(astro@5.1.2(rollup@4.29.2)(typescript@5.7.2)) + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) astro: specifier: ^5.1.1 - version: 5.1.2(rollup@4.29.2)(typescript@5.7.2) + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) starlight-spell-checker: specifier: workspace:* version: link:../../.. @@ -236,10 +821,10 @@ importers: dependencies: '@astrojs/starlight': specifier: ^0.30.2 - version: 0.30.3(astro@5.1.2(rollup@4.29.2)(typescript@5.7.2)) + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) astro: specifier: ^5.1.1 - version: 5.1.2(rollup@4.29.2)(typescript@5.7.2) + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) starlight-spell-checker: specifier: workspace:* version: link:../../.. @@ -248,10 +833,10 @@ importers: dependencies: '@astrojs/starlight': specifier: ^0.30.2 - version: 0.30.3(astro@5.1.2(rollup@4.29.2)(typescript@5.7.2)) + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) astro: specifier: ^5.1.1 - version: 5.1.2(rollup@4.29.2)(typescript@5.7.2) + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) starlight-spell-checker: specifier: workspace:* version: link:../../.. @@ -260,10 +845,10 @@ importers: dependencies: '@astrojs/starlight': specifier: ^0.30.2 - version: 0.30.3(astro@5.1.2(rollup@4.29.2)(typescript@5.7.2)) + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) astro: specifier: ^5.1.1 - version: 5.1.2(rollup@4.29.2)(typescript@5.7.2) + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) starlight-spell-checker: specifier: workspace:* version: link:../../.. @@ -272,10 +857,10 @@ importers: dependencies: '@astrojs/starlight': specifier: ^0.30.2 - version: 0.30.3(astro@5.1.2(rollup@4.29.2)(typescript@5.7.2)) + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) astro: specifier: ^5.1.1 - version: 5.1.2(rollup@4.29.2)(typescript@5.7.2) + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) starlight-spell-checker: specifier: workspace:* version: link:../../.. @@ -284,10 +869,10 @@ importers: dependencies: '@astrojs/starlight': specifier: ^0.30.2 - version: 0.30.3(astro@5.1.2(rollup@4.29.2)(typescript@5.7.2)) + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) astro: specifier: ^5.1.1 - version: 5.1.2(rollup@4.29.2)(typescript@5.7.2) + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) starlight-spell-checker: specifier: workspace:* version: link:../../.. @@ -296,10 +881,10 @@ importers: dependencies: '@astrojs/starlight': specifier: ^0.30.2 - version: 0.30.3(astro@5.1.2(rollup@4.29.2)(typescript@5.7.2)) + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) astro: specifier: ^5.1.1 - version: 5.1.2(rollup@4.29.2)(typescript@5.7.2) + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) starlight-spell-checker: specifier: workspace:* version: link:../../.. @@ -308,10 +893,10 @@ importers: dependencies: '@astrojs/starlight': specifier: ^0.30.2 - version: 0.30.3(astro@5.1.2(rollup@4.29.2)(typescript@5.7.2)) + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) astro: specifier: ^5.1.1 - version: 5.1.2(rollup@4.29.2)(typescript@5.7.2) + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) starlight-spell-checker: specifier: workspace:* version: link:../../.. @@ -320,10 +905,58 @@ importers: dependencies: '@astrojs/starlight': specifier: ^0.30.2 - version: 0.30.3(astro@5.1.2(rollup@4.29.2)(typescript@5.7.2)) + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/unsupported-language: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/unsupported-languages: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/usage-throw-error-invalid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) astro: specifier: ^5.1.1 - version: 5.1.2(rollup@4.29.2)(typescript@5.7.2) + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + starlight-spell-checker: + specifier: workspace:* + version: link:../../.. + + packages/starlight-spell-checker/tests/fixtures/usage-throw-error-valid-content: + dependencies: + '@astrojs/starlight': + specifier: ^0.30.2 + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) + astro: + specifier: ^5.1.1 + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) starlight-spell-checker: specifier: workspace:* version: link:../../.. @@ -332,10 +965,10 @@ importers: dependencies: '@astrojs/starlight': specifier: ^0.30.2 - version: 0.30.3(astro@5.1.2(rollup@4.29.2)(typescript@5.7.2)) + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) astro: specifier: ^5.1.1 - version: 5.1.2(rollup@4.29.2)(typescript@5.7.2) + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) starlight-spell-checker: specifier: workspace:* version: link:../../.. @@ -344,10 +977,10 @@ importers: dependencies: '@astrojs/starlight': specifier: ^0.30.2 - version: 0.30.3(astro@5.1.2(rollup@4.29.2)(typescript@5.7.2)) + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) astro: specifier: ^5.1.1 - version: 5.1.2(rollup@4.29.2)(typescript@5.7.2) + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) starlight-spell-checker: specifier: workspace:* version: link:../../.. @@ -356,10 +989,10 @@ importers: dependencies: '@astrojs/starlight': specifier: ^0.30.2 - version: 0.30.3(astro@5.1.2(rollup@4.29.2)(typescript@5.7.2)) + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) astro: specifier: ^5.1.1 - version: 5.1.2(rollup@4.29.2)(typescript@5.7.2) + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) starlight-spell-checker: specifier: workspace:* version: link:../../.. @@ -368,16 +1001,20 @@ importers: dependencies: '@astrojs/starlight': specifier: ^0.30.2 - version: 0.30.3(astro@5.1.2(rollup@4.29.2)(typescript@5.7.2)) + version: 0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) astro: specifier: ^5.1.1 - version: 5.1.2(rollup@4.29.2)(typescript@5.7.2) + version: 5.1.6(rollup@4.29.2)(typescript@5.7.2) starlight-spell-checker: specifier: workspace:* version: link:../../.. packages: + '@ampproject/remapping@2.3.0': + resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} + engines: {node: '>=6.0.0'} + '@astrojs/compiler@2.10.3': resolution: {integrity: sha512-bL/O7YBxsFt55YHU021oL+xz+B/9HvGNId3F9xURN16aeqDK9juHGktdkCSXz+U4nqFACq6ZFvWomOzhV+zfPw==} @@ -387,8 +1024,8 @@ packages: '@astrojs/markdown-remark@6.0.1': resolution: {integrity: sha512-CTSYijj25NfxgZi15TU3CwPwgyD1/7yA3FcdcNmB9p94nydupiUbrIiq3IqeTp2m5kCVzxbPZeC7fTwEOaNyGw==} - '@astrojs/mdx@4.0.3': - resolution: {integrity: sha512-8HcuyNG/KgYUAQWVzKFkboXcTOBCW6aQ0WK0Er/iSmVSF0y3yimg4/3QSt+Twv9dogpwIHL+E8iBJKqieFv4+g==} + '@astrojs/mdx@4.0.5': + resolution: {integrity: sha512-JhMCm4wf94PNHQDWKyez2ZVLcG5R6Cyjk8TmpqYVRrOTuU3GIWeDAoum7Q1p05SFD+nYwvXOcv42/m8pE3Ylug==} engines: {node: ^18.17.1 || ^20.3.0 || >=22.0.0} peerDependencies: astro: ^5.0.0 @@ -400,8 +1037,8 @@ packages: '@astrojs/sitemap@3.2.1': resolution: {integrity: sha512-uxMfO8f7pALq0ADL6Lk68UV6dNYjJ2xGUzyjjVj60JLBs5a6smtlkBYv3tQ0DzoqwS7c9n4FUx5lgv0yPo/fgA==} - '@astrojs/starlight@0.30.3': - resolution: {integrity: sha512-HbGYYIR2Rnrvvc2jD0dUpp8zUzv3jQYtG5im3aulDgE4Jo21Ahw0yXlb/Y134G3LALLbqhImmlbt/h/nDV3yMA==} + '@astrojs/starlight@0.30.6': + resolution: {integrity: sha512-/AoLXjPPD1MqixkTd2Lp3qahSzfCejePWHZQ3+fDjj1CuXI7Gjrr5bR3zNV0b9tynloPAIBM0HOyBNEGAo9uAQ==} peerDependencies: astro: ^5.0.0 @@ -430,6 +1067,9 @@ packages: resolution: {integrity: sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA==} engines: {node: '>=6.9.0'} + '@bcoe/v8-coverage@0.2.3': + resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} + '@changesets/apply-release-plan@7.0.7': resolution: {integrity: sha512-qnPOcmmmnD0MfMg9DjU1/onORFyRpDXkMMl2IJg9mECY6RnxL3wN0TCCc92b2sXt1jt8DgjAUUsZYGUGTdYIXA==} @@ -903,9 +1543,32 @@ packages: cpu: [x64] os: [win32] + '@isaacs/cliui@8.0.2': + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + + '@istanbuljs/schema@0.1.3': + resolution: {integrity: sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==} + engines: {node: '>=8'} + + '@jridgewell/gen-mapping@0.3.8': + resolution: {integrity: sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==} + engines: {node: '>=6.0.0'} + + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + + '@jridgewell/set-array@1.2.1': + resolution: {integrity: sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==} + engines: {node: '>=6.0.0'} + '@jridgewell/sourcemap-codec@1.5.0': resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + '@jridgewell/trace-mapping@0.3.25': + resolution: {integrity: sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==} + '@manypkg/find-root@1.1.0': resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} @@ -958,6 +1621,13 @@ packages: cpu: [x64] os: [win32] + '@pkgjs/parseargs@0.11.0': + resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} + engines: {node: '>=14'} + + '@polka/url@1.0.0-next.28': + resolution: {integrity: sha512-8LduaNlMZGwdZ6qWrKlfa+2M4gahzFkprZiAt2TF8uS0qQgBizKXpXURqvTJ4WtmupWxaLqjRb2UCTe72mu+Aw==} + '@rollup/pluginutils@5.1.4': resolution: {integrity: sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==} engines: {node: '>=14.0.0'} @@ -1065,24 +1735,55 @@ packages: '@shikijs/core@1.26.1': resolution: {integrity: sha512-yeo7sG+WZQblKPclUOKRPwkv1PyoHYkJ4gP9DzhFJbTdueKR7wYTI1vfF/bFi1NTgc545yG/DzvVhZgueVOXMA==} + '@shikijs/core@1.26.2': + resolution: {integrity: sha512-ORyu3MrY7dCC7FDLDsFSkBM9b/AT9/Y8rH+UQ07Rtek48pp0ZhQOMPTKolqszP4bBCas6FqTZQYt18BBamVl/g==} + '@shikijs/engine-javascript@1.26.1': resolution: {integrity: sha512-CRhA0b8CaSLxS0E9A4Bzcb3LKBNpykfo9F85ozlNyArxjo2NkijtiwrJZ6eHa+NT5I9Kox2IXVdjUsP4dilsmw==} + '@shikijs/engine-javascript@1.26.2': + resolution: {integrity: sha512-ngkIu9swLVo9Zt5QBtz5Sk08vmPcwuj01r7pPK/Zjmo2U2WyKMK4WMUMmkdQiUacdcLth0zt8u1onp4zhkFXKQ==} + '@shikijs/engine-oniguruma@1.26.1': resolution: {integrity: sha512-F5XuxN1HljLuvfXv7d+mlTkV7XukC1cawdtOo+7pKgPD83CAB1Sf8uHqP3PK0u7njFH0ZhoXE1r+0JzEgAQ+kg==} + '@shikijs/engine-oniguruma@1.26.2': + resolution: {integrity: sha512-mlN7Qrs+w60nKrd7at7XkXSwz6728Pe34taDmHrG6LRHjzCqQ+ysg+/AT6/D2LMk0s2lsr71DjpI73430QP4/w==} + '@shikijs/langs@1.26.1': resolution: {integrity: sha512-oz/TQiIqZejEIZbGtn68hbJijAOTtYH4TMMSWkWYozwqdpKR3EXgILneQy26WItmJjp3xVspHdiUxUCws4gtuw==} + '@shikijs/langs@1.26.2': + resolution: {integrity: sha512-o5cdPycB2Kw3IgncHxWopWPiTkjAj7dG01fLkkUyj3glb5ftxL/Opecq9F54opMlrgXy7ZIqDERvFLlUzsCOuA==} + '@shikijs/themes@1.26.1': resolution: {integrity: sha512-JDxVn+z+wgLCiUhBGx2OQrLCkKZQGzNH3nAxFir4PjUcYiyD8Jdms9izyxIogYmSwmoPTatFTdzyrRKbKlSfPA==} + '@shikijs/themes@1.26.2': + resolution: {integrity: sha512-y4Pn6PM5mODz/e3yF6jAUG7WLKJzqL2tJ5qMJCUkMUB1VRgtQVvoa1cHh7NScryGXyrYGJ8nPnRDhdv2rw0xpA==} + '@shikijs/types@1.26.1': resolution: {integrity: sha512-d4B00TKKAMaHuFYgRf3L0gwtvqpW4hVdVwKcZYbBfAAQXspgkbWqnFfuFl3MDH6gLbsubOcr+prcnsqah3ny7Q==} + '@shikijs/types@1.26.2': + resolution: {integrity: sha512-PO2jucx2FIdlLBPYbIUlMtWSLs5ulcRcuV93cR3T65lkK5SJP4MGBRt9kmWGXiQc0f7+FHj/0BEawditZcI/fQ==} + '@shikijs/vscode-textmate@10.0.1': resolution: {integrity: sha512-fTIQwLF+Qhuws31iw7Ncl1R3HUDtGwIipiJ9iU+UsDUwMhegFcQKQHd51nZjb7CArq0MvON8rbgCGQYWHUKAdg==} + '@trueberryless-org/retext-assuming@0.1.1': + resolution: {integrity: sha512-DrmC4Z9eLZvW4IHZ+P0YAfb/NqNFI7WsTynLaH6n4muzbXLBAzbAlS6jI6hV367uGjmxONhUAffrIp6jLOe17g==} + + '@trueberryless-org/retext-case-police@0.1.1': + resolution: {integrity: sha512-6jLjWCOx0ywTCyJVJ1ML/30lSr8yLtwlLf438cyBdqRQ3EbFmwADqREURW0tUx9vmpw+n3fAi2bTPjuJ4t/tbQ==} + engines: {node: '>=17'} + + '@trueberryless-org/retext-indefinite-article@0.1.0': + resolution: {integrity: sha512-z8OpnRUeBQJ5tP+bk5/i3TZPVCWzWYHwEh0iMOGgLoMPd/o3Zb/6J6+hvAzgkGylmglsIOLoRAznD9r0TPVbSg==} + + '@trueberryless-org/retext-usage@0.1.3': + resolution: {integrity: sha512-4A00uhd3rCD3afrP3mD5v+Elv0BImTbuI6RFYshkaFkhggiNK/WglZvcVkD1wtAHx5XHkgR2DP/CEjhj3AQK2g==} + '@types/acorn@4.0.6': resolution: {integrity: sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==} @@ -1134,9 +1835,6 @@ packages: '@types/sax@1.2.7': resolution: {integrity: sha512-rO73L89PJxeYM3s3pPPjiPgVVcymqU490g0YO5n5By0k2Erzj6tay/4lr1CHAAU4JyOWd1rpQ8bCf6cZfHU96A==} - '@types/supports-color@8.1.3': - resolution: {integrity: sha512-Hy6UMpxhE3j1tLpl27exp1XqHD7n8chAiNPzWfz16LPZoMMoSc4dzLl6w9qijkEb/r5O1ozdu1CWGA2L83ZeZg==} - '@types/unist@2.0.11': resolution: {integrity: sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==} @@ -1146,6 +1844,15 @@ packages: '@ungap/structured-clone@1.2.1': resolution: {integrity: sha512-fEzPV3hSkSMltkw152tJKNARhOupqbH96MZWyRjNaYZOMIzbrTeQDG+MTc6Mr2pgzFQzFxAfmhGDNP5QK++2ZA==} + '@vitest/coverage-v8@2.1.8': + resolution: {integrity: sha512-2Y7BPlKH18mAZYAW1tYByudlCYrQyl5RGvnnDYJKW5tCiO5qg3KSAy3XAxcxKz900a0ZXxWtKrMuZLe3lKBpJw==} + peerDependencies: + '@vitest/browser': 2.1.8 + vitest: 2.1.8 + peerDependenciesMeta: + '@vitest/browser': + optional: true + '@vitest/expect@2.1.8': resolution: {integrity: sha512-8ytZ/fFHq2g4PJVAtDX57mayemKgDR6X3Oa2Foro+EygiOJHUXhCqBAAKQYYajZpFoIfvBCF1j6R6IYRSIUFuw==} @@ -1172,6 +1879,11 @@ packages: '@vitest/spy@2.1.8': resolution: {integrity: sha512-5swjf2q95gXeYPevtW0BLk6H8+bPlMb4Vw/9Em4hFxDcaOxS+e0LOX4yqNxoHzMR2akEB2xfpnWUzkZokmgWDg==} + '@vitest/ui@2.1.8': + resolution: {integrity: sha512-5zPJ1fs0ixSVSs5+5V2XJjXLmNzjugHRyV11RqxYVR+oMcogZ9qTuSfKW+OcTV0JeFNznI83BNylzH6SSNJ1+w==} + peerDependencies: + vitest: 2.1.8 + '@vitest/utils@2.1.8': resolution: {integrity: sha512-dwSoui6djdwbfFmIgbIjX2ZhIoG7Ex/+xpxyiEgIGzjliY8xGkcpITKTlp6B4MgtGkF2ilvm97cPM96XZaAgcA==} @@ -1200,6 +1912,10 @@ packages: resolution: {integrity: sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==} engines: {node: '>=12'} + ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + ansi-styles@6.2.1: resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} engines: {node: '>=12'} @@ -1245,8 +1961,8 @@ packages: peerDependencies: astro: ^4.0.0-beta || ^5.0.0-beta || ^3.3.0 - astro@5.1.2: - resolution: {integrity: sha512-+U5lXPEJZ6cQx0botGbPhzN6XGWRgDtXgy/RUkpTmUj18LW6pbzYo0O0k3hFWOazlI039bZ+4P2e/oSNlKzm0Q==} + astro@5.1.6: + resolution: {integrity: sha512-LpTazCIW6syxFePi65gg2ptqqC2kR+PDRym3V23hEQj5yCf+T0t5v9qtp3fW0/+6G+JvP0EprCfCRTt7h/hexg==} engines: {node: ^18.17.1 || ^20.3.0 || >=22.0.0, npm: '>=9.6.5', pnpm: '>=7.1.0'} hasBin: true @@ -1260,6 +1976,9 @@ packages: bail@2.0.2: resolution: {integrity: sha512-0xO6mYd7JB2YesxDKplafRpsiOzPt9V02ddPCLbY1xYGPOX24NTyN50qnUxgCPcSoYMhKpAuBTjQoRZCAkUDRw==} + balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + base-64@1.0.0: resolution: {integrity: sha512-kwDPIFCGx0NZHog36dj+tHiwP4QMzsZ3AgMViUBKI0+V5n4U0ufTCUMhnQ04diaRI8EX/QcPfql7zlhZ7j4zgg==} @@ -1284,6 +2003,9 @@ packages: resolution: {integrity: sha512-F3PH5k5juxom4xktynS7MoFY+NUWH5LC4CnH11YB8NPew+HLpmBLCybSAEyb2F+4pRXhuhWqFesoQd6DAyc2hw==} engines: {node: '>=18'} + brace-expansion@2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + braces@3.0.3: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} @@ -1523,6 +2245,9 @@ packages: emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + enquirer@2.4.1: resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} engines: {node: '>=8.6'} @@ -1593,6 +2318,10 @@ packages: expressive-code@0.38.3: resolution: {integrity: sha512-COM04AiUotHCKJgWdn7NtW2lqu8OW8owAidMpkXt1qxrZ9Q2iC7+tok/1qIn2ocGnczvr9paIySgGnEwFeEQ8Q==} + extend-shallow@2.0.1: + resolution: {integrity: sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==} + engines: {node: '>=0.10.0'} + extend@3.0.2: resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} @@ -1610,6 +2339,17 @@ packages: fastq@1.18.0: resolution: {integrity: sha512-QKHXPW0hD8g4UET03SdOdunzSouc9N4AuHdsX8XNcTsuz+yYFILVNIX4l9yHABMhiEI9Db0JTTIpu0wB+Y1QQw==} + fdir@6.4.2: + resolution: {integrity: sha512-KnhMXsKSPZlAhp7+IjUkRZKPb4fUyccpDrdFXbi4QL1qkmFh9kVY09Yox+n4MaOb3lHZ1Tv829C3oaaXoMYPDQ==} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + + fflate@0.8.2: + resolution: {integrity: sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==} + fill-range@7.1.1: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} @@ -1628,6 +2368,9 @@ packages: find-yarn-workspace-root2@1.2.16: resolution: {integrity: sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA==} + flatted@3.3.2: + resolution: {integrity: sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==} + flattie@1.1.1: resolution: {integrity: sha512-9UbaD6XdAL97+k/n+N7JwX46K/M6Zc6KcFYskrYL8wbBV/Uyk0CTAMY0VT+qiK5PM7AIc9aTWYtq65U7T+aCNQ==} engines: {node: '>=8'} @@ -1635,6 +2378,10 @@ packages: flesch@2.0.1: resolution: {integrity: sha512-bNr6zn2sjSOrgt8KINjAqWjGVx59Td8kz6Rb9JK9QmX0KYj46SS2e+7P7JaXcMOBEKr4nGuCiET7KHEhzjXtng==} + foreground-child@3.3.0: + resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} + engines: {node: '>=14'} + fs-extra@7.0.1: resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} engines: {node: '>=6 <7 || >=8'} @@ -1659,6 +2406,10 @@ packages: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} + glob@10.4.5: + resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==} + hasBin: true + globby@11.1.0: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} engines: {node: '>=10'} @@ -1666,12 +2417,20 @@ packages: graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + gray-matter@4.0.3: + resolution: {integrity: sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==} + engines: {node: '>=6.0'} + gunning-fog@2.0.1: resolution: {integrity: sha512-cszyB/P2ET+MsNosEfzjNZhVVMeLKAKYV+5g5NrYPdzKzwKcpzPqlkM3D3l41qVyElT33RYX8tQTzYYX6mnmGQ==} h3@1.13.0: resolution: {integrity: sha512-vFEAu/yf8UMUcB4s43OaDaigcqpQd14yanmOsn+NcRX3/guSKncyE2rOYhq8RIchgJrPSs/QiIddnTTR1ddiAg==} + has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + hast-util-embedded@3.0.0: resolution: {integrity: sha512-naH8sld4Pe2ep03qqULEtvYr7EjrLK2QHY8KJR6RJkTUjPGObe1vnx585uzem2hGra+s1q08DZZpfgDVYRbaXA==} @@ -1729,16 +2488,15 @@ packages: hast-util-whitespace@3.0.0: resolution: {integrity: sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==} - hast@1.0.0: - resolution: {integrity: sha512-vFUqlRV5C+xqP76Wwq2SrM0kipnmpxJm7OfvVXpB35Fp+Fn4MV+ozr+JZr5qFvyR1q/U+Foim2x+3P+x9S1PLA==} - deprecated: Renamed to rehype - hastscript@9.0.0: resolution: {integrity: sha512-jzaLBGavEDKHrc5EfFImKN7nZKKBdSLIdGvCwDZ9TfzbF2ffXiov8CKE445L2Z1Ek2t/m4SKQ2j6Ipv7NyUolw==} hedges@2.0.1: resolution: {integrity: sha512-/TJb3QUphoIM/Vh2FcxR8GckKVzDRz816b5Afim5nQmZMizY6/n8/Q+8NI9XHrNgTFqDUsL6iyNk1008bGwS/g==} + html-escaper@2.0.2: + resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} + html-escaper@3.0.3: resolution: {integrity: sha512-RuMffC89BOWQoY0WKGpIhn5gX3iI54O6nRA0yC124NYVtzjmFWBIiFd8M0x+ZdX0P9R4lADg1mgP8C7PxGOWuQ==} @@ -1799,6 +2557,10 @@ packages: engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} hasBin: true + is-extendable@0.1.1: + resolution: {integrity: sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==} + engines: {node: '>=0.10.0'} + is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} @@ -1842,6 +2604,25 @@ packages: isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + istanbul-lib-coverage@3.2.2: + resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==} + engines: {node: '>=8'} + + istanbul-lib-report@3.0.1: + resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==} + engines: {node: '>=10'} + + istanbul-lib-source-maps@5.0.6: + resolution: {integrity: sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A==} + engines: {node: '>=10'} + + istanbul-reports@3.1.7: + resolution: {integrity: sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==} + engines: {node: '>=8'} + + jackspeak@3.4.3: + resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} + js-yaml@3.14.1: resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} hasBin: true @@ -1853,6 +2634,10 @@ packages: jsonfile@4.0.0: resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} + kind-of@6.0.3: + resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} + engines: {node: '>=0.10.0'} + kleur@3.0.3: resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} engines: {node: '>=6'} @@ -1869,12 +2654,12 @@ packages: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} - lodash.difference@4.5.0: - resolution: {integrity: sha512-dS2j+W26TQ7taQBGN8Lbbq04ssV3emRw4NY58WErlTO29pIqS0HmoT5aJ9+TUQ1N3G+JOZSji4eugsWwGp9yPA==} - lodash.startcase@4.4.0: resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} + lodash@4.17.21: + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + longest-streak@3.1.0: resolution: {integrity: sha512-9Ri+o0JYgehTaVBBDoMqIl8GXtbWg711O3srftcHhZ0dqnETqLaoIK0x17fUw9rFSlK/0NlsKe0Ahhyl5pXE2g==} @@ -1890,6 +2675,10 @@ packages: magicast@0.3.5: resolution: {integrity: sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ==} + make-dir@4.0.0: + resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} + engines: {node: '>=10'} + markdown-extensions@2.0.0: resolution: {integrity: sha512-o5vL7aDWatOTX8LzaS1WMoaoxIiLRQJuIKKe2wAw6IeULDHaqbiqiggmx+pKvZDb1Sj+pE46Sn1T7lCqfFtg1Q==} engines: {node: '>=16'} @@ -1933,8 +2722,8 @@ packages: mdast-util-mdx-expression@2.0.1: resolution: {integrity: sha512-J6f+9hUp+ldTZqKRSg7Vw5V6MqjATc+3E4gf3CFNcuZNWD8XdyI6zQ8GqH7f8169MM6P7hMBRDVGnn7oHB9kXQ==} - mdast-util-mdx-jsx@3.1.3: - resolution: {integrity: sha512-bfOjvNt+1AcbPLTFMFWY149nJz0OjmewJs3LQQ5pIyVGxP4CdOqNVJL6kTaM5c68p8q82Xv3nCyFfUnuEcH3UQ==} + mdast-util-mdx-jsx@3.2.0: + resolution: {integrity: sha512-lj/z8v0r6ZtsN/cGNNtemmmfoLAFZnjMbNyLzBafjzikOM+glrjNHPlf6lQDOTccj9n5b0PPihEBbhneMyGs1Q==} mdast-util-mdx@3.0.0: resolution: {integrity: sha512-JfbYLAW7XnYTTbUsmpu0kdBUVe+yKVJZBItEjwyYJiDJuZ9w4eeaqks4HQO+R7objWgS2ymV60GYpI14Ug554w==} @@ -1951,9 +2740,6 @@ packages: mdast-util-to-markdown@2.1.2: resolution: {integrity: sha512-xj68wMTvGXVOKonmog6LwyJKrYXZPvlwabaryTjLh9LuvovB/KAH+kvi8Gjj+7rJjsFi23nkUxRQv1KqSroMqA==} - mdast-util-to-nlcst@7.0.1: - resolution: {integrity: sha512-iMucBmaHxOpreaPPR87U9NrfGqzyoKXFY1zdbtFVsckLWOi/iIshu6bFLsax0mIm9fQI+MpYpu8pBhyN7rkIGA==} - mdast-util-to-string@4.0.0: resolution: {integrity: sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==} @@ -2082,6 +2868,14 @@ packages: engines: {node: '>=10.0.0'} hasBin: true + minimatch@9.0.5: + resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} + engines: {node: '>=16 || 14 >=14.17'} + + minipass@7.1.2: + resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} + engines: {node: '>=16 || 14 >=14.17'} + mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} @@ -2190,6 +2984,9 @@ packages: oniguruma-to-es@0.10.0: resolution: {integrity: sha512-zapyOUOCJxt+xhiNRPPMtfJkHGsZ98HHB9qJEkdT8BGytO/+kpe4m1Ngf0MzbzTmhacn11w9yGeDP6tzDhnCdg==} + oniguruma-to-es@1.0.0: + resolution: {integrity: sha512-kihvp0O4lFwf5tZMkfanwQLIZ9ORe9OeOFgZonH0BQeThgwfJiaZFeOfvvJVnJIM9TiVmx0RDD35hUJDR0++rQ==} + os-tmpdir@1.0.2: resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} engines: {node: '>=0.10.0'} @@ -2229,6 +3026,9 @@ packages: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} + package-json-from-dist@1.0.1: + resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} + package-manager-detector@0.2.8: resolution: {integrity: sha512-ts9KSdroZisdvKMWVAVCXiKqnqNfXz4+IbrBG8/BWx/TR5le+jfenvoBuIZ6UWM9nz47W7AbD9qYfAwfWMIwzA==} @@ -2253,6 +3053,10 @@ packages: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} + path-scurry@1.11.1: + resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} + engines: {node: '>=16 || 14 >=14.18'} + path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} @@ -2301,6 +3105,10 @@ packages: resolution: {integrity: sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==} engines: {node: ^10 || ^12 || >=14} + postcss@8.5.0: + resolution: {integrity: sha512-27VKOqrYfPncKA2NrFOVhP5MGAfHKLYn/Q0mz9cNQyRAKYi3VNHwYU2qKKqPCqgBmeeJ0uAFB56NumXZ5ZReXg==} + engines: {node: ^10 || ^12 || >=14} + preferred-pm@4.0.0: resolution: {integrity: sha512-gYBeFTZLu055D8Vv3cSPox/0iTPtkzxpLroSYYA7WXgRi31WCJ51Uyl8ZiPeUUjyvs2MBzK+S8v9JVUgHU/Sqw==} engines: {node: '>=18.12'} @@ -2401,9 +3209,6 @@ packages: remark-rehype@11.1.1: resolution: {integrity: sha512-g/osARvjkBXb6Wo0XvAeXQohVta8i84ACbenPpoSsxTOQH/Ae0/RGP4WZgnMH5pMLpsj4FG7OHmcIcXxpza8eQ==} - remark-retext@6.0.0: - resolution: {integrity: sha512-VYs0p+3G4DKm/KtWx7LV8YPbyX4CjBf1SZcEk2usEv3QK6JK4g5EfurDAPUmGVZOx/NcqOiNbozfGqpl2HQfTA==} - remark-smartypants@3.0.2: resolution: {integrity: sha512-ILTWeOriIluwEvPjv67v7Blgrcx+LZOkAUVtKI3putuhlZm84FnqDORNXPPm+HY3NdZOMhyDwZ1E+eZB/Df5dA==} engines: {node: '>=16.0.0'} @@ -2415,13 +3220,6 @@ packages: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} engines: {node: '>=8'} - retext-assuming@1.0.0: - resolution: {integrity: sha512-DuUVEYtWtplVwzlY8kJao87ZIuzgGBKuq1bSA8lss2aKzEQJSRGDUkmGVgnTnJiCYFFGRbskfaq0bSkpLQlwuQ==} - - retext-case-police@1.1.7: - resolution: {integrity: sha512-eEmcwvKf1fb/SvPPtLB5SnANy8cnL0qyBFYZdb6H73t1qSVPoXZ5DulWWoKTBdzkmLLziDclznxyLVB9PwrSxQ==} - engines: {node: '>=17'} - retext-cliches@1.0.0: resolution: {integrity: sha512-iriUk/RSovD4rL+X1O67dSC+cP79Ks58p6Gus3ygry7wQXVEVOZGGX37yIkBWJgg8wh76mNsgk13DoLjlVzrNw==} @@ -2434,9 +3232,6 @@ packages: retext-equality@7.1.0: resolution: {integrity: sha512-YzrGxIfubNetpi5xEZXFaWKaQNdDHYal0JNaIllTRO+vkjO0FRuGgLoYixR1BYR3vx7k6p7c+MdVM1NxTlC+MQ==} - retext-indefinite-article@5.0.0: - resolution: {integrity: sha512-vro0uKcT685qTUy2IWpJiW786JULrs5KK9jSbNEzHq2ln8PV/uQqqlzueSF4wpOtBUl1JzEPetH9hIDdzQ2ypA==} - retext-intensify@7.0.0: resolution: {integrity: sha512-wzhhiuCXYViQbvR9AdNhCeeDf3C9ImTtjwIPCYc2EL37SfMQ94WARbKaUytJO+DWsRQLlpztwwR3JyOhGBnsag==} @@ -2452,8 +3247,8 @@ packages: retext-profanities@8.0.0: resolution: {integrity: sha512-fuKCUqpXnzSimirk5iBL3vwJJhxzypxMiEfI6FHJ3xafsD8KfPjdd7v0z65PHf+VuekGAIGv4wW34UAM1w9ihw==} - retext-quotes@6.0.0: - resolution: {integrity: sha512-LvWVCSqqvDQvIT8WPXryUBrmgMl7EO3pb4wenJ0NNywpy3/4Kbc3rGULlfsq7K80xEARQ239ujWu9nUqdMTVLA==} + retext-quotes@6.0.2: + resolution: {integrity: sha512-J+JdHDvWDkibjcld7pEag2/rLoIA0NNbqdHfvv0wrpGv6nsYbEy6TKQi5oRcNO6TzgIH5CRQXs2qiwDr/PbP+g==} retext-readability@8.0.0: resolution: {integrity: sha512-fGxJLap12lerQnU+4746oc6jYBRmvdud1aVNzagKwX10etXV4UWuFSl8bjQCbboT5fq74ImR8Mt1UmAGSUPyhw==} @@ -2476,10 +3271,6 @@ packages: retext-stringify@4.0.0: resolution: {integrity: sha512-rtfN/0o8kL1e+78+uxPTqu1Klt0yPzKuQ2BfWwwfgIUSayyzxpM1PJzkKt4V8803uB9qSy32MvI7Xep9khTpiA==} - retext-usage@0.5.0: - resolution: {integrity: sha512-TAHbxZg23EcbmYjdBn5zmSAeINDJH2iFvmg/EvG05Hf5rwZpHgSDAfTdeHQURRDdpc1c/xBx6Dj5xvqGl1K/TQ==} - deprecated: This package is no longer maintained. Use at your own risk. - retext@9.0.0: resolution: {integrity: sha512-sbMDcpHCNjvlheSgMfEcVrZko3cDzdbe1x/e7G66dFp0Ff7Mldvi2uv6JkJQzdRcvLYE8CA8Oe8siQx8ZOgTcA==} @@ -2501,6 +3292,10 @@ packages: sax@1.4.1: resolution: {integrity: sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==} + section-matter@1.0.0: + resolution: {integrity: sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==} + engines: {node: '>=4'} + semver@7.6.3: resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} engines: {node: '>=10'} @@ -2521,6 +3316,9 @@ packages: shiki@1.26.1: resolution: {integrity: sha512-Gqg6DSTk3wYqaZ5OaYtzjcdxcBvX5kCy24yvRJEgjT5U+WHlmqCThLuBUx0juyxQBi+6ug53IGeuQS07DWwpcw==} + shiki@1.26.2: + resolution: {integrity: sha512-iP7u2NA9A6JwRRCkIUREEX2cMhlYV5EBmbbSlfSRvPThwca8HBRbVkWuNWW+kw9+i6BSUZqqG6YeUs5dC2SjZw==} + siginfo@2.0.0: resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} @@ -2531,6 +3329,10 @@ packages: simple-swizzle@0.2.2: resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} + sirv@3.0.0: + resolution: {integrity: sha512-BPwJGUeDaDCHihkORDchNyyTvWFhcusy1XMmhEVTQTwGeybFbp8YEmB+njbPnth1FibULBSBVwCQni25XlCUDg==} + engines: {node: '>=18'} + sisteransi@1.0.5: resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} @@ -2585,9 +3387,9 @@ packages: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} - string-width@6.1.0: - resolution: {integrity: sha512-k01swCJAgQmuADB0YIc+7TuatfNvTBVOoaUWJjTB9R4VJzR5vNWzf5t42ESVZFPS8xTySF7CAdV4t/aaIm3UnQ==} - engines: {node: '>=16'} + string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} string-width@7.2.0: resolution: {integrity: sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==} @@ -2604,6 +3406,10 @@ packages: resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} engines: {node: '>=12'} + strip-bom-string@1.0.0: + resolution: {integrity: sha512-uCC2VHvQRYu+lMh4My/sFNmF2klFymLX1wHJeXnbEJERpV/ZsVuonzerjfrGpIGF7LBVa1O7i9kjiWvJiFck8g==} + engines: {node: '>=0.10.0'} + strip-bom@3.0.0: resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} @@ -2611,9 +3417,9 @@ packages: style-to-object@1.0.8: resolution: {integrity: sha512-xT47I/Eo0rwJmaXC4oilDGDWLohVhR6o/xAQcPQN8q6QBuZVL8qMYL85kLmST5cPjAorwvqIA4qXTRQoYHaL6g==} - supports-color@9.4.0: - resolution: {integrity: sha512-VL+lNrEoIXww1coLPOmiEmK/0sGigko5COxI09KzHc2VJXJsQ37UaQ+8quuxjDeA7+KnLGTWRyOXSLLR2Wb4jw==} - engines: {node: '>=12'} + supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} syllable@5.0.1: resolution: {integrity: sha512-HWtNCp6v7J8H0lrT8j1HHjfOLltRoDcC7QRFVu25p4BE52JqetXG65nqC7CsatT8WQRfY4Qvh93BWJIUxbmXFg==} @@ -2623,6 +3429,10 @@ packages: resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} engines: {node: '>=8'} + test-exclude@7.0.1: + resolution: {integrity: sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==} + engines: {node: '>=18'} + thesaurus@0.0.0: resolution: {integrity: sha512-UMBq/VrjRPn0ZmxvW1l+pl66hJbDxOvLjp1J3O6ws44D55MWG5mbjxHKqFJy16H545q/rFHWVpJARtjlHiXXEA==} @@ -2632,6 +3442,10 @@ packages: tinyexec@0.3.2: resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} + tinyglobby@0.2.10: + resolution: {integrity: sha512-Zc+8eJlFMvgatPZTl6A9L/yht8QqdmUNtURHaKZLmKBE12hNPSrqNkUp2cs3M/UKmNVVAMFQYSjYIVHDjW5zew==} + engines: {node: '>=12.0.0'} + tinypool@1.0.2: resolution: {integrity: sha512-al6n+QEANGFOMf/dmUMsuS5/r9B06uwlyNjZZql/zv8J7ybHCgoihBNORZCY2mzUuAnomQa2JdhyHKzZxPCrFA==} engines: {node: ^18.0.0 || >=20.0.0} @@ -2652,6 +3466,10 @@ packages: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} + totalist@3.0.1: + resolution: {integrity: sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==} + engines: {node: '>=6'} + tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} @@ -2827,15 +3645,6 @@ packages: vfile-message@4.0.2: resolution: {integrity: sha512-jRDZ1IMLttGj41KcZvlrYAaI3CfqpLpfpf+Mfig13viT6NKvRzWZ+lXz0Y5D60w6uJIBAOGq9mSHf0gktF0duw==} - vfile-reporter@8.1.1: - resolution: {integrity: sha512-qxRZcnFSQt6pWKn3PAk81yLK2rO2i7CDXpy8v8ZquiEOMLSnPw6BMSi9Y1sUCwGGl7a9b3CJT1CKpnRF7pp66g==} - - vfile-sort@4.0.0: - resolution: {integrity: sha512-lffPI1JrbHDTToJwcq0rl6rBmkjQmMuXkAxsZPRS9DXbaJQvc642eCg6EGxcX2i1L+esbuhq+2l9tBll5v8AeQ==} - - vfile-statistics@3.0.0: - resolution: {integrity: sha512-/qlwqwWBWFOmpXujL/20P+Iuydil0rZZNglR+VNm6J0gpLHwuVM5s7g2TfVoswbXjZ4HuIhLMySEyIw5i7/D8w==} - vfile@6.0.3: resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==} @@ -2982,6 +3791,14 @@ packages: resolution: {integrity: sha512-c9bZp7b5YtRj2wOe6dlj32MK+Bx/M/d+9VB2SHM1OtsUHR0aV0tdP6DWh/iMt0kWi1t5g1Iudu6hQRNd1A4PVA==} engines: {node: '>=18'} + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + wrap-ansi@9.0.0: resolution: {integrity: sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==} engines: {node: '>=18'} @@ -3024,6 +3841,11 @@ packages: snapshots: + '@ampproject/remapping@2.3.0': + dependencies: + '@jridgewell/gen-mapping': 0.3.8 + '@jridgewell/trace-mapping': 0.3.25 + '@astrojs/compiler@2.10.3': {} '@astrojs/internal-helpers@0.4.2': {} @@ -3052,12 +3874,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@astrojs/mdx@4.0.3(astro@5.1.2(rollup@4.29.2)(typescript@5.7.2))': + '@astrojs/mdx@4.0.5(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2))': dependencies: '@astrojs/markdown-remark': 6.0.1 '@mdx-js/mdx': 3.1.0(acorn@8.14.0) acorn: 8.14.0 - astro: 5.1.2(rollup@4.29.2)(typescript@5.7.2) + astro: 5.1.6(rollup@4.29.2)(typescript@5.7.2) es-module-lexer: 1.6.0 estree-util-visit: 2.0.0 hast-util-to-html: 9.0.4 @@ -3081,16 +3903,16 @@ snapshots: stream-replace-string: 2.0.0 zod: 3.24.1 - '@astrojs/starlight@0.30.3(astro@5.1.2(rollup@4.29.2)(typescript@5.7.2))': + '@astrojs/starlight@0.30.6(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2))': dependencies: - '@astrojs/mdx': 4.0.3(astro@5.1.2(rollup@4.29.2)(typescript@5.7.2)) + '@astrojs/mdx': 4.0.5(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) '@astrojs/sitemap': 3.2.1 '@pagefind/default-ui': 1.3.0 '@types/hast': 3.0.4 '@types/js-yaml': 4.0.9 '@types/mdast': 4.0.4 - astro: 5.1.2(rollup@4.29.2)(typescript@5.7.2) - astro-expressive-code: 0.38.3(astro@5.1.2(rollup@4.29.2)(typescript@5.7.2)) + astro: 5.1.6(rollup@4.29.2)(typescript@5.7.2) + astro-expressive-code: 0.38.3(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)) bcp-47: 2.1.0 hast-util-from-html: 2.0.3 hast-util-select: 6.0.3 @@ -3140,6 +3962,8 @@ snapshots: '@babel/helper-string-parser': 7.25.9 '@babel/helper-validator-identifier': 7.25.9 + '@bcoe/v8-coverage@0.2.3': {} + '@changesets/apply-release-plan@7.0.7': dependencies: '@changesets/config': 3.0.5 @@ -3455,8 +4279,8 @@ snapshots: hast-util-to-html: 9.0.4 hast-util-to-text: 4.0.2 hastscript: 9.0.0 - postcss: 8.4.49 - postcss-nested: 6.2.0(postcss@8.4.49) + postcss: 8.5.0 + postcss-nested: 6.2.0(postcss@8.5.0) unist-util-visit: 5.0.0 unist-util-visit-parents: 6.0.1 @@ -3467,7 +4291,7 @@ snapshots: '@expressive-code/plugin-shiki@0.38.3': dependencies: '@expressive-code/core': 0.38.3 - shiki: 1.26.1 + shiki: 1.26.2 '@expressive-code/plugin-text-markers@0.38.3': dependencies: @@ -3548,8 +4372,34 @@ snapshots: '@img/sharp-win32-x64@0.33.5': optional: true + '@isaacs/cliui@8.0.2': + dependencies: + string-width: 5.1.2 + string-width-cjs: string-width@4.2.3 + strip-ansi: 7.1.0 + strip-ansi-cjs: strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: wrap-ansi@7.0.0 + + '@istanbuljs/schema@0.1.3': {} + + '@jridgewell/gen-mapping@0.3.8': + dependencies: + '@jridgewell/set-array': 1.2.1 + '@jridgewell/sourcemap-codec': 1.5.0 + '@jridgewell/trace-mapping': 0.3.25 + + '@jridgewell/resolve-uri@3.1.2': {} + + '@jridgewell/set-array@1.2.1': {} + '@jridgewell/sourcemap-codec@1.5.0': {} + '@jridgewell/trace-mapping@0.3.25': + dependencies: + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.0 + '@manypkg/find-root@1.1.0': dependencies: '@babel/runtime': 7.26.0 @@ -3627,6 +4477,11 @@ snapshots: '@pagefind/windows-x64@1.3.0': optional: true + '@pkgjs/parseargs@0.11.0': + optional: true + + '@polka/url@1.0.0-next.28': {} + '@rollup/pluginutils@5.1.4(rollup@4.29.2)': dependencies: '@types/estree': 1.0.6 @@ -3701,32 +4556,95 @@ snapshots: '@types/hast': 3.0.4 hast-util-to-html: 9.0.4 + '@shikijs/core@1.26.2': + dependencies: + '@shikijs/engine-javascript': 1.26.2 + '@shikijs/engine-oniguruma': 1.26.2 + '@shikijs/types': 1.26.2 + '@shikijs/vscode-textmate': 10.0.1 + '@types/hast': 3.0.4 + hast-util-to-html: 9.0.4 + '@shikijs/engine-javascript@1.26.1': dependencies: '@shikijs/types': 1.26.1 '@shikijs/vscode-textmate': 10.0.1 oniguruma-to-es: 0.10.0 + '@shikijs/engine-javascript@1.26.2': + dependencies: + '@shikijs/types': 1.26.2 + '@shikijs/vscode-textmate': 10.0.1 + oniguruma-to-es: 1.0.0 + '@shikijs/engine-oniguruma@1.26.1': dependencies: '@shikijs/types': 1.26.1 '@shikijs/vscode-textmate': 10.0.1 + '@shikijs/engine-oniguruma@1.26.2': + dependencies: + '@shikijs/types': 1.26.2 + '@shikijs/vscode-textmate': 10.0.1 + '@shikijs/langs@1.26.1': dependencies: '@shikijs/types': 1.26.1 + '@shikijs/langs@1.26.2': + dependencies: + '@shikijs/types': 1.26.2 + '@shikijs/themes@1.26.1': dependencies: '@shikijs/types': 1.26.1 + '@shikijs/themes@1.26.2': + dependencies: + '@shikijs/types': 1.26.2 + '@shikijs/types@1.26.1': dependencies: '@shikijs/vscode-textmate': 10.0.1 '@types/hast': 3.0.4 + '@shikijs/types@1.26.2': + dependencies: + '@shikijs/vscode-textmate': 10.0.1 + '@types/hast': 3.0.4 + '@shikijs/vscode-textmate@10.0.1': {} + '@trueberryless-org/retext-assuming@0.1.1': + dependencies: + lodash: 4.17.21 + nlcst-search: 1.5.1 + nlcst-to-string: 2.0.4 + quotation: 1.1.3 + unist-util-find-before: 2.0.5 + + '@trueberryless-org/retext-case-police@0.1.1': + dependencies: + case-police: 0.5.14 + nlcst-search: 3.1.1 + nlcst-to-string: 3.1.1 + + '@trueberryless-org/retext-indefinite-article@0.1.0': + dependencies: + '@types/nlcst': 2.0.3 + nlcst-to-string: 4.0.0 + number-to-words: 1.2.4 + unist-util-visit: 5.0.0 + vfile: 6.0.3 + + '@trueberryless-org/retext-usage@0.1.3': + dependencies: + array-differ: 1.0.0 + nlcst-search: 1.5.1 + nlcst-to-string: 1.1.0 + object-keys: 1.1.1 + quotation: 1.1.3 + '@types/acorn@4.0.6': dependencies: '@types/estree': 1.0.6 @@ -3777,14 +4695,30 @@ snapshots: dependencies: '@types/node': 17.0.45 - '@types/supports-color@8.1.3': {} - '@types/unist@2.0.11': {} '@types/unist@3.0.3': {} '@ungap/structured-clone@1.2.1': {} + '@vitest/coverage-v8@2.1.8(vitest@2.1.8)': + dependencies: + '@ampproject/remapping': 2.3.0 + '@bcoe/v8-coverage': 0.2.3 + debug: 4.4.0 + istanbul-lib-coverage: 3.2.2 + istanbul-lib-report: 3.0.1 + istanbul-lib-source-maps: 5.0.6 + istanbul-reports: 3.1.7 + magic-string: 0.30.17 + magicast: 0.3.5 + std-env: 3.8.0 + test-exclude: 7.0.1 + tinyrainbow: 1.2.0 + vitest: 2.1.8(@vitest/ui@2.1.8) + transitivePeerDependencies: + - supports-color + '@vitest/expect@2.1.8': dependencies: '@vitest/spy': 2.1.8 @@ -3819,6 +4753,17 @@ snapshots: dependencies: tinyspy: 3.0.2 + '@vitest/ui@2.1.8(vitest@2.1.8)': + dependencies: + '@vitest/utils': 2.1.8 + fflate: 0.8.2 + flatted: 3.3.2 + pathe: 1.1.2 + sirv: 3.0.0 + tinyglobby: 0.2.10 + tinyrainbow: 1.2.0 + vitest: 2.1.8(@vitest/ui@2.1.8) + '@vitest/utils@2.1.8': dependencies: '@vitest/pretty-format': 2.1.8 @@ -3841,6 +4786,10 @@ snapshots: ansi-regex@6.1.0: {} + ansi-styles@4.3.0: + dependencies: + color-convert: 2.0.1 + ansi-styles@6.2.1: {} anymatch@3.1.3: @@ -3868,12 +4817,12 @@ snapshots: astring@1.9.0: {} - astro-expressive-code@0.38.3(astro@5.1.2(rollup@4.29.2)(typescript@5.7.2)): + astro-expressive-code@0.38.3(astro@5.1.6(rollup@4.29.2)(typescript@5.7.2)): dependencies: - astro: 5.1.2(rollup@4.29.2)(typescript@5.7.2) + astro: 5.1.6(rollup@4.29.2)(typescript@5.7.2) rehype-expressive-code: 0.38.3 - astro@5.1.2(rollup@4.29.2)(typescript@5.7.2): + astro@5.1.6(rollup@4.29.2)(typescript@5.7.2): dependencies: '@astrojs/compiler': 2.10.3 '@astrojs/internal-helpers': 0.4.2 @@ -3918,7 +4867,7 @@ snapshots: prompts: 2.4.2 rehype: 13.0.2 semver: 7.6.3 - shiki: 1.26.1 + shiki: 1.26.2 tinyexec: 0.3.2 tsconfck: 3.1.4(typescript@5.7.2) ultrahtml: 1.5.3 @@ -3976,6 +4925,8 @@ snapshots: bail@2.0.2: {} + balanced-match@1.0.2: {} + base-64@1.0.0: {} bcp-47-match@2.0.3: {} @@ -4005,6 +4956,10 @@ snapshots: widest-line: 5.0.0 wrap-ansi: 9.0.0 + brace-expansion@2.0.1: + dependencies: + balanced-match: 1.0.2 + braces@3.0.3: dependencies: fill-range: 7.1.1 @@ -4183,6 +5138,8 @@ snapshots: emoji-regex@8.0.0: {} + emoji-regex@9.2.2: {} + enquirer@2.4.1: dependencies: ansi-colors: 4.1.3 @@ -4310,6 +5267,10 @@ snapshots: '@expressive-code/plugin-shiki': 0.38.3 '@expressive-code/plugin-text-markers': 0.38.3 + extend-shallow@2.0.1: + dependencies: + is-extendable: 0.1.1 + extend@3.0.2: {} extendable-error@0.1.7: {} @@ -4332,6 +5293,12 @@ snapshots: dependencies: reusify: 1.0.4 + fdir@6.4.2(picomatch@4.0.2): + optionalDependencies: + picomatch: 4.0.2 + + fflate@0.8.2: {} + fill-range@7.1.1: dependencies: to-regex-range: 5.0.1 @@ -4350,10 +5317,17 @@ snapshots: micromatch: 4.0.8 pkg-dir: 4.2.0 + flatted@3.3.2: {} + flattie@1.1.1: {} flesch@2.0.1: {} + foreground-child@3.3.0: + dependencies: + cross-spawn: 7.0.6 + signal-exit: 4.1.0 + fs-extra@7.0.1: dependencies: graceful-fs: 4.2.11 @@ -4377,6 +5351,15 @@ snapshots: dependencies: is-glob: 4.0.3 + glob@10.4.5: + dependencies: + foreground-child: 3.3.0 + jackspeak: 3.4.3 + minimatch: 9.0.5 + minipass: 7.1.2 + package-json-from-dist: 1.0.1 + path-scurry: 1.11.1 + globby@11.1.0: dependencies: array-union: 2.1.0 @@ -4388,6 +5371,13 @@ snapshots: graceful-fs@4.2.11: {} + gray-matter@4.0.3: + dependencies: + js-yaml: 3.14.1 + kind-of: 6.0.3 + section-matter: 1.0.0 + strip-bom-string: 1.0.0 + gunning-fog@2.0.1: {} h3@1.13.0: @@ -4403,6 +5393,8 @@ snapshots: uncrypto: 0.1.3 unenv: 1.10.0 + has-flag@4.0.0: {} + hast-util-embedded@3.0.0: dependencies: '@types/hast': 3.0.4 @@ -4515,7 +5507,7 @@ snapshots: estree-util-is-identifier-name: 3.0.0 hast-util-whitespace: 3.0.0 mdast-util-mdx-expression: 2.0.1 - mdast-util-mdx-jsx: 3.1.3 + mdast-util-mdx-jsx: 3.2.0 mdast-util-mdxjs-esm: 2.0.1 property-information: 6.5.0 space-separated-tokens: 2.0.2 @@ -4549,7 +5541,7 @@ snapshots: estree-util-is-identifier-name: 3.0.0 hast-util-whitespace: 3.0.0 mdast-util-mdx-expression: 2.0.1 - mdast-util-mdx-jsx: 3.1.3 + mdast-util-mdx-jsx: 3.2.0 mdast-util-mdxjs-esm: 2.0.1 property-information: 6.5.0 space-separated-tokens: 2.0.2 @@ -4584,8 +5576,6 @@ snapshots: dependencies: '@types/hast': 3.0.4 - hast@1.0.0: {} - hastscript@9.0.0: dependencies: '@types/hast': 3.0.4 @@ -4596,6 +5586,8 @@ snapshots: hedges@2.0.1: {} + html-escaper@2.0.2: {} + html-escaper@3.0.3: {} html-void-elements@3.0.0: {} @@ -4641,6 +5633,8 @@ snapshots: is-docker@3.0.0: {} + is-extendable@0.1.1: {} + is-extglob@2.1.1: {} is-fullwidth-code-point@3.0.0: {} @@ -4671,6 +5665,33 @@ snapshots: isexe@2.0.0: {} + istanbul-lib-coverage@3.2.2: {} + + istanbul-lib-report@3.0.1: + dependencies: + istanbul-lib-coverage: 3.2.2 + make-dir: 4.0.0 + supports-color: 7.2.0 + + istanbul-lib-source-maps@5.0.6: + dependencies: + '@jridgewell/trace-mapping': 0.3.25 + debug: 4.4.0 + istanbul-lib-coverage: 3.2.2 + transitivePeerDependencies: + - supports-color + + istanbul-reports@3.1.7: + dependencies: + html-escaper: 2.0.2 + istanbul-lib-report: 3.0.1 + + jackspeak@3.4.3: + dependencies: + '@isaacs/cliui': 8.0.2 + optionalDependencies: + '@pkgjs/parseargs': 0.11.0 + js-yaml@3.14.1: dependencies: argparse: 1.0.10 @@ -4684,6 +5705,8 @@ snapshots: optionalDependencies: graceful-fs: 4.2.11 + kind-of@6.0.3: {} + kleur@3.0.3: {} kleur@4.1.5: {} @@ -4699,10 +5722,10 @@ snapshots: dependencies: p-locate: 4.1.0 - lodash.difference@4.5.0: {} - lodash.startcase@4.4.0: {} + lodash@4.17.21: {} + longest-streak@3.1.0: {} loupe@3.1.2: {} @@ -4719,6 +5742,10 @@ snapshots: '@babel/types': 7.26.3 source-map-js: 1.2.1 + make-dir@4.0.0: + dependencies: + semver: 7.6.3 + markdown-extensions@2.0.0: {} markdown-table@3.0.4: {} @@ -4836,7 +5863,7 @@ snapshots: transitivePeerDependencies: - supports-color - mdast-util-mdx-jsx@3.1.3: + mdast-util-mdx-jsx@3.2.0: dependencies: '@types/estree-jsx': 1.0.5 '@types/hast': 3.0.4 @@ -4857,7 +5884,7 @@ snapshots: dependencies: mdast-util-from-markdown: 2.0.2 mdast-util-mdx-expression: 2.0.1 - mdast-util-mdx-jsx: 3.1.3 + mdast-util-mdx-jsx: 3.2.0 mdast-util-mdxjs-esm: 2.0.1 mdast-util-to-markdown: 2.1.2 transitivePeerDependencies: @@ -4903,16 +5930,6 @@ snapshots: unist-util-visit: 5.0.0 zwitch: 2.0.4 - mdast-util-to-nlcst@7.0.1: - dependencies: - '@types/mdast': 4.0.4 - '@types/nlcst': 2.0.3 - '@types/unist': 3.0.3 - nlcst-to-string: 4.0.0 - unist-util-position: 5.0.0 - vfile: 6.0.3 - vfile-location: 5.0.3 - mdast-util-to-string@4.0.0: dependencies: '@types/mdast': 4.0.4 @@ -5204,6 +6221,12 @@ snapshots: mime@3.0.0: {} + minimatch@9.0.5: + dependencies: + brace-expansion: 2.0.1 + + minipass@7.1.2: {} + mri@1.2.0: {} mrmime@2.0.0: {} @@ -5317,6 +6340,12 @@ snapshots: regex: 5.1.1 regex-recursion: 5.1.1 + oniguruma-to-es@1.0.0: + dependencies: + emoji-regex-xs: 1.0.0 + regex: 5.1.1 + regex-recursion: 5.1.1 + os-tmpdir@1.0.2: {} outdent@0.5.0: {} @@ -5348,6 +6377,8 @@ snapshots: p-try@2.2.0: {} + package-json-from-dist@1.0.1: {} + package-manager-detector@0.2.8: {} pagefind@1.3.0: @@ -5385,6 +6416,11 @@ snapshots: path-key@3.1.1: {} + path-scurry@1.11.1: + dependencies: + lru-cache: 10.4.3 + minipass: 7.1.2 + path-type@4.0.0: {} pathe@1.1.2: {} @@ -5405,9 +6441,9 @@ snapshots: pluralize@8.0.0: {} - postcss-nested@6.2.0(postcss@8.4.49): + postcss-nested@6.2.0(postcss@8.5.0): dependencies: - postcss: 8.4.49 + postcss: 8.5.0 postcss-selector-parser: 6.1.2 postcss-selector-parser@6.1.2: @@ -5421,6 +6457,12 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 + postcss@8.5.0: + dependencies: + nanoid: 3.3.8 + picocolors: 1.1.1 + source-map-js: 1.2.1 + preferred-pm@4.0.0: dependencies: find-up-simple: 1.0.0 @@ -5586,15 +6628,6 @@ snapshots: unified: 11.0.5 vfile: 6.0.3 - remark-retext@6.0.0: - dependencies: - '@types/mdast': 4.0.4 - '@types/nlcst': 2.0.3 - mdast-util-to-nlcst: 7.0.1 - parse-latin: 7.0.0 - unified: 11.0.5 - vfile: 6.0.3 - remark-smartypants@3.0.2: dependencies: retext: 9.0.0 @@ -5610,20 +6643,6 @@ snapshots: resolve-from@5.0.0: {} - retext-assuming@1.0.0: - dependencies: - lodash.difference: 4.5.0 - nlcst-search: 1.5.1 - nlcst-to-string: 2.0.4 - quotation: 1.1.3 - unist-util-find-before: 2.0.5 - - retext-case-police@1.1.7: - dependencies: - case-police: 0.5.14 - nlcst-search: 3.1.1 - nlcst-to-string: 3.1.1 - retext-cliches@1.0.0: dependencies: array-differ: 1.0.0 @@ -5662,14 +6681,6 @@ snapshots: unist-util-visit: 5.0.0 vfile: 6.0.3 - retext-indefinite-article@5.0.0: - dependencies: - '@types/nlcst': 2.0.3 - nlcst-to-string: 4.0.0 - number-to-words: 1.2.4 - unist-util-visit: 5.0.0 - vfile: 6.0.3 - retext-intensify@7.0.0: dependencies: '@types/nlcst': 2.0.3 @@ -5718,7 +6729,7 @@ snapshots: unist-util-position: 5.0.0 vfile: 6.0.3 - retext-quotes@6.0.0: + retext-quotes@6.0.2: dependencies: '@types/nlcst': 2.0.3 nlcst-to-string: 4.0.0 @@ -5795,14 +6806,6 @@ snapshots: nlcst-to-string: 4.0.0 unified: 11.0.5 - retext-usage@0.5.0: - dependencies: - array-differ: 1.0.0 - nlcst-search: 1.5.1 - nlcst-to-string: 1.1.0 - object-keys: 1.1.1 - quotation: 1.1.3 - retext@9.0.0: dependencies: '@types/nlcst': 2.0.3 @@ -5845,6 +6848,11 @@ snapshots: sax@1.4.1: {} + section-matter@1.0.0: + dependencies: + extend-shallow: 2.0.1 + kind-of: 6.0.3 + semver@7.6.3: {} sharp@0.33.5: @@ -5890,6 +6898,17 @@ snapshots: '@shikijs/vscode-textmate': 10.0.1 '@types/hast': 3.0.4 + shiki@1.26.2: + dependencies: + '@shikijs/core': 1.26.2 + '@shikijs/engine-javascript': 1.26.2 + '@shikijs/engine-oniguruma': 1.26.2 + '@shikijs/langs': 1.26.2 + '@shikijs/themes': 1.26.2 + '@shikijs/types': 1.26.2 + '@shikijs/vscode-textmate': 10.0.1 + '@types/hast': 3.0.4 + siginfo@2.0.0: {} signal-exit@4.1.0: {} @@ -5898,6 +6917,12 @@ snapshots: dependencies: is-arrayish: 0.3.2 + sirv@3.0.0: + dependencies: + '@polka/url': 1.0.0-next.28 + mrmime: 2.0.0 + totalist: 3.0.1 + sisteransi@1.0.5: {} sitemap@8.0.0: @@ -5942,10 +6967,10 @@ snapshots: is-fullwidth-code-point: 3.0.0 strip-ansi: 6.0.1 - string-width@6.1.0: + string-width@5.1.2: dependencies: eastasianwidth: 0.2.0 - emoji-regex: 10.4.0 + emoji-regex: 9.2.2 strip-ansi: 7.1.0 string-width@7.2.0: @@ -5967,13 +6992,17 @@ snapshots: dependencies: ansi-regex: 6.1.0 + strip-bom-string@1.0.0: {} + strip-bom@3.0.0: {} style-to-object@1.0.8: dependencies: inline-style-parser: 0.2.4 - supports-color@9.4.0: {} + supports-color@7.2.0: + dependencies: + has-flag: 4.0.0 syllable@5.0.1: dependencies: @@ -5983,12 +7012,23 @@ snapshots: term-size@2.2.1: {} + test-exclude@7.0.1: + dependencies: + '@istanbuljs/schema': 0.1.3 + glob: 10.4.5 + minimatch: 9.0.5 + thesaurus@0.0.0: {} tinybench@2.9.0: {} tinyexec@0.3.2: {} + tinyglobby@0.2.10: + dependencies: + fdir: 6.4.2(picomatch@4.0.2) + picomatch: 4.0.2 + tinypool@1.0.2: {} tinyrainbow@1.2.0: {} @@ -6003,6 +7043,8 @@ snapshots: dependencies: is-number: 7.0.0 + totalist@3.0.1: {} + tr46@0.0.3: {} trim-lines@3.0.1: {} @@ -6151,27 +7193,6 @@ snapshots: '@types/unist': 3.0.3 unist-util-stringify-position: 4.0.0 - vfile-reporter@8.1.1: - dependencies: - '@types/supports-color': 8.1.3 - string-width: 6.1.0 - supports-color: 9.4.0 - unist-util-stringify-position: 4.0.0 - vfile: 6.0.3 - vfile-message: 4.0.2 - vfile-sort: 4.0.0 - vfile-statistics: 3.0.0 - - vfile-sort@4.0.0: - dependencies: - vfile: 6.0.3 - vfile-message: 4.0.2 - - vfile-statistics@3.0.0: - dependencies: - vfile: 6.0.3 - vfile-message: 4.0.2 - vfile@6.0.3: dependencies: '@types/unist': 3.0.3 @@ -6206,7 +7227,7 @@ snapshots: vite@6.0.7: dependencies: esbuild: 0.24.2 - postcss: 8.4.49 + postcss: 8.5.0 rollup: 4.29.2 optionalDependencies: fsevents: 2.3.3 @@ -6215,7 +7236,7 @@ snapshots: optionalDependencies: vite: 6.0.7 - vitest@2.1.8: + vitest@2.1.8(@vitest/ui@2.1.8): dependencies: '@vitest/expect': 2.1.8 '@vitest/mocker': 2.1.8(vite@5.4.11) @@ -6237,6 +7258,8 @@ snapshots: vite: 5.4.11 vite-node: 2.1.8 why-is-node-running: 2.3.0 + optionalDependencies: + '@vitest/ui': 2.1.8(vitest@2.1.8) transitivePeerDependencies: - less - lightningcss @@ -6278,6 +7301,18 @@ snapshots: dependencies: string-width: 7.2.0 + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + wrap-ansi@8.1.0: + dependencies: + ansi-styles: 6.2.1 + string-width: 5.1.2 + strip-ansi: 7.1.0 + wrap-ansi@9.0.0: dependencies: ansi-styles: 6.2.1