pkgjs / support

Package Support Format
MIT License
24 stars 7 forks source link

update refs from best-effort to time-permitting #29

Closed helio-frota closed 3 years ago

helio-frota commented 3 years ago

Related to #24

helio-frota commented 3 years ago

@ljharb the only remaining file with occurrence of best-effort is the one on @mhdawson PR

$ rg best-effort
package-support.json
9:        "type": "best-effort"
mhdawson commented 3 years ago

@helio-frota look like a number of the tests fail.

helio-frota commented 3 years ago

@mhdawson @ljharb yeah, I was using ripgrep tool but when using grep it show more results:

$ grep "best-effort" -R *
node_modules/esprima/bin/esparse.js:    console.log('  --tolerant     Tolerate errors on a best-effort basis (experimental)');
node_modules/.bin/esparse:    console.log('  --tolerant     Tolerate errors on a best-effort basis (experimental)');
node_modules/ssri/README.md:a best-effort to pick the strongest/most reliable of the given algorithms. It
node_modules/ssri/README.md:a best-effort to pick the strongest/most reliable of the given algorithms. It
test/cli/show-local-tree/node_modules/dep1/package-support.json:        "type": "best-effort"
test/cli/show-local-tree/node_modules/dep2/node_modules/dep3/package-support.json:        "type": "best-effort"
test/cli/show-local-tree/node_modules/dep2/package-support.json:        "type": "best-effort"
test/cli/show-local-circular-dependency/node_modules/dep1/package-support.json:        "type": "best-effort"
test/cli/show-local-circular-dependency/node_modules/dep3/package-support.json:        "type": "best-effort"
test/cli/show-local-circular-dependency/node_modules/dep2/package-support.json:        "type": "best-effort"
test/cli/show-local-tree-flat/node_modules/dep1/package-support.json:        "type": "best-effort"
test/cli/show-local-tree-flat/node_modules/dep3/package-support.json:        "type": "best-effort"
test/cli/show-local-tree-flat/node_modules/dep2/package-support.json:        "type": "best-effort"

I'll update the PR thanks for the review

helio-frota commented 3 years ago

one of the tests will fail because it will try to fetch (the github repo which is not updated yet) using:

--fetch      Fetch canonical support info from remote repositories when necessary

But some other tests :

    2) cli test: validate-local-support-json-bad
    3) cli test: validate-local-support-json-bad2
    4) cli test: validate-local-support-json-bad3

Are failing probably because some spaces or new line chars added that is causing issues with the expected result. /me looking in to that

helio-frota commented 3 years ago

Found the issue, I had to add more ^^^^ to match with the expected result. PR updated. The only test that is failing locally are these related to fetch:

   1) cli test: show-separate-repo-fetch
   2) cli test: validate-separate-repo-fetch
mhdawson commented 3 years ago

Once you push the latest changes we should land https://github.com/pkgjs/support/pull/26 and then land this right after.

I hat thought that #26 might affect some tests.

helio-frota commented 3 years ago

@mhdawson yeah I already pushed the latest changes :+1:

mhdawson commented 3 years ago

@helio-frota can you rebase on the latest, need something to trigger re-running the tests which should now pass since I landed #26

helio-frota commented 3 years ago

@mhdawson rebased, I'm not double checked but I think the test with error is trying to fetch the data from github which is not present yet. By using the --fetch option.

helio-frota commented 3 years ago

@mhdawson I reverted the 2 files (required to make the test pass) from time-permitting to best-effort

1) schema.json --> added best-effort back to the list 2) test/cli/show-separate-repo-fetch/expected --> reverted from time-permitting to best-effort

mhdawson commented 3 years ago

@helio-frota thanks will and.

I think the next step would then be to

1) open another PR which replaces the remaining best-effort with time-permitting in the example in: https://github.com/pkgjs/support/tree/master/examples

2) open a follow on PR that updates the tests to replace the remaining best-effort with time-permitting

And then land them one after another.