Closed rossturner closed 8 months ago
Would you mind adding a test case to https://github.com/RetireJS/retire.js/blob/master/repository/testcases.json ?
You can run the tests for a specific library by running:
./test-detection.js angularjs
Basically you would add something like:
"angularjs": {
"https://code.angularjs.org/§§version§§/angular§§subversion§§.js": {
"versions": ["1.8.0"],
"subversions": ["", ".min"]
}
}
I think your fix doesn't take into account the extra *
on the second line.
Ah good points thanks, I'll look at those
@eoftedal Thanks for pointing out the tests that I'd missed, can confirm that the additional test cases fail for AngularJS >= 1.7.0 with the old implementation, and pass with the changes in this PR
Thank you for the fix!
retire.js is not currently recognising AngularJS 1.8.0 and potentially other versions.
The first filecontent regular expression is as follows:
/\*[ \n]+AngularJS v(§§version§§)
This matches https://code.angularjs.org/1.8.0/angular.min.js because the comment at the top of the file is
However, https://code.angularjs.org/1.8.0/angular.js has a header of
Which does not match against the current implementation of the regex. This PR adds an optional non-capturing group of "@license " as a prefix to cover this case.