-
-
Notifications
You must be signed in to change notification settings - Fork 158
[publint] publishConfig.exports is used for linting by warning message uses value from root's exports #883
Description
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.
Metadata
Metadata
Assignees
Labels
Type
Fields
Give feedbackPriority
Effort