-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[package_info_plus_web] Fix double slash in version.json lookup #97
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
[package_info_plus_web] Fix double slash in version.json lookup #97
Conversation
|
Thanks @cfiorillo ! Is there a way to have a test for this issue? Did you run the e2e test for this plugin? |
|
Hi @miquelbeltran
Regarding point 2, trying the e2e tests on package_info_plus the "expect" for web are wrong; this code (in package_info_plus_e2e.dart file) should be replaced by since the pubspec.yaml file contains:
Also, running the above tests on a Mac seems like the
is verified (=true) also if I'm running the web tests with the following command line:
|
That's OK, the projects are structured in a way all e2e tests are on the root project :)
That's good to know at least, thanks for checking! I am aware that not all e2e test pass on all platforms, so I will fill a ticket for that. |
jpnurmi
left a comment
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.
Thanks for the fix!
I was going to ask if we should ensure that there's always a single slash between in case the base URI wouldn't end with a slash, but Flutter's index.html clearly states that the base URI must end with a slash, so this is ok.
<!--
If you are serving your web app in a path other than the root, change the
href value below to reflect the base path you are serving from.
The path provided below has to start and end with a slash "/" in order for
it to work correctly.
Fore more details:
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
-->
<base href="/">
HI @jpnurmi, while preparing the PR I initially added the slash before version.json only if there was no trailing slash in window.document.baseUri, but I read the comment above in index.html and changed mind ;-) Thanks for the approval, cool |
Description
When accessing the version.json file the generated URL contains an extra forward-slash, that can prevent in some deployments access to the file
Related Issues
#96
Checklist
///).flutter analyze) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?