From b6e1bf4e5c07ff78bb572bf864edd3023d6e4249 Mon Sep 17 00:00:00 2001 From: Eka Setiawan Saputra Date: Wed, 23 Mar 2022 00:51:19 +0700 Subject: [PATCH] fix: hosted dependency version regex (#262) --- packages/melos/lib/src/package.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/melos/lib/src/package.dart b/packages/melos/lib/src/package.dart index d6ec0818a..a8581bbd1 100644 --- a/packages/melos/lib/src/package.dart +++ b/packages/melos/lib/src/package.dart @@ -105,10 +105,10 @@ RegExp dependencyVersionReplaceRegex(String dependencyName) { ); } -// https://regex101.com/r/ob8xRv/1 +// https://regex101.com/r/HIeQaI/1 RegExp hostedDependencyVersionReplaceRegex(String dependencyName) { return RegExp( - '''(^[ \t]*?(?$dependencyName)[ \\t]*?:[ \\t]*?[\\s\\S]*?[ \\t]*?version:[ \\t]*?)(?any|["'^<>=]*\\d\\.\\d\\.\\d['"._ \\t<>=\\d-\\w+]*|\$)\$''', + '''(^[ \t]*?(?$dependencyName)[ \\t]*?:[ \\t]*?[\\s\\S]*?[ \\t]*?version:[ \\t]*?)(?any|\\^.*|["'^<>=]*\\d\\.\\d\\.\\d['"._ \\t<>=\\d-\\w+]*|\$)\$''', multiLine: true, ); }