fix: regex es6 issue

This commit is contained in:
2026-05-03 00:16:35 +02:00
parent 31441131c4
commit dd41581360
+2 -2
View File
@@ -2,11 +2,11 @@ import fs from "fs";
import archiver from "archiver";
import path from "path";
const toSafeName = (name: string) => {
export const toSafeName = (name: string) => {
return name
.toLowerCase()
.replace(/[<>:"/\\|?*]/g, "_")
.replace(/[\p{Cc}]/gu, "_")
.replace(/[\x00-\x1F\x7F]/g, "_")
.replace(/[\s-]+/g, "_")
.replace(/_+/g, "_")
.replace(/[. ]+$/g, "");