-
Notifications
You must be signed in to change notification settings - Fork 7
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: return error for invalid exports #5
base: main
Are you sure you want to change the base?
Conversation
cc @dsherret (btw i dont have write access to repo) |
thoughts on merging this crate into |
@@ -59,6 +59,8 @@ pub enum PackageJsonLoadError { | |||
#[source] | |||
source: serde_json::Error, | |||
}, | |||
#[error("\"exports\" cannot contains some keys starting with '.' and some not.\nThe exports object must either be an object of package subpath keys\nor an object of main entry condition name keys only.")] | |||
InvalidExports, |
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 not sure we want to do this here. Isn't this error already surfaced during resolution?
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.
Oh, it's currently a panic lol
It's very rare to update this crate and this is used without deno_config in node_resolver. Maybe if we updated the deno_config repo to be able to publish multiple crates, but I think it's not worth the effort atm. |
@dsherret PTAL |
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.
Can we investigate shifting this to be done only when resolving the exports? That way we can load invalid package.json files.
denoland/deno#26031