fix(build): modernize project configuration and test setup for current toolchain compatibility

This commit is contained in:
2026-05-01 16:32:34 +00:00
parent 8e692b994e
commit eec36e2e45
10 changed files with 3992 additions and 5686 deletions
+4 -4
View File
@@ -19,22 +19,22 @@ export class Smartfm {
/**
* add frontmatter to a string
*/
stringify(bodyString: string, frontmatterData: any) {
stringify(bodyString: string, frontmatterData: Record<string, unknown>): string {
return grayMatter.stringify(bodyString, frontmatterData);
}
/**
* parse a string that has frontmatter attached, YAML notation
*/
parse(stringToParse: string) {
parse(stringToParse: string): grayMatter.GrayMatterFile<string> {
return grayMatter(stringToParse);
}
/**
* parse from comments
*/
parseFromComments(commentStart: string, stringToParse: string) {
const diffFunc = (diffMe, diffBy) => diffMe.split(diffBy).join('');
parseFromComments(commentStart: string, stringToParse: string): grayMatter.GrayMatterFile<string> {
const diffFunc = (diffMe: string, diffBy: string): string => diffMe.split(diffBy).join('');
let lines = stringToParse.split('\n');
lines = lines.map((line) => {
return diffFunc(line, commentStart);