-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(publish): improve error message when missing exports #26945
fix(publish): improve error message when missing exports #26945
Conversation
let deno_json = &package.config_file; | ||
let config_path = deno_json.specifier.to_file_path().unwrap(); | ||
let root_dir = config_path.parent().unwrap().to_path_buf(); | ||
let Some(version) = deno_json.json.version.clone() else { | ||
bail!("{} is missing 'version' field", deno_json.specifier); | ||
}; | ||
if deno_json.json.exports.is_none() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code was not tested and never hit.
); | ||
|
||
bail!( | ||
"You did not specify an entrypoint in {}. Add `exports` mapping in the configuration file, eg:\n{}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link to the some docs here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also wished we could do info/hint
here for nice human-readable output.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm just going to merge because it's better than before and I have to go somewhere :D (and will focus on TypeScript upgrade tomorrow)
No description provided.