-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Apply clean-base-url to config.rootURL #6600
Conversation
7aa0054
to
48610cd
Compare
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.
I don't see any obvious problems with this change, but the code could use a comment since it's not obvious that calculateRootURL
only appends a /
at the end if necessary.
48610cd
to
502a523
Compare
@Turbo87 I added a comment. It doesn't merely ensure leading/trailing slashes since it runs things through |
@homu r+ |
📌 Commit 502a523 has been approved by |
Apply clean-base-url to config.rootURL So here's the deal: this is an improvement but it is actually a change. This method has not changed: - [In 2.4, before all `baseURL` changes.](https://github.com/ember-cli/ember-cli/blob/v2.4.3/lib/broccoli/ember-app.js#L1656-L1663) - [In `master` after changes.](https://github.com/ember-cli/ember-cli/blob/9e674547c82fa6747895e2b5b7f6a53e73d0226f/lib/broccoli/ember-app.js#L1752-L1759) We would populate the `base` tag with `/` if the provided value was falsey, but the config value would always be the original as specified by the user. [Flipping through the switchover commit you can see that we didn't adjust what appears in the config module in any way.](#5792) I'm in favor of this change since this is what we do internally for all usages. Exposing it to the user in the "canonical" format is probably a better decision. However it _is_ a change and could be considered breaking. I require a +1 from @rwjblue and @Turbo87 to ship. Closes #6599. Discarding this also should close #6599.
☀️ Test successful - status |
So here's the deal: this is an improvement but it is actually a change. This method has not changed:
baseURL
changes.master
after changes.We would populate the
base
tag with/
if the provided value was falsey, but the config value would always be the original as specified by the user.Flipping through the switchover commit you can see that we didn't adjust what appears in the config module in any way.
I'm in favor of this change since this is what we do internally for all usages. Exposing it to the user in the "canonical" format is probably a better decision. However it is a change and could be considered breaking. I require a +1 from @rwjblue and @Turbo87 to ship.
Closes #6599. Discarding this also should close #6599.