bluwy / publint

Lint packaging errors
https://publint.dev
MIT License
932 stars 19 forks source link

Subpath pattern export error is either incorrect or confusing #61

Closed andrewbranch closed 11 months ago

andrewbranch commented 11 months ago

I tried running the CLI on tslib after making the change at https://github.com/microsoft/tslib/pull/217, and it reports these errors:

Errors:
1. pkg.exports["./"] is ./ but the file is not published. Is it specified in pkg.files?
2. pkg.exports["./"] is ./ but the file is not published. Is it specified in pkg.files?
3. pkg.exports["./"] is ./ but the file is not published. Is it specified in pkg.files?
4. pkg.exports["./"] is ./ but the file is not published. Is it specified in pkg.files?
5. pkg.exports["./"] is ./ but the file is not published. Is it specified in pkg.files?
6. pkg.exports["./"] is ./ but the file is not published. Is it specified in pkg.files?
7. pkg.exports["./"] is ./ but the file is not published. Is it specified in pkg.files?
8. pkg.exports["./"] is ./ but the file is not published. Is it specified in pkg.files?
9. pkg.exports["./"] is ./ but the file is not published. Is it specified in pkg.files?
10. pkg.exports["./*"] is ./* but the file is not published. Is it specified in pkg.files?
11. pkg.exports["./*"] is ./* but the file is not published. Is it specified in pkg.files?
12. pkg.exports["./*"] is ./* but the file is not published. Is it specified in pkg.files?
13. pkg.exports["./*"] is ./* but the file is not published. Is it specified in pkg.files?
14. pkg.exports["./*"] is ./* but the file is not published. Is it specified in pkg.files?
15. pkg.exports["./*"] is ./* but the file is not published. Is it specified in pkg.files?
16. pkg.exports["./"] is ./ but the file is not published. Is it specified in pkg.files?
17. pkg.exports["./*"] is ./* but the file is not published. Is it specified in pkg.files?
18. pkg.exports["./*"] is ./* but the file is not published. Is it specified in pkg.files?
19. pkg.exports["./*"] is ./* but the file is not published. Is it specified in pkg.files?
20. pkg.exports["./"] is ./ but the file is not published. Is it specified in pkg.files?
21. pkg.exports["./*"] is ./* but the file is not published. Is it specified in pkg.files?
22. pkg.exports["./*"] is ./* but the file is not published. Is it specified in pkg.files?
23. pkg.exports["./*"] is ./* but the file is not published. Is it specified in pkg.files?
24. pkg.exports["./"] is ./ but the file is not published. Is it specified in pkg.files?
25. pkg.exports["./*"] is ./* but the file is not published. Is it specified in pkg.files?
26. pkg.exports["./"] is ./ but the file is not published. Is it specified in pkg.files?

I’m not sure what it’s doing to come up with these errors, so it’s hard to say whether they’re correct, but they seem to be omitting a key piece of information either way 😄. tslib uses an npmignore file and doesn’t specify files.

bluwy commented 11 months ago

Looks like I might've messed something up 👀 The published checks shouldn't happen in glob exports as they can mean any file