From 0433b7a5e3e4f6d4928dcf315b027410bbf172f8 Mon Sep 17 00:00:00 2001 From: Nicholas Berlette Date: Sat, 6 Aug 2022 19:42:18 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix=20unterminated=20group=20in?= =?UTF-8?q?=20regex?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- version.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/version.ts b/version.ts index dcd37cc..1d753b0 100644 --- a/version.ts +++ b/version.ts @@ -10,12 +10,11 @@ export async function prepublish(version: string) { const filename of [ "README.md", "mod.ts", + "types.d.ts", ] ) { await bump(filename, version); } - - return false; } /** `postpublish` will be invoked after publish */ @@ -29,7 +28,7 @@ export function postpublish(version: string) { async function bump(filename: string, version: string) { try { const module_regex = new RegExp( - `(?<=[/"'\s](${MODULE})[@]([{]{1,2}VERSION[}]{1,2}|\$VERSION|[^/"'\s]+)(?=[/"'\s])`, + `(?<=[/"'\s])(${MODULE})[@]([{]{1,2}VERSION[}]{1,2}|\$VERSION|[^/"'\s]+)(?=[/"'\s])`, "ig", ); const content = await Deno.readTextFile(filename);