Reproduction link or steps
With a given package.json file
"exports": {
".": "./src/index.ts"
},
"publishConfig": {
"exports": {
".": "./dist/index.mjs"
}
},
Imagine we don't have ./dist/index.mjs file on the disk, the publint correctly report an issue, but the warning message is using data from the normal exports
The repro is here https://github.com/timofei-iatsenko/tsdown-publint-issue-repro
What is expected?
Warning message uses message from publishConfig.exports
ERROR [publint] pkg.exports["."] is ./dist/index.mjs but the file does not exist.
What is actually happening?
The warning message is using data from the normal exports, not from the publishConfig.exports
ERROR [publint] pkg.exports["."] is ./src/index.ts but the file does not exist.
So actually ./src/index.ts exists, but /dist/index.mjs is not. The warning message makes it confusing
Any additional comments?
This happend only when publint invoked from the tsdown. When publint is used from it's own cli - reporting is correct.
Reproduction link or steps
With a given
package.jsonfileImagine we don't have
./dist/index.mjsfile on the disk, thepublintcorrectly report an issue, but the warning message is using data from the normalexportsThe repro is here https://github.com/timofei-iatsenko/tsdown-publint-issue-repro
What is expected?
Warning message uses message from
publishConfig.exportsWhat is actually happening?
The warning message is using data from the normal
exports, not from thepublishConfig.exportsSo actually
./src/index.tsexists, but/dist/index.mjsis not. The warning message makes it confusingAny additional comments?
This happend only when
publintinvoked from thetsdown. When publint is used from it's own cli - reporting is correct.