npm / template-oss

a template package for npm CLI team development
Other
26 stars 19 forks source link

fix: adds support for tap 19 #451

Closed reggi closed 4 months ago

reggi commented 5 months ago
wraithgar commented 5 months ago

Oh hrm, didn't see that tests were red still. Of course that needs to work first.

reggi commented 5 months ago

now

Asserts:  279 pass  0 fail  5 skip  1 todo  279 of 285 complete
Suites:    33 pass  0 fail  5 skip            33 of 38 complete

---------------------------|---------|----------|---------|---------|---------------------------------------
File                       | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
---------------------------|---------|----------|---------|---------|---------------------------------------
All files                  |   94.08 |    99.38 |   97.71 |   94.08 |                                      
 bin                       |     100 |      100 |     100 |     100 |                                      
  apply.js                 |     100 |      100 |     100 |     100 |                                      
  check.js                 |     100 |      100 |     100 |     100 |                                      
 lib                       |     100 |      100 |     100 |     100 |                                      
  config.js                |     100 |      100 |     100 |     100 |                                      
  index.js                 |     100 |      100 |     100 |     100 |                                      
 lib/apply                 |     100 |      100 |     100 |     100 |                                      
  apply-files.js           |     100 |      100 |     100 |     100 |                                      
  apply-version.js         |     100 |      100 |     100 |     100 |                                      
  index.js                 |     100 |      100 |     100 |     100 |                                      
 lib/check                 |     100 |      100 |     100 |     100 |                                      
  check-apply.js           |     100 |      100 |     100 |     100 |                                      
  check-changelog.js       |     100 |      100 |     100 |     100 |                                      
  check-engines.js         |     100 |      100 |     100 |     100 |                                      
  check-gitignore.js       |     100 |      100 |     100 |     100 |                                      
  check-required.js        |     100 |      100 |     100 |     100 |                                      
  check-unwanted.js        |     100 |      100 |     100 |     100 |                                      
  index.js                 |     100 |      100 |     100 |     100 |                                      
 lib/content               |     100 |      100 |     100 |     100 |                                      
  index.js                 |     100 |      100 |     100 |     100 |                                      
 lib/release               |   78.41 |    96.59 |   88.37 |   78.41 |                                      
  changelog.js             |     100 |      100 |     100 |     100 |                                      
  node-workspace-format.js |    9.27 |    66.66 |   33.33 |    9.27 | 10-97                                
  release-manager.js       |   99.26 |    97.95 |     100 |   99.26 | 176-177                              
  release-please.js        |   48.82 |     62.5 |   57.14 |   48.82 | 50,65-73,84-85,89-141,144-148,151-167
  util.js                  |     100 |      100 |     100 |     100 |                                      
 lib/util                  |     100 |      100 |     100 |     100 |                                      
  ci-versions.js           |     100 |      100 |     100 |     100 |                                      
  dependabot.js            |     100 |      100 |     100 |     100 |                                      
  files.js                 |     100 |      100 |     100 |     100 |                                      
  get-cmd-path.js          |     100 |      100 |     100 |     100 |                                      
  git.js                   |     100 |      100 |     100 |     100 |                                      
  gitignore.js             |     100 |      100 |     100 |     100 |                                      
  has-package.js           |     100 |      100 |     100 |     100 |                                      
  import-or-require.js     |     100 |      100 |     100 |     100 |                                      
  json-diff.js             |     100 |      100 |     100 |     100 |                                      
  merge.js                 |     100 |      100 |     100 |     100 |                                      
  output.js                |     100 |      100 |     100 |     100 |                                      
  parser.js                |     100 |      100 |     100 |     100 |                                      
  path.js                  |     100 |      100 |     100 |     100 |                                      
  template.js              |     100 |      100 |     100 |     100 |                                      
---------------------------|---------|----------|---------|---------|---------------------------------------

prior

