2 Commits

10 changed files with 3993 additions and 5687 deletions
+43
View File
@@ -0,0 +1,43 @@
{
"@git.zone/cli": {
"projectType": "npm",
"module": {
"githost": "code.foss.global",
"gitscope": "push.rocks",
"gitrepo": "smartfm",
"shortDescription": "frontmatter parser utilities",
"description": "A Node.js module for handling and processing frontmatter in markdown and text files, leveraging the gray-matter library for parsing and stringifying YAML or JSON formatted frontmatter.",
"npmPackagename": "@push.rocks/smartfm",
"license": "MIT",
"keywords": [
"frontmatter",
"markdown",
"text files",
"YAML",
"JSON",
"stringify",
"parse",
"commented sections",
"static site generator",
"CMS",
"content metadata",
"metadata management",
"gray-matter"
]
},
"release": {
"registries": [
"https://verdaccio.lossless.digital",
"https://registry.npmjs.org"
],
"accessLevel": "public"
}
},
"@git.zone/tsdoc": {
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
},
"@ship.zone/szci": {
"npmGlobalTools": [],
"npmRegistryUrl": "registry.npmjs.org"
}
}
+9
View File
@@ -1,5 +1,14 @@
# Changelog
## 2026-05-01 - 2.2.3 - fix(build)
modernize project configuration and test setup for current toolchain compatibility
- migrate npmextra metadata to scoped tool configuration and add .smartconfig.json
- update build, test, and formatting scripts alongside TypeScript compiler settings
- refresh development dependencies and gray-matter patch version
- rename the test entrypoint to test.node.ts and align imports with the new tstest tapbundle path
- add explicit return and parameter types to Smartfm methods to satisfy stricter TypeScript settings
## 2025-01-24 - 2.2.2 - fix(package)
Fix export path in package.json
+19
View File
@@ -0,0 +1,19 @@
Copyright (c) 2026 Task Venture Capital GmbH <hello@task.vc>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+15 -7
View File
@@ -1,14 +1,11 @@
{
"npmci": {
"npmGlobalTools": [],
"npmAccessLevel": "public"
},
"gitzone": {
"@git.zone/cli": {
"projectType": "npm",
"module": {
"githost": "code.foss.global",
"gitscope": "push.rocks",
"gitrepo": "smartfm",
"shortDescription": "frontmatter parser utilities",
"description": "A Node.js module for handling and processing frontmatter in markdown and text files, leveraging the gray-matter library for parsing and stringifying YAML or JSON formatted frontmatter.",
"npmPackagename": "@push.rocks/smartfm",
"license": "MIT",
@@ -27,9 +24,20 @@
"metadata management",
"gray-matter"
]
},
"release": {
"registries": [
"https://verdaccio.lossless.digital",
"https://registry.npmjs.org"
],
"accessLevel": "public"
}
},
"tsdoc": {
"@git.zone/tsdoc": {
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
},
"@ship.zone/szci": {
"npmGlobalTools": [],
"npmRegistryUrl": "registry.npmjs.org"
}
}
}
+12 -10
View File
@@ -1,6 +1,6 @@
{
"name": "@push.rocks/smartfm",
"version": "2.2.2",
"version": "2.2.3",
"private": false,
"description": "A Node.js module for handling and processing frontmatter in markdown and text files, leveraging the gray-matter library for parsing and stringifying YAML or JSON formatted frontmatter.",
"exports": {
@@ -8,8 +8,9 @@
},
"type": "module",
"scripts": {
"test": "(tstest test/)",
"build": "tsbuild tsfolders --allowimplicitany",
"test": "tstest test/",
"format": "gitzone format",
"build": "tsbuild tsfolders",
"buildDocs": "tsdoc"
},
"repository": {
@@ -31,21 +32,20 @@
"metadata management",
"gray-matter"
],
"author": "Lossless GmbH",
"author": "Task Venture Capital GmbH <hello@task.vc>",
"license": "MIT",
"bugs": {
"url": "https://code.foss.global/push.rocks/smartfm/issues"
},
"homepage": "https://code.foss.global/push.rocks/smartfm#readme",
"dependencies": {
"gray-matter": "^4.0.2"
"gray-matter": "^4.0.3"
},
"devDependencies": {
"@git.zone/tsbuild": "^2.1.17",
"@git.zone/tsrun": "^1.2.8",
"@git.zone/tstest": "^1.0.24",
"@push.rocks/tapbundle": "^5.5.6",
"@types/node": "^12.7.4"
"@git.zone/tsbuild": "^4.4.0",
"@git.zone/tsrun": "^2.0.3",
"@git.zone/tstest": "^3.6.3",
"@types/node": "^25.6.0"
},
"files": [
"ts/**/*",
@@ -56,6 +56,8 @@
"dist_ts_web/**/*",
"assets/**/*",
"cli.js",
".smartconfig.json",
"license",
"npmextra.json",
"readme.md"
]
+3884 -5657
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -1,4 +1,4 @@
import { tap, expect } from '@push.rocks/tapbundle';
import { tap, expect } from '@git.zone/tstest/tapbundle';
import * as smartfm from '../ts/index.js';
@@ -42,4 +42,4 @@ really
console.log(result);
});
tap.start();
export default tap.start();
+1 -1
View File
@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/smartfm',
version: '2.2.2',
version: '2.2.3',
description: 'A Node.js module for handling and processing frontmatter in markdown and text files, leveraging the gray-matter library for parsing and stringifying YAML or JSON formatted frontmatter.'
}
+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);
+4 -6
View File
@@ -6,12 +6,10 @@
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"noImplicitAny": true,
"esModuleInterop": true,
"verbatimModuleSyntax": true,
"baseUrl": ".",
"paths": {}
"types": ["node"]
},
"exclude": [
"dist_*/**/*.d.ts"
]
}
"exclude": ["dist_*/**/*.d.ts"]
}