fix(build): migrate filesystem access to smartfs and tighten TypeScript compatibility

This commit is contained in:
2026-04-30 10:20:07 +00:00
parent a71a53092b
commit 8c6e8d9c96
14 changed files with 7298 additions and 3761 deletions
+5 -5
View File
@@ -1,10 +1,10 @@
import { expect, tap } from '@pushrocks/tapbundle';
import { expect, tap } from '@git.zone/tstest/tapbundle';
import * as smarthbs from '../ts/index.js';
import * as smartpath from '@pushrocks/smartpath';
import * as path from 'path';
import { fileURLToPath } from 'url';
const dirname = smartpath.get.dirnameFromImportMetaUrl(import.meta.url);
const dirname = path.dirname(fileURLToPath(import.meta.url));
let hbs_testfilesDir = path.join(dirname, 'hbs_testfiles');
let testPartialDir = path.join(hbs_testfilesDir, 'partials');
@@ -15,7 +15,7 @@ tap.test('smarthbs -> should create partials', async () => {
});
tap.test('smarthbs -> should compile a directory', async () => {
smarthbs.compileDirectory(hbs_testfilesDir, testResultDir, 'data.json');
await smarthbs.compileDirectory(hbs_testfilesDir, testResultDir, 'data.json');
});
tap.test('', async () => {
@@ -43,4 +43,4 @@ tap.test('', async () => {
expect(missingVars).not.toContain('fourthVar.otherKey.nextKey');
});
tap.start();
export default tap.start();