From 1fcf05dc0976b895c0b38ae54eeb7f27696ac8e1 Mon Sep 17 00:00:00 2001 From: Dan Schulte Date: Fri, 12 Oct 2018 15:54:47 -0700 Subject: [PATCH] Update regular expressions to be non-greedy --- .scripts/dependencies.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.scripts/dependencies.ts b/.scripts/dependencies.ts index dd03053..18e9754 100644 --- a/.scripts/dependencies.ts +++ b/.scripts/dependencies.ts @@ -202,7 +202,7 @@ function updateGeneratedPackageDependencyVersion(codeFilePath: string, dependenc codeFilePath, codeFileContents, dependencyName, - new RegExp(`\\\\"${dependencyName}\\\\": \\\\"(.*)\\\\"`), + new RegExp(`\\\\"${dependencyName}\\\\": \\\\"(.*?)\\\\"`), `\\"${dependencyName}\\": \\"${newDependencyVersion}\\"`, newDependencyVersion); @@ -210,7 +210,7 @@ function updateGeneratedPackageDependencyVersion(codeFilePath: string, dependenc codeFilePath, codeFileContents, dependencyName, - new RegExp(`"${dependencyName}": "(.*)"`), + new RegExp(`"${dependencyName}": "(.*?)"`), `"${dependencyName}": "${newDependencyVersion}"`, newDependencyVersion);