pkgjs / support

Package Support Format
MIT License
24 stars 7 forks source link

Update CI in order to drop Node 8.x #10

Closed rodion-arr closed 4 years ago

rodion-arr commented 4 years ago

@mhdawson Following discussion #9 - I tried to migrate from got to other http lib but found another dependency without support for 8.x which we can't replace:

npm-registry-fetch uses optional catch binding and it's failing. So yeah, it looks like we can not go with 8.x

This PR:

Closes #9

rodion-arr commented 4 years ago

Looks like show-local-tree test is unstable. It fails randomly, will try to take a look

mhdawson commented 4 years ago

@rodion-arr thanks for looking at that failing test :)

mhdawson commented 4 years ago

@rodion-arr as a note last time I saw a failure like that I thought it was due to a change in aborist. My package.json shows "@npmcli/arborist": "0.0.0-pre.19", which should match what was committed.

I tried doing an npm update and it still passed on my machine, so maybe its flaky as you indicated or something else affects the order that the modules are listed

ljharb commented 4 years ago

arborist is up to v0.0.0, fwiw.

rodion-arr commented 4 years ago

Looks like arb.loadActual() does not guarantee modules ordering. That's why sometimes dep1 is listed after dep2 in show command result but we are checking for strict order in test. Stability of test depends on loadActual result:

Screenshot 2020-07-16 at 13 04 09

If we have requirement to save modules order - than this issue is not trivial because of external dependency...

Otherwise we can update show command tests to have multiple positive cases. E.g for show-local-tree test:

@pkgjs/support-show-local(0.0.1) - { "versions": [ { "version": "*", "target": { "node": "supported" }, "response": { "type": "best-effort" }, "backing": { "hobby": "https://github.com/pkgjs/support" } } ] }
    dep1(0.0.1) - { "versions": [ { "version": "*", "target": { "node": "supported" }, "response": { "type": "best-effort" }, "backing": { "hobby": "https://github.com/pkgjs/support" } } ] }
    dep2(0.0.1) - { "versions": [ { "version": "*", "target": { "node": "supported" }, "response": { "type": "best-effort" }, "backing": { "hobby": "https://github.com/pkgjs/support" } } ] }
      dep3(0.0.1) - { "versions": [ { "version": "*", "target": { "node": "supported" }, "response": { "type": "best-effort" }, "backing": { "hobby": "https://github.com/pkgjs/support" } } ] }
 @pkgjs/support-show-local(0.0.1) - { "versions": [ { "version": "*", "target": { "node": "supported" }, "response": { "type": "best-effort" }, "backing": { "hobby": "https://github.com/pkgjs/support" } } ] }
    dep2(0.0.1) - { "versions": [ { "version": "*", "target": { "node": "supported" }, "response": { "type": "best-effort" }, "backing": { "hobby": "https://github.com/pkgjs/support" } } ] }
      dep3(0.0.1) - { "versions": [ { "version": "*", "target": { "node": "supported" }, "response": { "type": "best-effort" }, "backing": { "hobby": "https://github.com/pkgjs/support" } } ] }
    dep1(0.0.1) - { "versions": [ { "version": "*", "target": { "node": "supported" }, "response": { "type": "best-effort" }, "backing": { "hobby": "https://github.com/pkgjs/support" } } ] }
rodion-arr commented 4 years ago

Just realised that I can simply sort children Map for module and it fixes the problem.

mhdawson commented 4 years ago

I'll plan to land this Monday unless there are any objections before then.