From a4e33984b7ad14f3fc147f5607ae045e8081bc0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=A5=E6=B5=A9?= Date: Wed, 16 Oct 2024 10:03:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 3 ++- test-regex/run.mjs | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 7cb0735..fc923b8 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,8 @@ "validator": "renovate-config-validator ./default.json5", "validator:strict": "renovate-config-validator ./default.json5 --strict", "validator:npx": "npx --yes --package renovate -- renovate-config-validator --strict", - "dry-run:npx": "LOG_LEVEL=debug npx renovate --token= --platform=local --dry-run=full" + "dry-run:npx": "LOG_LEVEL=debug npx renovate --token= --platform=local --dry-run=full", + "test-regex":"bun --bun test-regex/run.mjs" }, "devDependencies": { "renovate": "^38.124.0", diff --git a/test-regex/run.mjs b/test-regex/run.mjs index 75d0f6e..d0a6505 100644 --- a/test-regex/run.mjs +++ b/test-regex/run.mjs @@ -18,3 +18,11 @@ const filecontent = fs.readFileSync(path.join(__dirname, "file.txt"), "utf8"); const regex = "# renovate: datasource=(?\\S+) depName=(?\\S+):(?\\S+)@(?\\S+)"; extractMatchResult(regex, filecontent); })(); + +(() => { + const regex = "^\\.github/workflows/[^/]+\\.ya?ml$"; + extractMatchResult(regex, ".github/workflows/中 | 文 : 文件名.yaml"); +})(); + + +// TODO: run.mjs regex file \ No newline at end of file