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(dev-server-rollup): fix rollup adapter virtual modules resolution for windows environments #2079

Conversation

giamir
Copy link
Contributor

@giamir giamir commented Dec 4, 2022

Please refer to #2078 for full context.

@changeset-bot
Copy link

changeset-bot bot commented Dec 4, 2022

🦋 Changeset detected

Latest commit: ab27e50

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@web/dev-server-rollup Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

giamir added a commit to StackExchange/Stacks that referenced this pull request Dec 5, 2022
Remove temp patch when this PR is merged and a new version of the package is released: modernweb-dev/web#2079
@giamir
Copy link
Contributor Author

giamir commented Dec 12, 2022

@LarsDenBakker I would really appreciate a review on this one-liner PR.
It would help to give WTR a chance to be adopted in Stack Overflow's Design System (for us supporting tests in windows environments is crucial).
Thanks in advance and let me know if there is anything I can do to support. 🙂

@giamir
Copy link
Contributor Author

giamir commented Dec 15, 2022

@peschee @43081j @Westbrook Apologies in advance for tagging more maintainers.
Please do let me know if there is a better process to receive support.

I would appreciate if someone could take a look at this one-liner PR (bug fix for Windows).

Highly appreciate your community efforts to maintain this project.
Thanks and let me know if I can provide any support.

@43081j
Copy link
Contributor

43081j commented Dec 15, 2022

i wouldn't actually solve this by stripping the null byte, that exists to tell the internals that its not a real path (i.e. it is virtual, handled by a plugin).

in both unix and windows, it shouldn't be isAbsolute because of that.

the bit that's tripping you up here is that:

C:\foo\bar

is parsed as a valid URL - {scheme: 'C', path: '\foo\bar'}

whoever wrote that condition you linked to probably hoped/assumed paths would fail to parse in both OSes.

that should probably be modified to take into account that windows paths can result in valid URLs

i suppose we could check that it is null or has a non-http(s) scheme

@giamir giamir force-pushed the fix-rollup-adapter-virtual-modules-resolution branch from 3f3f194 to ab27e50 Compare December 15, 2022 11:15
@giamir
Copy link
Contributor Author

giamir commented Dec 15, 2022

Thanks for the prompt response @43081j, I have adjusted the PR based off your suggestion.

Could you have a look? It is still a one-liner after all. 🙂

@giamir
Copy link
Contributor Author

giamir commented Jan 3, 2023

@43081j I would appreciate if you or another maintainer could help me to get this small fix merged and released. How can I support? Thanks in advance.

Copy link
Contributor

@43081j 43081j left a comment

Choose a reason for hiding this comment

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

makes sense to me.

probably need @daKmoR or @LarsDenBakker to approve/merge

meanwhile, if its possible to add a test for this case, that'd be super helpful

@giamir
Copy link
Contributor Author

giamir commented Jan 12, 2023

Sorry to ping again in here.
Can @daKmoR, @LarsDenBakker, @Westbrook or @thepassle help me to get this small change merged?
It would be highly appreciated. Thanks in advance!

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