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

Always use POSIX paths for ES imports #16

Merged
merged 3 commits into from
Mar 23, 2018
Merged

Always use POSIX paths for ES imports #16

merged 3 commits into from
Mar 23, 2018

Conversation

bitpshr
Copy link
Member

@bitpshr bitpshr commented Mar 12, 2018

Type: bug

The following has been addressed in the PR:

Description:

ES imports were botched on windows machines due to differences in the output of path.relative between win32 and POSIX operating systems. This PR modifies the usage of path.relative to use path.posix.relative since ES imports should always use POSIX path delimiters.

Resolves #15

@bitpshr bitpshr requested a review from agubler March 12, 2018 13:36
@agubler
Copy link
Member

agubler commented Mar 12, 2018

@bitpshr Can we test this or it already covered? Looks like Appveyor is not setup correct for this repo so would never have run them on windows before.

@agubler
Copy link
Member

agubler commented Mar 12, 2018

@bitpshr Awesome setting up appveyor correctly and the previous commit on master fails.

Can you push a commit so that we get this PR to re-run on appveyor?

@bitpshr
Copy link
Member Author

bitpshr commented Mar 12, 2018

Thanks @agubler, ready for another review.

@agubler
Copy link
Member

agubler commented Mar 12, 2018

@bitpshr Cool, it doesn't look like that failing test was related to this change - which means we haven't covered the creation of these paths in a test (by covered I mean actually tested the values)?

Slightly off topic, we should probably add fixture tests for this repo to ensure that the output is actually correct! But we can do that as a follow up PR.

@@ -74,9 +74,9 @@ export default async function(helper: Helper, args: CreateWidgetArgs) {
name,
Copy link
Member

Choose a reason for hiding this comment

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

@bitpshr We should be able to use MockModules.ts, to assert the arguments of renderFiles that will cover these changes.

I don't think we have mock modules in this repo, but you should be able to copy it from @dojo/webpack-contrib and then use it similar to the build-time-render tests

@dylans dylans added this to the rc.2 milestone Mar 16, 2018
@bitpshr
Copy link
Member Author

bitpshr commented Mar 22, 2018

@agubler Thanks for the reviews so far, ready for another. We were already using mockery directly in this test and had renderFiles stubs set up already, so I just hooked into those for now.

@agubler
Copy link
Member

agubler commented Mar 23, 2018

Thanks @bitpshr

@bitpshr bitpshr merged commit c4335e6 into dojo:master Mar 23, 2018
@bitpshr bitpshr deleted the bugfix/path-delimiter branch March 23, 2018 13:18
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.

3 participants