jslicense / licensee.js

check dependency licenses against rules
https://www.npmjs.com/package/licensee
Apache License 2.0
186 stars 15 forks source link

Sort issues by package name #81

Closed CvX closed 1 month ago

CvX commented 1 year ago

Fixes a flaky test:

​ FAIL ​ tests/unlicensed-subdependency/test.js
 ✖ should be equal

  tests/unlicensed-subdependency/test.js
   5 | tap.equal(results.status, 1)
   6 |
>  7 | tap.equal(
     | ----^
   8 |   results.stdout.trim(),
   9 |   [
  10 |     'mit-licensed-depends-on-not-licensed@1.0.1',

  --- expected
  +++ actual
  @@ -1,15 +1,15 @@
  -mit-licensed-depends-on-not-licensed@1.0.1
  +not-licensed@1.0.0
     NOT APPROVED
  -  Terms: MIT
  -  Repository: jslicense/mit-licensed-depends-on-not-licensed.js
  +  Terms: Invalid license metadata
  +  Repository: jslicense/not-licensed.js
     Homepage: None listed
     Author: Kyle E. Mitchell <kyle@kemitchell.com> (https://kemitchell.com/)
     Contributors: None listed

  -not-licensed@1.0.0
  +mit-licensed-depends-on-not-licensed@1.0.1
     NOT APPROVED
  -  Terms: Invalid license metadata
  -  Repository: jslicense/not-licensed.js
  +  Terms: MIT
  +  Repository: jslicense/mit-licensed-depends-on-not-licensed.js
     Homepage: None listed
     Author: Kyle E. Mitchell <kyle@kemitchell.com> (https://kemitchell.com/)
     Contributors: None listed

  test: tests/unlicensed-subdependency/test.js
  stack: |
    Object.<anonymous> (tests/unlicensed-subdependency/test.js:7:5)
    Module.replacementCompile (node_modules/append-transform/index.js:60:13)
    Object.<anonymous> (node_modules/append-transform/index.js:64:4)

​ FAIL ​ tests/unlicensed-subdependency/test.js 1 failed of 2 16.992ms
 ✖ should be equal

  🌈 SUMMARY RESULTS 🌈

​ FAIL ​ tests/unlicensed-subdependency/test.js 1 failed of 2 16.992ms
 ✖ should be equal
kemitchell commented 1 month ago

@CvX, please forgive me! I forgot about this PR, ran into the same test failure, and "fixed it" by fixing the test in 365c3a9b24be88a93e4c1b71303e9849e43bad1a.

I don't think we've made any claims about the order of results yet, and certainly not in SemVer terms. Sorting strikes me as a good idea.

kemitchell commented 1 month ago

Published in 11.1.0.