fix(build): migrate build tooling to tsbuild v4 and tsbundle config while updating sitemap integration
This commit is contained in:
@@ -1,59 +1,42 @@
|
||||
# Project Hints - @api.global/typedserver
|
||||
|
||||
## Recent Changes (December 2025)
|
||||
## Recent Changes (March 2026)
|
||||
|
||||
### Dependency Updates
|
||||
- `@push.rocks/smartwatch` upgraded to v6.0.0 (cross-runtime, native fs.watch)
|
||||
- `@design.estate/dees-catalog` upgraded to v3.1.1 (new icons, components)
|
||||
- `@push.rocks/smartchok` replaced with `@push.rocks/smartwatch` (renamed package)
|
||||
- `@push.rocks/smartfile` upgraded from v11 to v13 (major API change - `fs` module removed)
|
||||
- `@push.rocks/smartfs` added for filesystem operations (v1.2.0+)
|
||||
- `@push.rocks/smartenv` upgraded to v6.0.0
|
||||
- `@push.rocks/smartrequest` upgraded to v5.0.1
|
||||
- `@push.rocks/webrequest` upgraded to v4.0.1 (`WebRequest` renamed to `WebrequestClient`)
|
||||
- Express upgraded to v5.2.1
|
||||
- All `@git.zone/*` dev dependencies updated to latest
|
||||
- `@git.zone/tsbuild` upgraded to v4.3.0 (major: auto path rewriting, folder clearing)
|
||||
- `@git.zone/tsbundle` upgraded to v2.9.1 (uses npmextra.json config)
|
||||
- `@git.zone/tstest` upgraded to v3.5.0
|
||||
- `@push.rocks/smartsitemap` upgraded to v4.0.1 (major: builder pattern API)
|
||||
- `@push.rocks/taskbuffer` upgraded to v8.0.0 (backward compatible for existing usage)
|
||||
- `@push.rocks/smartjson` upgraded to v6.0.0 (backward compatible)
|
||||
- `@tsclass/tsclass` upgraded to v9.5.0
|
||||
- `@types/node` upgraded to v25.5.0
|
||||
- All other dependencies updated to latest patch/minor versions
|
||||
|
||||
### Code Migration Notes
|
||||
|
||||
#### smartwatch v6.0.0
|
||||
- Cross-runtime support: Node.js 20+, Deno, Bun
|
||||
- Uses native `fs.watch({ recursive: true })` for performance
|
||||
- Minimal dependencies (no chokidar, no FSEvents bindings)
|
||||
- API unchanged: `new Smartwatch([patterns])`, `.start()`, `.stop()`, `.getObservableFor(event)`
|
||||
- Events: `add`, `addDir`, `change`, `unlink`, `unlinkDir`, `error`, `ready`
|
||||
- Dynamic watching: `.add(patterns)`, `.remove(pattern)`
|
||||
- Status property: `'idle' | 'starting' | 'watching'`
|
||||
#### tsbuild v4 Migration
|
||||
- **Cross-folder imports**: Use `../ts_interfaces/index.js` instead of `../dist_ts_interfaces/index.js`
|
||||
- tsbuild v4 automatically rewrites import paths from `ts_*` to `dist_ts_*` in output
|
||||
- CLI flags `--web` and `--allowimplicitany` removed (defaults already handle these)
|
||||
- Build script simplified to `tsbuild tsfolders && tsbundle`
|
||||
|
||||
#### dees-catalog v3.0.0+ Migration
|
||||
- **DeesIcon**: New unified `icon` property with library prefixes:
|
||||
- FontAwesome: `icon="fa:check"` (prefix `fa:`)
|
||||
- Lucide: `icon="lucide:menu"` (prefix `lucide:`)
|
||||
- Legacy `iconFA` property deprecated but still supported
|
||||
- **DeesToast**: New convenience methods and positioning:
|
||||
- `DeesToast.info()`, `.success()`, `.warning()`, `.error()`
|
||||
- Position options: `top-right`, `top-left`, `bottom-right`, `bottom-left`, `top-center`, `bottom-center`
|
||||
- New components: DeesInputTags, DeesInputDatepicker, DeesStatsGrid, DeesPagination, DeesAppuiBase
|
||||
- DeesAppuiAppbar: Hierarchical menus with keyboard navigation
|
||||
#### tsbundle npmextra.json Config
|
||||
- Bundle configuration moved from CLI args to `npmextra.json` under `"@git.zone/tsbundle"` key
|
||||
- Three bundles configured: web_inject, web_serviceworker, swdash
|
||||
|
||||
#### smartfile v13 Migration
|
||||
- Old: `plugins.smartfile.fs.toStringSync(path)` / `plugins.smartfile.fs.toBufferSync(path)`
|
||||
- New: Use `plugins.fsInstance` (SmartFs instance with Node provider)
|
||||
- String: `await plugins.fsInstance.file(path).encoding('utf8').read() as string`
|
||||
- Buffer: `await plugins.fsInstance.file(path).read() as Buffer`
|
||||
|
||||
#### smartfs treeHash
|
||||
- Old: `plugins.smartfile.fs.fileTreeToHash(dir, pattern)`
|
||||
- New: `await plugins.fsInstance.directory(dir).recursive().treeHash()`
|
||||
|
||||
#### webrequest v4
|
||||
- Class renamed: `WebRequest` → `WebrequestClient`
|
||||
#### smartsitemap v4 Migration
|
||||
- Complete API rewrite using builder pattern
|
||||
- Old: `new SmartSitemap().createSitemapFromUrlInfoArray(urls)`
|
||||
- New: `SmartSitemap.create().addUrls(urls).toXml()`
|
||||
- Old: `new SmartSitemap().createSitemapNewsFromArticleArray(articles)`
|
||||
- New: `SmartSitemap.fromArticles(articles, { publicationName: '...' }).toXml()`
|
||||
- `IUrlInfo` renamed to `ISitemapUrl` with different properties:
|
||||
- `url` → `loc`
|
||||
- `timestamp` → `lastmod` (accepts Date | string | number)
|
||||
- `frequency` → `changefreq`
|
||||
|
||||
### Architecture
|
||||
- `plugins.fsInstance` is a pre-configured SmartFs instance with SmartFsProviderNode
|
||||
- All file operations should be async using smartfs
|
||||
- Sync file operations have been removed
|
||||
|
||||
### Express 5 Notes
|
||||
- Wildcard routes use `/{*splat}` notation
|
||||
- `req.params.splat` can be an array, use `Array.isArray()` check
|
||||
- Cross-folder imports reference source `ts_*` folders, tsbuild handles path rewriting
|
||||
|
||||
Reference in New Issue
Block a user