retire 5.2.2 → 5.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [5.2.3]
4
+
5
+ ### Bugfix
6
+
7
+ - Fix license handling for complex licenses
8
+
3
9
  ## [5.2.2]
4
10
 
5
11
  ### Bugfix
package/lib/license.js CHANGED
@@ -15,10 +15,11 @@ function evaluateLicense(licenses, version) {
15
15
  .slice(splitIndex + 1)
16
16
  .trim()
17
17
  .split(';')
18
+ .map((x) => x.trim())
18
19
  .map((range) => {
19
20
  const [from, to] = range.split(' ').map((v) => v.trim());
20
21
  if (!from.startsWith('>='))
21
- throw new Error("Invalid license range: 'from' must start with '>=': " + range);
22
+ throw new Error("Invalid license range: 'from' must start with '>=': " + range + '[' + from + ']' + '[' + to + ']');
22
23
  if (to && !to.startsWith('<'))
23
24
  throw new Error("Invalid license range: 'to' must start with '<': " + range);
24
25
  if (to && to.startsWith('<='))
package/lib/retire.js CHANGED
@@ -4,7 +4,7 @@
4
4
  */
5
5
 
6
6
  var exports = exports || {};
7
- exports.version = '5.2.2';
7
+ exports.version = '5.2.3';
8
8
 
9
9
  function isDefined(o) {
10
10
  return typeof o !== 'undefined';
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "author": "Erlend Oftedal <erlend@oftedal.no>",
3
3
  "name": "retire",
4
4
  "description": "Retire is a tool for detecting use of vulnerable libraries",
5
- "version": "5.2.2",
5
+ "version": "5.2.3",
6
6
  "license": "Apache-2.0",
7
7
  "repository": {
8
8
  "type": "git",