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(config): sections not rendering correctly #1133

Merged
merged 12 commits into from
Sep 13, 2018
Merged

Conversation

elevatebart
Copy link
Collaborator

@elevatebart elevatebart commented Sep 11, 2018

Closes #1132

Fixes and simplifies configuration on windows

@elevatebart elevatebart changed the title Fix: sections not rendering correctly Fix(config): sections not rendering correctly Sep 11, 2018
@codecov-io
Copy link

codecov-io commented Sep 11, 2018

Codecov Report

Merging #1133 into master will decrease coverage by 0.05%.
The diff coverage is 87.5%.

Impacted Files Coverage Δ
loaders/utils/getComponentFiles.js 100% <100%> (ø) ⬆️
scripts/schemas/config.js 87.14% <66.66%> (-1.1%) ⬇️

@elevatebart elevatebart self-assigned this Sep 11, 2018
This fixes issues on windows

Closes #1132
loaders/utils/getComponentFiles.js Outdated Show resolved Hide resolved
loaders/utils/getComponentFiles.js Outdated Show resolved Hide resolved
Barthelemy Ledoux and others added 5 commits September 11, 2018 15:24
Instead of removing case management in getComponents files,
I choose to do it here.
This way, I am not impacted by the bugs surrounding node-glob
with nocase on Windows platforms
@sapegin
Copy link
Member

sapegin commented Sep 12, 2018

Looks like you need to revert test case changes, otherwise looks good! I'd also add a HACK: in front of the comment ;-)

@elevatebart
Copy link
Collaborator Author

Hello @sapegin,
I changed the test cases because I have no choice. The removal of glob.hasMagic has changed the behaviour of getComponentFiles. It now always goies through the glob. This means that the array of non existent files is not returned anymore if we pass it to the function. I changed the paths to point to real test files. And the tests are passing again.

Codecov was actually complaining about another file: config.js. I added a new branch, the windows specific glob without testing it. Since I do not think we plan on making tests pass on windows, I simply ignored the coverage for his line.

Bart

@sapegin
Copy link
Member

sapegin commented Sep 13, 2018

Ah, I see! That's OK ;-)

@sapegin sapegin merged commit 0e6e95a into master Sep 13, 2018
@sapegin sapegin deleted the fix-sectionresolving branch September 13, 2018 12:54
@styleguidist-bot
Copy link
Collaborator

🎉 This PR is included in version 7.3.8 🎉

The release is available on:

Your semantic-release bot 📦🚀

@ThorHelms
Copy link

Just FYI: It seems that this breaks Styleguidist on Windows when using uppercase 'Components' folder, as the resources will be requested with lowercase 'components' which doesn't exist.
For now I've been lazy and simply reverted to 7.3.7.

@elevatebart
Copy link
Collaborator Author

Hello @ThorHelms, what can you share your version of windows, the command prompt you are using and your version of nodejs? I would like to investigate this issue.

@elevatebart
Copy link
Collaborator Author

@ThorHelms another question, did you use the Components folder before 7.3.7 ?

@ThorHelms
Copy link

I am using:
Windows 10 Pro, version 1803
PowerShell 5.1
NodeJS 8.11.2

I used the Components folder with Styleguidist 7.2.2, and after an update to 7.3.8 it no longer worked.

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.

5 participants