From 40753f9b9d9506ce6c524f0f6aa9c6308baf12ca Mon Sep 17 00:00:00 2001 From: Erlend Oftedal Date: Thu, 19 Oct 2023 13:47:54 +0200 Subject: [PATCH] Try to improve moment detectors --- repository/jsrepository.json | 5 ++++- repository/testcases.json | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/repository/jsrepository.json b/repository/jsrepository.json index 4b296643..e45e6646 100644 --- a/repository/jsrepository.json +++ b/repository/jsrepository.json @@ -2949,7 +2949,10 @@ "func": ["moment.version"], "filecontent": [ "//!? moment.js(?:[\n\r]+)//!? version : (§§version§§)", - "\\.version=\"(§§version§§)\".{300,500}\\.isMoment=" + "\\.version=\"(§§version§§)\".{20,60}\"isBefore\".{20,60}\"isAfter\".{200,500}\\.isMoment=", + "\\.version=\"(§§version§§)\".{20,150}duration.{2,100}\\.isMoment=", + "\\.isMoment\\(.{50,400}_isUTC.{50,400}=\"(§§version§§)\"", + "=\"(§§version§§)\".{300,1000}Years:31536e6.{60,80}\\.isMoment" ] } }, diff --git a/repository/testcases.json b/repository/testcases.json index 9ae7f660..44a4f085 100644 --- a/repository/testcases.json +++ b/repository/testcases.json @@ -162,7 +162,7 @@ }, "moment.js": { "https://cdnjs.cloudflare.com/ajax/libs/moment.js/§§version§§/moment.min.js": { - "versions": ["1.6.0", "2.29.4", "2.18.0", "2.11.2"] + "versions": ["1.6.0", "2.29.4", "2.17.0", "2.11.2", "2.1.0", "2.3.0"] } }, "underscore.js": {