build(deps): Node 26.13.0 + Astro 7.4.4 升级(含 exif loader 句柄修复)
- 宿主 Node 22.22.3 → 用户级安装 26.13.0(~/.local/node),systemd
unit PATH 前置,CI 构建链同步吃到新版本
- Astro 7.3.8 → 7.4.4(7.4 要求 Node ≥22.23.4,此前升级因 Node 版本
不足被 CI 拒绝;本次先升 Node 再升框架)
- exif loader 修复:Node 22.23+/26 把"GC 时仍打开的 FileHandle"从警告
升级为错误,exifr 接收文件路径时自开 fd 不显式关闭 → 全线 content/
photos/*.jpg 触发构建失败。改为一律 readFile 成 Buffer 再喂 exifr
(无 fd 参与)
验证: 全量构建 44 页 exit 0(node v26.13.0 + astro 7.4.4);E2E 37/37;
content-lint 0/0/0;后处理链(字体子集/首页内联)复跑通过;
unit PATH 实测已前置 node26
Spec: none (运行时与框架升级,全链验收)
Co-authored-by: GLM-5.3
This commit is contained in:
1 parent
7c1462bde0
commit
227bc24797
3 files changed
+56
-66
No files matched your search
+7
-1
@@ -67,7 +67,13 @@ export function mapExifTags(raw: ExifRaw): PhotoExif {
|
||||
*/
|
||||
export async function extractPhotoExif(input: string | URL | Uint8Array): Promise<PhotoExif> {
|
||||
try {
|
||||
const source = input instanceof URL ? fileURLToPath(input) : input;
|
||||
// Node 22.23+/26 把"GC 时仍打开的 FileHandle"升级为错误:exifr 收到文件
|
||||
// 路径会自行开 fd 且不显式关闭,故这里统一读成 Buffer 再喂(2026-11-02
|
||||
// Node 26 升级实测炸点,content/photos/*.jpg 全量触发)
|
||||
const source =
|
||||
input instanceof Uint8Array
|
||||
? input
|
||||
: await readFile(input instanceof URL ? fileURLToPath(input) : input);
|
||||
return mapExifTags(await exifr.parse(source, { tiff: true, exif: true }));
|
||||
} catch {
|
||||
return {};
|
||||
|
||||
Reference in new issue
Block a user