Suites:   ​33 passed​, ​33 of 33 completed
Asserts:  ​​​279 passed​, ​1 todo​, ​of 280
​Time:​   ​28s
ERROR: Coverage for lines (99.91%) does not meet global threshold (100%)
ERROR: Coverage for statements (99.91%) does not meet global threshold (100%)
---------------------------|---------|----------|---------|---------|-------------------
File                       | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
---------------------------|---------|----------|---------|---------|-------------------
All files                  |   99.91 |      100 |     100 |   99.91 |                   
 bin                       |     100 |      100 |     100 |     100 |                   
  apply.js                 |     100 |      100 |     100 |     100 |                   
  check.js                 |     100 |      100 |     100 |     100 |                   
 lib                       |     100 |      100 |     100 |     100 |                   
  config.js                |     100 |      100 |     100 |     100 |                   
  index.js                 |     100 |      100 |     100 |     100 |                   
 lib/apply                 |     100 |      100 |     100 |     100 |                   
  apply-files.js           |     100 |      100 |     100 |     100 |                   
  apply-version.js         |     100 |      100 |     100 |     100 |                   
  index.js                 |     100 |      100 |     100 |     100 |                   
 lib/check                 |     100 |      100 |     100 |     100 |                   
  check-apply.js           |     100 |      100 |     100 |     100 |                   
  check-changelog.js       |     100 |      100 |     100 |     100 |                   
  check-engines.js         |     100 |      100 |     100 |     100 |                   
  check-gitignore.js       |     100 |      100 |     100 |     100 |                   
  check-required.js        |     100 |      100 |     100 |     100 |                   
  check-unwanted.js        |     100 |      100 |     100 |     100 |                   
  index.js                 |     100 |      100 |     100 |     100 |                   
 lib/content               |     100 |      100 |     100 |     100 |                   
  index.js                 |     100 |      100 |     100 |     100 |                   
 lib/release               |     100 |      100 |     100 |     100 |                   
  changelog.js             |     100 |      100 |     100 |     100 |                   
  node-workspace-format.js |     100 |      100 |     100 |     100 |                   
  release-manager.js       |     100 |      100 |     100 |     100 |                   
  release-please.js        |     100 |      100 |     100 |     100 |                   
  util.js                  |     100 |      100 |     100 |     100 |                   
 lib/util                  |   99.83 |      100 |     100 |   99.81 |                   
  ci-versions.js           |     100 |      100 |     100 |     100 |                   
  dependabot.js            |     100 |      100 |     100 |     100 |                   
  files.js                 |     100 |      100 |     100 |     100 |                   
  get-cmd-path.js          |     100 |      100 |     100 |     100 |                   
  git.js                   |   97.82 |      100 |     100 |   97.67 | 70                
  gitignore.js             |     100 |      100 |     100 |     100 |                   
  has-package.js           |     100 |      100 |     100 |     100 |                   
  import-or-require.js     |     100 |      100 |     100 |     100 |                   
  json-diff.js             |     100 |      100 |     100 |     100 |                   
  merge.js                 |     100 |      100 |     100 |     100 |                   
  output.js                |     100 |      100 |     100 |     100 |                   
  parser.js                |     100 |      100 |     100 |     100 |                   
  path.js                  |     100 |      100 |     100 |     100 |                   
  template.js              |     100 |      100 |     100 |     100 |                   
---------------------------|---------|----------|---------|---------|-------------------
reggi commented 5 months ago

for some reason release-please.js got less coverage 🤔

lib/release               |   78.41 |    96.59 |   88.37 |   78.41 |                                      
  changelog.js             |     100 |      100 |     100 |     100 |                                      
  node-workspace-format.js |    9.27 |    66.66 |   33.33 |    9.27 | 10-97                                
  release-manager.js       |   99.26 |    97.95 |     100 |   99.26 | 176-177                              
  release-please.js        |   48.82 |     62.5 |   57.14 |   48.82 | 50,65-73,84-85,89-141,144-148,151-167
  util.js                  |     100 |      100 |     100 |     100 |                      
reggi commented 5 months ago

Blocked by https://github.com/tapjs/tapjs/issues/1027

reggi commented 5 months ago

Blocked by https://github.com/tapjs/tapjs/issues/950 because tap@19 doesn't work on 20.5.0 😢 not sure what to do here

reggi commented 5 months ago

I've made pr's which could potentially make tap truly support what it says >=16

https://github.com/isaacs/resolve-import/pull/5 https://github.com/tapjs/tapjs/pull/1028

But as it currently stands tap truly is

>=16.17.0 <=16.20.2||>=18.6.0 <=18.20.3||>=19.0.0 <=19.5.0||>=20.6.0
// or
>=16.17.0 <=16.20.2||>=18.6.0 <=19.5.0||>=20.6.0

and we still use node 20.5 to test 😢

reggi commented 5 months ago

I've added a small demo here of tap@19 working on node 16-22 here it uses patch-package 😞

https://github.com/reggi/patch-tap/tree/main/patches