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

feat(util): Add resolveBaseUrl function #7918

Merged
merged 2 commits into from
Dec 9, 2020

Conversation

zharinov
Copy link
Collaborator

@zharinov zharinov commented Dec 9, 2020

Changes:

Added resolveBaseUrl function with behavior described in #7317.
Migrations from URL.resolve() will be made in separate PRs.

Context:

Ref: #7317

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added unit tests, or
  • Unit tests + ran on a real repository

viceice
viceice previously approved these changes Dec 9, 2020
lib/util/url.ts Outdated
}

const result = host ? inputString : urlJoin(baseUrl, pathname || '');
return result.replace(/\/+$/, '');
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are we certain that we always want to strip the trailing slash?

Copy link
Collaborator Author

@zharinov zharinov Dec 9, 2020

Choose a reason for hiding this comment

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

Let's preserve, except strings like these /foo/?bar=baz (normalized by url-join)

@rarkins rarkins merged commit d8df51f into renovatebot:master Dec 9, 2020
@rarkins rarkins deleted the feat/util-resolve-base-url branch December 9, 2020 12:05
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 23.99.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants