Skip to content
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: provide default source directories for packages #113

Merged
merged 1 commit into from
Feb 13, 2024

Conversation

ymtszw
Copy link
Contributor

@ymtszw ymtszw commented Feb 13, 2024

Fixes #112, with minimal impact on other places (at least I think so)

@@ -232,7 +232,7 @@ function elmPathToModule(elmRoot, sourceDirs, testsPath) {
};
}

function findModule(elmRoot, sourceDirs, pathName) {
function findModule(elmRoot, sourceDirs = ["./src"], pathName) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

findModule() is called in a manner of findModule(root, model["source-directories"], pathName), which leads to nullish referencing inside the function in case of package Elm project.
I've chosen the path of adding fallback sourceDirs for minimal impact/low friction in mind.

Copy link
Owner

@stoeffel stoeffel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice fix!

@stoeffel stoeffel merged commit 725e740 into stoeffel:master Feb 13, 2024
1 check passed
stoeffel added a commit that referenced this pull request Feb 13, 2024
fix: provide default source directories for packages
@stoeffel
Copy link
Owner

Published with 6.0.3. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inappropriate handling of elm.json for packages
2 participants