fix(build): modernize package configuration and remove smartfile dependency from filesystem operations

This commit is contained in:
2026-05-01 16:40:11 +00:00
parent 27fd2efb51
commit 61218599c8
12 changed files with 4044 additions and 5807 deletions
+37
View File
@@ -0,0 +1,37 @@
{
"@git.zone/cli": {
"projectType": "npm",
"module": {
"githost": "code.foss.global",
"gitscope": "push.rocks",
"gitrepo": "smartssr",
"shortDescription": "server-side shadow DOM renderer",
"description": "A smart server-side renderer that supports shadow DOM.",
"npmPackagename": "@push.rocks/smartssr",
"license": "MIT",
"keywords": [
"server-side rendering",
"shadow DOM",
"TypeScript",
"puppeteer",
"serialization",
"web development",
"node.js"
]
},
"release": {
"registries": [
"https://verdaccio.lossless.digital",
"https://registry.npmjs.org"
],
"accessLevel": "public"
}
},
"@ship.zone/szci": {
"npmGlobalTools": [],
"npmRegistryUrl": "registry.npmjs.org"
},
"@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"
}
}
+8
View File
@@ -1,5 +1,13 @@
# Changelog
## 2026-05-01 - 1.0.41 - fix(build)
modernize package configuration and remove smartfile dependency from filesystem operations
- adds package exports and includes .smartconfig.json and license in published files
- updates build and test tooling to current @git.zone versions and migrates tests to @git.zone/tstest
- replaces smartfile usage with native fs APIs for debug output and .nogit directory creation
- enables stricter TypeScript settings with noImplicitAny and explicit node types
## 2025-01-01 - 1.0.40 - fix(test)
Fix test configuration and import path in test suite
+1 -1
View File
@@ -1,4 +1,4 @@
Copyright (c) 2020 Task Venture Capital GmbH (hello@lossless.com)
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
+12 -4
View File
@@ -1,10 +1,11 @@
{
"gitzone": {
"@git.zone/cli": {
"projectType": "npm",
"module": {
"githost": "code.foss.global",
"gitscope": "push.rocks",
"gitrepo": "smartssr",
"shortDescription": "server-side shadow DOM renderer",
"description": "A smart server-side renderer that supports shadow DOM.",
"npmPackagename": "@push.rocks/smartssr",
"license": "MIT",
@@ -18,13 +19,20 @@
"web development",
"node.js"
]
},
"release": {
"registries": [
"https://verdaccio.lossless.digital",
"https://registry.npmjs.org"
],
"accessLevel": "public"
}
},
"npmci": {
"@ship.zone/szci": {
"npmGlobalTools": [],
"npmAccessLevel": "public"
"npmRegistryUrl": "registry.npmjs.org"
},
"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"
}
}
+16 -13
View File
@@ -3,30 +3,31 @@
"version": "1.0.40",
"private": false,
"description": "A smart server-side renderer that supports shadow DOM.",
"exports": {
".": "./dist_ts/index.js"
},
"main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts",
"author": "Lossless GmbH",
"author": "Task Venture Capital GmbH <hello@task.vc>",
"license": "MIT",
"scripts": {
"test": "(npm run build &&tstest test/ --web)",
"build": "(tsbuild --web --allowimplicitany)",
"test": "tstest test/",
"build": "tsbuild --web",
"serve": "tsrun scripts/serve.ts",
"buildDocs": "tsdoc"
},
"devDependencies": {
"@git.zone/tsbuild": "^2.1.66",
"@git.zone/tsrun": "^1.2.44",
"@git.zone/tstest": "^1.0.77",
"@push.rocks/tapbundle": "^5.0.8",
"@types/node": "^22.10.3"
"@git.zone/tsbuild": "^4.4.0",
"@git.zone/tsrun": "^2.0.3",
"@git.zone/tstest": "^3.6.3",
"@types/node": "^25.6.0"
},
"dependencies": {
"@push.rocks/smartdelay": "^3.0.1",
"@push.rocks/smartfile": "^11.0.23",
"@push.rocks/smartpath": "^5.0.5",
"@push.rocks/smartpromise": "^4.0.2",
"@push.rocks/smartpuppeteer": "^2.0.2",
"@push.rocks/smarttime": "^4.0.1"
"@push.rocks/smartpath": "^6.0.0",
"@push.rocks/smartpromise": "^4.2.4",
"@push.rocks/smartpuppeteer": "^2.0.6",
"@push.rocks/smarttime": "^4.2.3"
},
"files": [
"ts/**/*",
@@ -37,6 +38,8 @@
"dist_ts_web/**/*",
"assets/**/*",
"cli.js",
".smartconfig.json",
"license",
"npmextra.json",
"readme.md"
],
+3951 -5771
View File
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -1,5 +1,5 @@
import { expect, tap } from '@push.rocks/tapbundle';
import * as smartssr from '../dist_ts/index.js';
import { tap } from '@git.zone/tstest/tapbundle';
import * as smartssr from '../ts/index.js';
let testSSRInstance: smartssr.SmartSSR;
@@ -9,7 +9,7 @@ tap.test('should create a valid smartssr instance', async () => {
});
});
tap.test('should render central.eu', async (tools) => {
tap.test('should render central.eu', async () => {
const renderedPage = await testSSRInstance.renderPage('https://lossless.com');
console.log(renderedPage);
});
@@ -23,4 +23,4 @@ tap.test('should render https://lossless.gmbh', async () => {
console.log(renderedPage);
});
tap.start();
export default tap.start();
+1 -1
View File
@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@push.rocks/smartssr',
version: '1.0.40',
version: '1.0.41',
description: 'A smart server-side renderer that supports shadow DOM.'
}
+5 -6
View File
@@ -29,7 +29,7 @@ export class SmartSSR {
const browser = new plugins.smartpuppeteer.IncognitoBrowser();
const renderTimeMeasurement = new plugins.smarttime.HrtMeasurement();
let renderedPageString: string;
let screenshotBuffer: Buffer;
let screenshotBuffer: Buffer | undefined;
await browser.start();
try {
const context = await browser.getNewIncognitoContext();
@@ -84,12 +84,11 @@ export class SmartSSR {
// debug
if (this.options.debug) {
plugins.smartfile.memory.toFsSync(
renderedPageString,
plugins.path.join(paths.noGitDir, 'test.html')
);
const fs = await import('fs');
fs.writeFileSync(plugins.path.join(paths.noGitDir, 'test.png'), screenshotBuffer);
fs.writeFileSync(plugins.path.join(paths.noGitDir, 'test.html'), renderedPageString);
if (screenshotBuffer) {
fs.writeFileSync(plugins.path.join(paths.noGitDir, 'test.png'), screenshotBuffer);
}
}
return resultDeferred.promise;
+1 -1
View File
@@ -5,4 +5,4 @@ export const packageDir = plugins.path.join(
'../'
);
export const noGitDir = plugins.path.join(packageDir, './.nogit');
plugins.smartfile.fs.ensureDirSync(noGitDir);
plugins.fs.mkdirSync(noGitDir, { recursive: true });
+3 -3
View File
@@ -1,14 +1,14 @@
// node native
import * as fs from 'fs';
import * as path from 'path';
export { path };
export { fs, path };
// @pushrocks scope
import * as smartdelay from '@push.rocks/smartdelay';
import * as smartfile from '@push.rocks/smartfile';
import * as smartpuppeteer from '@push.rocks/smartpuppeteer';
import * as smartpath from '@push.rocks/smartpath';
import * as smartpromise from '@push.rocks/smartpromise';
import * as smarttime from '@push.rocks/smarttime';
export { smartdelay, smartfile, smartpath, smartpuppeteer, smartpromise, smarttime };
export { smartdelay, smartpath, smartpuppeteer, smartpromise, smarttime };
+3 -1
View File
@@ -5,8 +5,10 @@
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"noImplicitAny": true,
"esModuleInterop": true,
"verbatimModuleSyntax": true
"verbatimModuleSyntax": true,
"types": ["node"]
},
"exclude": [
"dist_*/**/*.d.ts"