-
Notifications
You must be signed in to change notification settings - Fork 65
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
Local Dependencies property support for Current Working Directory #1196
Local Dependencies property support for Current Working Directory #1196
Conversation
@@ -18,7 +18,7 @@ describe("the dependencies module", () => { | |||
test("should fail if can't find the file.", () => { | |||
try { | |||
dep.LocalFile.parse({ | |||
projectDir: __dirname, | |||
baseDir: __dirname, |
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.
renaming projectDir to baseDir for consistency
let { success: localFileSuccess, data: localUrlData } = LocalFile.safeParse({projectDir : config.projectDir, sanitized}); | ||
|
||
let { success: localFileCWDSuccess, data: localUrlCWDData } = LocalFile.safeParse({ baseDir: process.cwd(), sanitized }); | ||
if (localFileCWDSuccess && localUrlCWDData !== undefined) { |
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.
Using cwd first as baseDir
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.
LGTM
The latest update (version 2.90.1) has changed the behavior of
morphir.json
'slocalDependency
property.On that version local references were using the
-p, --project-dir
argument from themake
command as a base directory to look up that dependency.This PR remediates this by additionally looking up for the reference from the current working folder: The folder that
morphir-elm
was called from.Terms